teraslice-client-js 2.16.2 → 2.17.0
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/src/executions.d.ts +1 -1
- package/dist/src/executions.d.ts.map +1 -1
- package/package.json +7 -4
- package/dist/test/assets-spec.d.ts +0 -2
- package/dist/test/assets-spec.d.ts.map +0 -1
- package/dist/test/assets-spec.js +0 -322
- package/dist/test/assets-spec.js.map +0 -1
- package/dist/test/client-spec.d.ts +0 -2
- package/dist/test/client-spec.d.ts.map +0 -1
- package/dist/test/client-spec.js +0 -374
- package/dist/test/client-spec.js.map +0 -1
- package/dist/test/cluster-spec.d.ts +0 -2
- package/dist/test/cluster-spec.d.ts.map +0 -1
- package/dist/test/cluster-spec.js +0 -143
- package/dist/test/cluster-spec.js.map +0 -1
- package/dist/test/ex-spec.d.ts +0 -2
- package/dist/test/ex-spec.d.ts.map +0 -1
- package/dist/test/ex-spec.js +0 -550
- package/dist/test/ex-spec.js.map +0 -1
- package/dist/test/executions-spec.d.ts +0 -2
- package/dist/test/executions-spec.d.ts.map +0 -1
- package/dist/test/executions-spec.js +0 -233
- package/dist/test/executions-spec.js.map +0 -1
- package/dist/test/job-spec.d.ts +0 -2
- package/dist/test/job-spec.d.ts.map +0 -1
- package/dist/test/job-spec.js +0 -837
- package/dist/test/job-spec.js.map +0 -1
- package/dist/test/jobs-spec.d.ts +0 -2
- package/dist/test/jobs-spec.d.ts.map +0 -1
- package/dist/test/jobs-spec.js +0 -241
- package/dist/test/jobs-spec.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/examples/cluster.js +0 -13
- package/examples/list.js +0 -16
- package/examples/submit.js +0 -48
- package/src/assets.ts +0 -99
- package/src/client.ts +0 -197
- package/src/cluster.ts +0 -48
- package/src/ex.ts +0 -223
- package/src/executions.ts +0 -82
- package/src/index.ts +0 -39
- package/src/interfaces.ts +0 -12
- package/src/job.ts +0 -260
- package/src/jobs.ts +0 -66
- package/test/assets-spec.ts +0 -376
- package/test/client-spec.ts +0 -416
- package/test/cluster-spec.ts +0 -167
- package/test/ex-spec.ts +0 -628
- package/test/executions-spec.ts +0 -260
- package/test/fixtures/test.txt +0 -1
- package/test/job-spec.ts +0 -947
- package/test/jobs-spec.ts +0 -272
- package/tsconfig.json +0 -12
package/dist/test/client-spec.js
DELETED
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
import nock from 'nock';
|
|
2
|
-
import TerasliceClient from '../src/index.js';
|
|
3
|
-
import Client from '../src/client.js';
|
|
4
|
-
describe('Teraslice Client', () => {
|
|
5
|
-
describe('when using the main export function', () => {
|
|
6
|
-
it('returns a function', () => {
|
|
7
|
-
expect(typeof TerasliceClient).toEqual('function');
|
|
8
|
-
});
|
|
9
|
-
it('should not throw an error if constructed with nothing', () => {
|
|
10
|
-
expect(() => new TerasliceClient()).not.toThrow();
|
|
11
|
-
});
|
|
12
|
-
it('should have jobs, cluster, and assets', () => {
|
|
13
|
-
const client = new TerasliceClient();
|
|
14
|
-
expect(client.jobs).not.toBeUndefined();
|
|
15
|
-
expect(client.cluster).not.toBeUndefined();
|
|
16
|
-
expect(client.assets).not.toBeUndefined();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe('when using the Client constructor', () => {
|
|
20
|
-
let client;
|
|
21
|
-
let scope;
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
nock.cleanAll();
|
|
24
|
-
client = new Client({
|
|
25
|
-
baseUrl: 'http://teraslice.example.dev'
|
|
26
|
-
});
|
|
27
|
-
scope = nock('http://teraslice.example.dev/v1');
|
|
28
|
-
});
|
|
29
|
-
afterEach(() => {
|
|
30
|
-
nock.cleanAll();
|
|
31
|
-
});
|
|
32
|
-
describe('->get', () => {
|
|
33
|
-
describe('when called with nothing', () => {
|
|
34
|
-
it('should reject with a empty path message', async () => {
|
|
35
|
-
expect.hasAssertions();
|
|
36
|
-
try {
|
|
37
|
-
// @ts-expect-error
|
|
38
|
-
await client.get();
|
|
39
|
-
}
|
|
40
|
-
catch (err) {
|
|
41
|
-
expect(err.message).toEqual('endpoint must not be empty');
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
describe('when called with a non-string value', () => {
|
|
46
|
-
it('should reject with invalid endpoint error', async () => {
|
|
47
|
-
expect.hasAssertions();
|
|
48
|
-
try {
|
|
49
|
-
// @ts-expect-error
|
|
50
|
-
await client.get({ hello: 'hi' });
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
expect(err.message).toEqual('endpoint must be a string');
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('when called with a valid path', () => {
|
|
58
|
-
beforeEach(() => {
|
|
59
|
-
scope.get('/hello')
|
|
60
|
-
.reply(200, { example: 'hello' });
|
|
61
|
-
});
|
|
62
|
-
it('should resolve with the response from the server', async () => {
|
|
63
|
-
const results = await client.get('/hello');
|
|
64
|
-
expect(results).toEqual({ example: 'hello' });
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('when called with a path, query and options', () => {
|
|
68
|
-
beforeEach(() => {
|
|
69
|
-
scope.get('/hello')
|
|
70
|
-
.matchHeader('Some-Header', 'yes')
|
|
71
|
-
.query({ hello: true })
|
|
72
|
-
.reply(200, { example: 'hello' });
|
|
73
|
-
});
|
|
74
|
-
it('should resolve with the response from the server', async () => {
|
|
75
|
-
const results = await client.get('/hello', {
|
|
76
|
-
headers: { 'Some-Header': 'yes' },
|
|
77
|
-
searchParams: { hello: 'true' }
|
|
78
|
-
});
|
|
79
|
-
expect(results).toEqual({ example: 'hello' });
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
describe('when called with a path and plain query options', () => {
|
|
83
|
-
beforeEach(() => {
|
|
84
|
-
scope.get('/hello')
|
|
85
|
-
.query({ hello: true })
|
|
86
|
-
.reply(200, { example: 'hello' });
|
|
87
|
-
});
|
|
88
|
-
it('should resolve with the response from the server', async () => {
|
|
89
|
-
const results = await client.get('/hello', { searchParams: { hello: 'true' } });
|
|
90
|
-
expect(results).toEqual({ example: 'hello' });
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe('->post', () => {
|
|
95
|
-
describe('when called with nothing', () => {
|
|
96
|
-
it('should reject with a empty path message', async () => {
|
|
97
|
-
expect.hasAssertions();
|
|
98
|
-
try {
|
|
99
|
-
// @ts-expect-error
|
|
100
|
-
await client.post();
|
|
101
|
-
}
|
|
102
|
-
catch (err) {
|
|
103
|
-
expect(err.message).toEqual('endpoint must not be empty');
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
// TODO: need better story around validations
|
|
108
|
-
describe('when called with a non-string value', () => {
|
|
109
|
-
it('should reject with invalid endpoint error', async () => {
|
|
110
|
-
expect.hasAssertions();
|
|
111
|
-
try {
|
|
112
|
-
// @ts-expect-error
|
|
113
|
-
await client.post({ hello: 'hi' });
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
expect(err.message).toEqual('endpoint must be a string');
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
describe('when called the request throws an error', () => {
|
|
121
|
-
beforeEach(() => {
|
|
122
|
-
scope.post('/hello')
|
|
123
|
-
.replyWithError('Oh no');
|
|
124
|
-
});
|
|
125
|
-
it('should reject with invalid error', async () => {
|
|
126
|
-
expect.hasAssertions();
|
|
127
|
-
try {
|
|
128
|
-
await client.post('/hello', null);
|
|
129
|
-
}
|
|
130
|
-
catch (err) {
|
|
131
|
-
expect(err.message).toEqual('Oh no');
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
describe('when called the server replys with an error', () => {
|
|
136
|
-
beforeEach(() => {
|
|
137
|
-
scope.post('/hello')
|
|
138
|
-
.reply(500, {
|
|
139
|
-
message: 'Oh no',
|
|
140
|
-
error: 1232
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
it('should reject with invalid error', async () => {
|
|
144
|
-
expect.hasAssertions();
|
|
145
|
-
try {
|
|
146
|
-
await client.post('/hello', null);
|
|
147
|
-
}
|
|
148
|
-
catch (err) {
|
|
149
|
-
expect(err.message).toEqual('Oh no');
|
|
150
|
-
expect(err.error).toEqual(1232);
|
|
151
|
-
expect(err.code).toEqual(1232);
|
|
152
|
-
expect(err.statusCode).toEqual(1232);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
describe('when called the server replys and the error is a string', () => {
|
|
157
|
-
beforeEach(() => {
|
|
158
|
-
scope.post('/hello')
|
|
159
|
-
.reply(428, {
|
|
160
|
-
error: 'Uh-oh here is an error'
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
it('should reject with invalid error', async () => {
|
|
164
|
-
expect.hasAssertions();
|
|
165
|
-
try {
|
|
166
|
-
await client.post('/hello', null);
|
|
167
|
-
}
|
|
168
|
-
catch (err) {
|
|
169
|
-
expect(err.message).toEqual('Uh-oh here is an error');
|
|
170
|
-
expect(err.error).toEqual(428);
|
|
171
|
-
expect(err.code).toEqual(428);
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
describe('when called the server replys with empty error', () => {
|
|
176
|
-
beforeEach(() => {
|
|
177
|
-
scope.post('/hello')
|
|
178
|
-
.reply(500);
|
|
179
|
-
});
|
|
180
|
-
it('should reject with invalid error', async () => {
|
|
181
|
-
expect.hasAssertions();
|
|
182
|
-
try {
|
|
183
|
-
await client.post('/hello', null);
|
|
184
|
-
}
|
|
185
|
-
catch (err) {
|
|
186
|
-
expect(err.message).toEqual('Internal Server Error');
|
|
187
|
-
expect(err.error).toEqual(500);
|
|
188
|
-
expect(err.code).toEqual(500);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
describe('when called the server replys with an string error', () => {
|
|
193
|
-
beforeEach(() => {
|
|
194
|
-
scope.post('/hello')
|
|
195
|
-
.reply(500, 'Oh no');
|
|
196
|
-
});
|
|
197
|
-
it('should reject with invalid error', async () => {
|
|
198
|
-
expect.hasAssertions();
|
|
199
|
-
try {
|
|
200
|
-
await client.post('/hello', null);
|
|
201
|
-
}
|
|
202
|
-
catch (err) {
|
|
203
|
-
expect(err.message).toEqual('Oh no');
|
|
204
|
-
expect(err.error).toEqual(500);
|
|
205
|
-
expect(err.code).toEqual(500);
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
describe('when called with a valid path', () => {
|
|
210
|
-
const data = { example: 'hello' };
|
|
211
|
-
beforeEach(() => {
|
|
212
|
-
scope.post('/hello')
|
|
213
|
-
.reply(200, data);
|
|
214
|
-
});
|
|
215
|
-
it('should resolve with the response from the server', async () => {
|
|
216
|
-
const results = await client.post('/hello', null, {});
|
|
217
|
-
expect(results).toEqual(data);
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
describe('when called with a path and query', () => {
|
|
221
|
-
const data = { example: 'hello' };
|
|
222
|
-
beforeEach(() => {
|
|
223
|
-
scope.post('/hello', { hello: true })
|
|
224
|
-
.reply(200, data);
|
|
225
|
-
});
|
|
226
|
-
it('should resolve with the response from the server', async () => {
|
|
227
|
-
const results = await client.post('/hello', { hello: true }, {});
|
|
228
|
-
expect(results).toEqual({ example: 'hello' });
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
describe('when called with a path and body', () => {
|
|
232
|
-
const data = { example: 'hello' };
|
|
233
|
-
const strData = JSON.stringify(data);
|
|
234
|
-
beforeEach(() => {
|
|
235
|
-
scope.post('/hello', strData)
|
|
236
|
-
.reply(200, data);
|
|
237
|
-
});
|
|
238
|
-
it('should resolve with the response from the server', async () => {
|
|
239
|
-
const results = await client.post('/hello', null, {
|
|
240
|
-
body: strData,
|
|
241
|
-
responseType: 'text'
|
|
242
|
-
});
|
|
243
|
-
expect(results).toEqual(strData);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
describe('when called with a path and headers', () => {
|
|
247
|
-
beforeEach(() => {
|
|
248
|
-
scope.post('/hello', { hello: true })
|
|
249
|
-
.reply(200, { example: 'hello' });
|
|
250
|
-
});
|
|
251
|
-
it('should resolve with the response from the server', async () => {
|
|
252
|
-
const results = await client.post('/hello', { hello: true }, {
|
|
253
|
-
headers: {
|
|
254
|
-
SomeHeader: 'hi'
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
expect(results).toEqual({ example: 'hello' });
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
describe('when called with a path and a buffer', () => {
|
|
261
|
-
const response = { message: 'response-hello' };
|
|
262
|
-
const strData = JSON.stringify(response);
|
|
263
|
-
beforeEach(() => {
|
|
264
|
-
scope.post('/hello', 'hello')
|
|
265
|
-
.reply(200, response);
|
|
266
|
-
});
|
|
267
|
-
it('should resolve with the response from the server', async () => {
|
|
268
|
-
const results = await client.post('/hello', Buffer.from('hello'), {
|
|
269
|
-
responseType: 'text'
|
|
270
|
-
});
|
|
271
|
-
expect(results).toEqual(strData);
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
describe('->put', () => {
|
|
276
|
-
describe('when called with nothing', () => {
|
|
277
|
-
it('should reject with a empty path message', async () => {
|
|
278
|
-
expect.hasAssertions();
|
|
279
|
-
try {
|
|
280
|
-
// @ts-expect-error
|
|
281
|
-
await client.put();
|
|
282
|
-
}
|
|
283
|
-
catch (err) {
|
|
284
|
-
expect(err.message).toEqual('endpoint must not be empty');
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
describe('when called with a non-string value', () => {
|
|
289
|
-
it('should reject with invalid endpoint error', async () => {
|
|
290
|
-
expect.hasAssertions();
|
|
291
|
-
try {
|
|
292
|
-
// @ts-expect-error
|
|
293
|
-
await client.put({ hello: 'hi' });
|
|
294
|
-
}
|
|
295
|
-
catch (err) {
|
|
296
|
-
expect(err.message).toEqual('endpoint must be a string');
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
describe('when called with a path and body', () => {
|
|
301
|
-
const data = { example: 'hello' };
|
|
302
|
-
beforeEach(() => {
|
|
303
|
-
scope.put('/hello', { hello: true })
|
|
304
|
-
.reply(200, data);
|
|
305
|
-
});
|
|
306
|
-
it('should resolve with the response from the server', async () => {
|
|
307
|
-
const results = await client.put('/hello', { hello: true });
|
|
308
|
-
expect(results).toEqual(data);
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
describe('when called with a path and data', () => {
|
|
312
|
-
const data = { example: 'hello' };
|
|
313
|
-
beforeEach(() => {
|
|
314
|
-
scope.put('/hello', { hello: true })
|
|
315
|
-
.reply(200, data);
|
|
316
|
-
});
|
|
317
|
-
it('should resolve with the response from the server', async () => {
|
|
318
|
-
const results = await client.put('/hello', { hello: true });
|
|
319
|
-
expect(results).toEqual(data);
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
describe('->delete', () => {
|
|
324
|
-
describe('when called with nothing', () => {
|
|
325
|
-
it('should reject with a empty path message', async () => {
|
|
326
|
-
expect.hasAssertions();
|
|
327
|
-
try {
|
|
328
|
-
// @ts-expect-error
|
|
329
|
-
await client.delete();
|
|
330
|
-
}
|
|
331
|
-
catch (err) {
|
|
332
|
-
expect(err.message).toEqual('endpoint must not be empty');
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
});
|
|
336
|
-
describe('when called with a non-string value', () => {
|
|
337
|
-
it('should reject with invalid endpoint error', async () => {
|
|
338
|
-
expect.hasAssertions();
|
|
339
|
-
try {
|
|
340
|
-
// @ts-expect-error
|
|
341
|
-
await client.delete({ hello: 'hi' });
|
|
342
|
-
}
|
|
343
|
-
catch (err) {
|
|
344
|
-
expect(err.message).toEqual('endpoint must be a string');
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
describe('when called with a valid path', () => {
|
|
349
|
-
const response = { _id: 'someID' };
|
|
350
|
-
beforeEach(() => {
|
|
351
|
-
scope.delete('/hello')
|
|
352
|
-
.reply(200, response);
|
|
353
|
-
});
|
|
354
|
-
it('should resolve with the response from the server', async () => {
|
|
355
|
-
const results = await client.delete('/hello');
|
|
356
|
-
expect(results).toEqual(response);
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
describe('when called with a path and query', () => {
|
|
360
|
-
const response = { _id: 'someID' };
|
|
361
|
-
beforeEach(() => {
|
|
362
|
-
scope.delete('/hello')
|
|
363
|
-
.query({ hello: true })
|
|
364
|
-
.reply(200, response);
|
|
365
|
-
});
|
|
366
|
-
it('should resolve with the response from the server', async () => {
|
|
367
|
-
const results = await client.delete('/hello', { searchParams: { hello: 'true' } });
|
|
368
|
-
expect(results).toEqual(response);
|
|
369
|
-
});
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
});
|
|
373
|
-
});
|
|
374
|
-
//# sourceMappingURL=client-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-spec.js","sourceRoot":"","sources":["../../test/client-spec.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,eAAe,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;QACjD,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAC1B,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;YAC7D,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uCAAuC,EAAE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kD,EAAE,KAAK,IAAI,EAAE;oBAC9D,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;oBACnF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-spec.d.ts","sourceRoot":"","sources":["../../test/cluster-spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import nock from 'nock';
|
|
2
|
-
import Cluster from '../src/cluster.js';
|
|
3
|
-
describe('Teraslice Cluster', () => {
|
|
4
|
-
let cluster;
|
|
5
|
-
let scope;
|
|
6
|
-
beforeEach(() => {
|
|
7
|
-
cluster = new Cluster({
|
|
8
|
-
baseUrl: 'http://teraslice.example.dev',
|
|
9
|
-
});
|
|
10
|
-
scope = nock('http://teraslice.example.dev/v1');
|
|
11
|
-
});
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
nock.cleanAll();
|
|
14
|
-
});
|
|
15
|
-
describe('->state', () => {
|
|
16
|
-
describe('when called with nothing', () => {
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
scope.get('/cluster/state')
|
|
19
|
-
.reply(200, { stateResponse: true });
|
|
20
|
-
});
|
|
21
|
-
it('should resolve the json results from Teraslice', async () => {
|
|
22
|
-
const results = await cluster.state();
|
|
23
|
-
expect(results).toEqual({ stateResponse: true });
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
describe('->stats', () => {
|
|
28
|
-
describe('when called with nothing', () => {
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
scope.get('/cluster/stats')
|
|
31
|
-
.reply(200, { statsResponse: true });
|
|
32
|
-
});
|
|
33
|
-
it('should resolve the json results from Teraslice', async () => {
|
|
34
|
-
const results = await cluster.stats();
|
|
35
|
-
expect(results).toEqual({ statsResponse: true });
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
describe('->slicers', () => {
|
|
40
|
-
describe('when called with nothing', () => {
|
|
41
|
-
beforeEach(() => {
|
|
42
|
-
scope.get('/cluster/slicers')
|
|
43
|
-
.reply(200, { slicerResponse: true });
|
|
44
|
-
});
|
|
45
|
-
it('should resolve the json results from Teraslice', async () => {
|
|
46
|
-
const results = await cluster.slicers();
|
|
47
|
-
expect(results).toEqual({ slicerResponse: true });
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe('->txt', () => {
|
|
52
|
-
beforeEach(() => {
|
|
53
|
-
scope = nock('http://teraslice.example.dev/');
|
|
54
|
-
});
|
|
55
|
-
describe('when called with workers', () => {
|
|
56
|
-
beforeEach(() => {
|
|
57
|
-
scope.get('/txt/workers')
|
|
58
|
-
.reply(200, 'workers-txt-response');
|
|
59
|
-
});
|
|
60
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
61
|
-
const results = await cluster.txt('workers');
|
|
62
|
-
expect(results).toEqual('workers-txt-response');
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('when called with nodes', () => {
|
|
66
|
-
beforeEach(() => {
|
|
67
|
-
scope.get('/txt/nodes')
|
|
68
|
-
.reply(200, 'nodes-txt-response');
|
|
69
|
-
});
|
|
70
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
71
|
-
const results = await cluster.txt('nodes');
|
|
72
|
-
expect(results).toEqual('nodes-txt-response');
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
describe('when called with jobs', () => {
|
|
76
|
-
beforeEach(() => {
|
|
77
|
-
scope.get('/txt/jobs')
|
|
78
|
-
.reply(200, 'jobs-txt-response');
|
|
79
|
-
});
|
|
80
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
81
|
-
const results = await cluster.txt('jobs');
|
|
82
|
-
expect(results).toEqual('jobs-txt-response');
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
describe('when called with ex', () => {
|
|
86
|
-
beforeEach(() => {
|
|
87
|
-
scope.get('/txt/ex')
|
|
88
|
-
.reply(200, 'ex-txt-response');
|
|
89
|
-
});
|
|
90
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
91
|
-
const results = await cluster.txt('ex');
|
|
92
|
-
expect(results).toEqual('ex-txt-response');
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
describe('when called with slicers', () => {
|
|
96
|
-
beforeEach(() => {
|
|
97
|
-
scope.get('/txt/slicers')
|
|
98
|
-
.reply(200, 'slicers-txt-response');
|
|
99
|
-
});
|
|
100
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
101
|
-
const results = await cluster.txt('slicers');
|
|
102
|
-
expect(results).toEqual('slicers-txt-response');
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
describe('when called with assets', () => {
|
|
106
|
-
beforeEach(() => {
|
|
107
|
-
scope.get('/txt/assets')
|
|
108
|
-
.reply(200, 'assets-txt-response');
|
|
109
|
-
});
|
|
110
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
111
|
-
const results = await cluster.txt('assets');
|
|
112
|
-
expect(results).toEqual('assets-txt-response');
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
describe('when called with assets/assetName', () => {
|
|
116
|
-
beforeEach(() => {
|
|
117
|
-
scope.get('/txt/assets/assetName')
|
|
118
|
-
.reply(200, 'assets-txt-response');
|
|
119
|
-
});
|
|
120
|
-
it('should resolve the plain test results from Teraslice', async () => {
|
|
121
|
-
const results = await cluster.txt('assets/assetName');
|
|
122
|
-
expect(results).toEqual('assets-txt-response');
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
describe('when called with a invalid type', () => {
|
|
126
|
-
beforeEach(() => {
|
|
127
|
-
scope.get('/txt/invalid')
|
|
128
|
-
.reply(404);
|
|
129
|
-
});
|
|
130
|
-
it('should reject with invalid type', async () => {
|
|
131
|
-
expect.hasAssertions();
|
|
132
|
-
const errMsg = '"invalid" is not a valid type. Must be one of ["assets","slicers","ex","jobs","nodes","workers"]';
|
|
133
|
-
try {
|
|
134
|
-
await cluster.txt('invalid');
|
|
135
|
-
}
|
|
136
|
-
catch (err) {
|
|
137
|
-
expect(err.message).toEqual(errMsg);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
//# sourceMappingURL=cluster-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-spec.js","sourceRoot":"","sources":["../../test/cluster-spec.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,MAAM,mBAAmB,CAAC;AAExC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC/B,IAAI,OAAgB,CAAC;IACrB,IAAI,KAAiB,CAAC;IAEtB,UAAU,CAAC,GAAG,EAAE;QACZ,OAAO,GAAG,IAAI,OAAO,CAAC;YAClB,OAAO,EAAE,8BAA8B;SAC1C,CAAC,CAAC;QACH,KAAK,GAAG,IAAI,CAAC,iCAAiC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;YACtC,UAAU,CAAC,GAAG,EAAE;gBACZ,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC;qBACtB,KAAK,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAA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