diff options
Diffstat (limited to 'server/tests/api/live/live-views.ts')
-rw-r--r-- | server/tests/api/live/live-views.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/api/live/live-views.ts b/server/tests/api/live/live-views.ts index 1951b11a5..43222f9c9 100644 --- a/server/tests/api/live/live-views.ts +++ b/server/tests/api/live/live-views.ts | |||
@@ -31,7 +31,7 @@ describe('Test live', function () { | |||
31 | await setAccessTokensToServers(servers) | 31 | await setAccessTokensToServers(servers) |
32 | await setDefaultVideoChannel(servers) | 32 | await setDefaultVideoChannel(servers) |
33 | 33 | ||
34 | await servers[0].configCommand.updateCustomSubConfig({ | 34 | await servers[0].config.updateCustomSubConfig({ |
35 | newConfig: { | 35 | newConfig: { |
36 | live: { | 36 | live: { |
37 | enabled: true, | 37 | enabled: true, |
@@ -53,7 +53,7 @@ describe('Test live', function () { | |||
53 | 53 | ||
54 | async function countViews (expected: number) { | 54 | async function countViews (expected: number) { |
55 | for (const server of servers) { | 55 | for (const server of servers) { |
56 | const video = await server.videosCommand.get({ id: liveVideoId }) | 56 | const video = await server.videos.get({ id: liveVideoId }) |
57 | expect(video.views).to.equal(expected) | 57 | expect(video.views).to.equal(expected) |
58 | } | 58 | } |
59 | } | 59 | } |
@@ -63,14 +63,14 @@ describe('Test live', function () { | |||
63 | 63 | ||
64 | const liveAttributes = { | 64 | const liveAttributes = { |
65 | name: 'live video', | 65 | name: 'live video', |
66 | channelId: servers[0].videoChannel.id, | 66 | channelId: servers[0].store.channel.id, |
67 | privacy: VideoPrivacy.PUBLIC | 67 | privacy: VideoPrivacy.PUBLIC |
68 | } | 68 | } |
69 | 69 | ||
70 | const live = await servers[0].liveCommand.create({ fields: liveAttributes }) | 70 | const live = await servers[0].live.create({ fields: liveAttributes }) |
71 | liveVideoId = live.uuid | 71 | liveVideoId = live.uuid |
72 | 72 | ||
73 | command = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: liveVideoId }) | 73 | command = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoId }) |
74 | await waitUntilLivePublishedOnAllServers(servers, liveVideoId) | 74 | await waitUntilLivePublishedOnAllServers(servers, liveVideoId) |
75 | await waitJobs(servers) | 75 | await waitJobs(servers) |
76 | }) | 76 | }) |
@@ -82,8 +82,8 @@ describe('Test live', function () { | |||
82 | it('Should view a live twice and display 1 view', async function () { | 82 | it('Should view a live twice and display 1 view', async function () { |
83 | this.timeout(30000) | 83 | this.timeout(30000) |
84 | 84 | ||
85 | await servers[0].videosCommand.view({ id: liveVideoId }) | 85 | await servers[0].videos.view({ id: liveVideoId }) |
86 | await servers[0].videosCommand.view({ id: liveVideoId }) | 86 | await servers[0].videos.view({ id: liveVideoId }) |
87 | 87 | ||
88 | await wait(7000) | 88 | await wait(7000) |
89 | 89 | ||
@@ -104,9 +104,9 @@ describe('Test live', function () { | |||
104 | it('Should view a live on a remote and on local and display 2 views', async function () { | 104 | it('Should view a live on a remote and on local and display 2 views', async function () { |
105 | this.timeout(30000) | 105 | this.timeout(30000) |
106 | 106 | ||
107 | await servers[0].videosCommand.view({ id: liveVideoId }) | 107 | await servers[0].videos.view({ id: liveVideoId }) |
108 | await servers[1].videosCommand.view({ id: liveVideoId }) | 108 | await servers[1].videos.view({ id: liveVideoId }) |
109 | await servers[1].videosCommand.view({ id: liveVideoId }) | 109 | await servers[1].videos.view({ id: liveVideoId }) |
110 | 110 | ||
111 | await wait(7000) | 111 | await wait(7000) |
112 | await waitJobs(servers) | 112 | await waitJobs(servers) |