Skip to content

Commit e19751a

Browse files
committed
feat: analytics engine v3 feature changes
feat: analytics engine v3 feature changes
1 parent 39feb3b commit e19751a

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

test/integration/ibm-analytics-engine-api.v2.test.js

+20-15
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
const IbmAnalyticsEngineApiV2 = require('../../dist/ibm-analytics-engine-api/v2');
44
const { IamAuthenticator } = require('../../dist/auth');
5-
const authHelper = require('../resources/auth.js');
6-
// const describe = authHelper.describe; // this runs describe.skip if there is no auth.js file :)
7-
const timeout = 20000; // jest timeout in ms
5+
const authHelper = require('../resources/auth-helper.js');
6+
const describe = authHelper.describe; // this runs describe.skip if there is no auth.js file :)
7+
const timeout= 20000; // jest timeout in ms
88

99
describe('IBM Analytics Engine ApiV2 integration', () => {
10-
const options = authHelper.ibm_analytics_engine_api_v2;
11-
options.authenticator = new IamAuthenticator({ apikey: options.apikey });
12-
const instanceGuid = options.instance_guid;
10+
const options = authHelper.auth.ibm_analytics_engine_api_v2;
11+
options.authenticator = new IamAuthenticator({apikey: options.apikey});
12+
const instanceGuid = options.instanceGuid;
1313

1414
const IbmAnalyticsEngineServiceClient = new IbmAnalyticsEngineApiV2(options);
15-
jest.setTimeout(timeout);
15+
jest. setTimeout(timeout);
1616

1717
// nested describe statements are helpful when organizing multiple categories of an api
1818
describe('analyticsEngines', () => {
19-
// let resourceId;
19+
let resourceId;
2020

2121
it('getAnalyticsEngineById', async done => {
2222
const params = {
23-
instanceGuid: instanceGuid,
23+
instanceGuid: instanceGuid
2424
};
2525

2626
let response;
@@ -29,13 +29,14 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
2929
} catch (err) {
3030
done(err);
3131
}
32+
3233
expect(response.status).toEqual(200);
3334
done();
3435
});
3536

3637
it('getAnalyticsEngineStateById', async done => {
3738
const params = {
38-
instanceGuid: instanceGuid,
39+
instanceGuid: instanceGuid
3940
};
4041

4142
let response;
@@ -44,11 +45,13 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
4445
} catch (err) {
4546
done(err);
4647
}
48+
4749
expect(response.status).toEqual(200);
4850
done();
4951
});
5052

5153
it('createCustomizationRequest', async done => {
54+
5255
// AnalyticsEngineCustomActionScript
5356
const analyticsEngineCustomActionScriptModel = {
5457
source_type: 'http',
@@ -85,7 +88,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
8588

8689
it('getAllCustomizationRequests', async done => {
8790
const params = {
88-
instanceGuid: instanceGuid,
91+
instanceGuid: instanceGuid
8992
};
9093

9194
let response;
@@ -100,7 +103,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
100103
});
101104

102105
it('getCustomizationRequestById', async done => {
103-
const params = {
106+
var params = {
104107
instanceGuid: instanceGuid,
105108
};
106109

@@ -142,7 +145,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
142145

143146
it('resetClusterPassword', async done => {
144147
const params = {
145-
instanceGuid: instanceGuid,
148+
instanceGuid: instanceGuid
146149
};
147150

148151
let response;
@@ -193,7 +196,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
193196

194197
it('getLoggingConfig', async done => {
195198
const params = {
196-
instanceGuid: instanceGuid,
199+
instanceGuid: instanceGuid
197200
};
198201

199202
let response;
@@ -209,7 +212,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
209212

210213
it('deleteLoggingConfig', async done => {
211214
const params = {
212-
instanceGuid: instanceGuid,
215+
instanceGuid: instanceGuid
213216
};
214217

215218
let response;
@@ -223,6 +226,7 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
223226
done();
224227
});
225228

229+
226230
it('updatePrivateEndpointWhitelist', async done => {
227231
const ipRanges = ['testString'];
228232
const action = 'add';
@@ -244,3 +248,4 @@ describe('IBM Analytics Engine ApiV2 integration', () => {
244248
});
245249
});
246250
});
251+

0 commit comments

Comments
 (0)