@webex/plugin-meetings 3.12.0-next.91 → 3.12.0-next.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/webex-errors.js +47 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +14 -5
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +5 -1
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +458 -365
- package/dist/meeting/index.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +111 -70
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +31 -2
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/meeting/index.d.ts +18 -3
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +9 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/common/errors/webex-errors.ts +47 -3
- package/src/locus-info/index.ts +15 -5
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/index.ts +7 -1
- package/src/meeting/index.ts +100 -27
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +28 -1
- package/test/unit/spec/common/errors/webex-errors.ts +62 -0
- package/test/unit/spec/locus-info/index.js +44 -0
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +61 -0
- package/test/unit/spec/meeting/index.js +290 -8
- package/test/unit/spec/reachability/index.ts +69 -0
|
@@ -160,6 +160,75 @@ describe('isAnyPublicClusterReachable', () => {
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
|
|
163
|
+
describe('isAnyClusterReachableViaProtocol', () => {
|
|
164
|
+
let webex;
|
|
165
|
+
|
|
166
|
+
beforeEach(() => {
|
|
167
|
+
webex = new MockWebex();
|
|
168
|
+
sinon.stub(MeetingUtil, 'getIpVersion').returns(IP_VERSION.unknown);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
afterEach(() => {
|
|
172
|
+
sinon.restore();
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
const checkReachableViaProtocol = async (
|
|
176
|
+
mockStorage: any,
|
|
177
|
+
protocol: 'udp' | 'tcp' | 'xtls',
|
|
178
|
+
expectedValue: boolean
|
|
179
|
+
) => {
|
|
180
|
+
if (mockStorage) {
|
|
181
|
+
await webex.boundedStorage.put(
|
|
182
|
+
'Reachability',
|
|
183
|
+
'reachability.result',
|
|
184
|
+
JSON.stringify(mockStorage)
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
const reachability = new Reachability(webex);
|
|
188
|
+
|
|
189
|
+
const result = await reachability.isAnyClusterReachableViaProtocol(protocol);
|
|
190
|
+
|
|
191
|
+
assert.equal(result, expectedValue);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
['udp', 'tcp', 'xtls'].forEach((protocol: 'udp' | 'tcp' | 'xtls') => {
|
|
195
|
+
it(`returns true when at least one cluster is reachable via ${protocol}`, async () => {
|
|
196
|
+
await checkReachableViaProtocol(
|
|
197
|
+
{
|
|
198
|
+
clusterA: {[protocol]: {result: 'reachable'}},
|
|
199
|
+
clusterB: {[protocol]: {result: 'unreachable'}},
|
|
200
|
+
},
|
|
201
|
+
protocol,
|
|
202
|
+
true
|
|
203
|
+
);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it(`returns false when no cluster is reachable via ${protocol}`, async () => {
|
|
207
|
+
await checkReachableViaProtocol(
|
|
208
|
+
{
|
|
209
|
+
clusterA: {[protocol]: {result: 'unreachable'}},
|
|
210
|
+
clusterB: {[protocol]: {result: 'unreachable'}},
|
|
211
|
+
},
|
|
212
|
+
protocol,
|
|
213
|
+
false
|
|
214
|
+
);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it('returns false when storage read throws an error', async () => {
|
|
219
|
+
// don't put anything in storage so .get() rejects
|
|
220
|
+
const reachability = new Reachability(webex);
|
|
221
|
+
|
|
222
|
+
const result = await reachability.isAnyClusterReachableViaProtocol('xtls');
|
|
223
|
+
|
|
224
|
+
assert.equal(result, false);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('returns false when stored data is empty', async () => {
|
|
228
|
+
await checkReachableViaProtocol({}, 'xtls', false);
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
|
|
163
232
|
describe('isWebexMediaBackendUnreachable', () => {
|
|
164
233
|
let webex;
|
|
165
234
|
|