@@ -35,11 +35,6 @@ import {
3535import { createTestClient , testConfig } from './testSetup' ;
3636import assert from 'assert' ;
3737
38-
39- //
40- // const AWS = require('aws-sdk');
41- // const { Service } = require('aws-sdk');
42-
4338// Note : these tests are relatively simple, as it's not straightforward to setup
4439// backbeat with locations, and real pause/resume tests scenarios.
4540// The tests in Zenko are also using these apis, and will represent an opportunity to
@@ -122,7 +117,7 @@ describe('CloudServer Check Status API Tests', () => {
122117
123118 it ( 'should test pauseSite' , async ( ) => {
124119 const input : PauseSiteInput = {
125- Site : 'zenko' , // todo : justify
120+ Site : 'zenko' , // Value from backbeat default config.json, destination.bootstrapList
126121 } ;
127122 const cmd = new PauseSiteCommand ( input ) ;
128123 const result = await client . send ( cmd ) ;
@@ -132,7 +127,7 @@ describe('CloudServer Check Status API Tests', () => {
132127 // No site available for ingestion on our test setup
133128 it . skip ( 'should test pauseIngestionSite' , async ( ) => {
134129 const input : PauseIngestionSiteInput = {
135- Site : 'a-zenko-location' ,
130+ Site : 'a-zenko-location' , // Value from backbeat default config.json, extensions.ingestion.sources
136131 } ;
137132 const cmd = new PauseIngestionSiteCommand ( input ) ;
138133 const result = await client . send ( cmd ) ;
@@ -155,7 +150,7 @@ describe('CloudServer Check Status API Tests', () => {
155150
156151 it ( 'should test resumeSite' , async ( ) => {
157152 const input : ResumeSiteInput = {
158- Site : 'zenko' , // todo : justify
153+ Site : 'zenko' ,
159154 } ;
160155 const cmd = new ResumeSiteCommand ( input ) ;
161156 const result = await client . send ( cmd ) ;
@@ -165,7 +160,7 @@ describe('CloudServer Check Status API Tests', () => {
165160 // No site available for ingestion on our test setup
166161 it . skip ( 'should test resumeIngestionSite' , async ( ) => {
167162 const input : ResumeIngestionSiteInput = {
168- Site : 'a-zenko-location' , // todo : justify
163+ Site : 'a-zenko-location' ,
169164 } ;
170165 const cmd = new ResumeIngestionSiteCommand ( input ) ;
171166 const result = await client . send ( cmd ) ;
@@ -175,7 +170,7 @@ describe('CloudServer Check Status API Tests', () => {
175170 it ( 'should test scheduleSiteResume' , async ( ) => {
176171 const bodyData = JSON . stringify ( { hours : 24 } ) ;
177172 const input : ScheduleSiteResumeInput = {
178- Site : 'zenko' , // todo : justify
173+ Site : 'zenko' ,
179174 Body : new TextEncoder ( ) . encode ( bodyData )
180175 } ;
181176 const cmd = new ScheduleSiteResumeCommand ( input ) ;
@@ -187,54 +182,11 @@ describe('CloudServer Check Status API Tests', () => {
187182 it . skip ( 'should test scheduleIngestionSiteResume' , async ( ) => {
188183 const bodyData = JSON . stringify ( { hours : 24 } ) ;
189184 const input : ScheduleIngestionSiteResumeInput = {
190- Site : 'zenko' , // todo : justify
185+ Site : 'zenko' ,
191186 Body : new TextEncoder ( ) . encode ( bodyData )
192187 } ;
193188 const cmd = new ScheduleIngestionSiteResumeCommand ( input ) ;
194189 const result = await client . send ( cmd ) ;
195190 assert . strictEqual ( result . $metadata . httpStatusCode , 200 ) ;
196191 } ) ;
197-
198- // it.skip('test old client', async () => {
199- // AWS.apiLoader.services.backbeat = {};
200- // Object.defineProperty(AWS.apiLoader.services.backbeat, '2017-07-01', {
201- // get: function get() {
202- // const model = require('../legacy/zenko-2018-07-08-json.api.json');
203- // return model;
204- // },
205- // enumerable: true,
206- // configurable: true,
207- // });
208- // const BackbeatClient = Service.defineService('backbeat', ['2017-07-01']);
209-
210- // BackbeatClient.prototype.validateService = function validateService() {
211- // if (!this.config.region) {
212- // this.config.region = 'us-east-1';
213- // }
214- // };
215- // const conf = {
216- // accessKeyId: 'accessKey1',
217- // secretAccessKey: 'verySecretKey1',
218- // endpoint: 'http://localhost:8000',
219- // region: 'us-east-1',
220- // sslEnabled: false,
221- // s3ForcePathStyle: true,
222- // apiVersions: { s3: '2006-03-01' },
223- // signatureVersion: 'v4',
224- // signatureCache: false,
225- // };
226- // const c = new BackbeatClient(conf)
227-
228- // await new Promise((resolve, reject) => {
229- // c.checkConnection({}, (err: any, data: any) => {
230- // if (err) {
231- // console.log('Error:', err);
232- // reject(err);
233- // } else {
234- // console.log('Success:', data);
235- // resolve(data);
236- // }
237- // });
238- // });
239- // });
240192} ) ;
0 commit comments