Skip to content

Commit 1d59cd6

Browse files
setup ci
1 parent a0b15ae commit 1d59cd6

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

tests/testApis.test.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import assert from 'assert';
12
import {
23
CloudserverClient,
34
PutDataInput,
@@ -44,19 +45,16 @@ describe('CloudServer API Tests', () => {
4445
}
4546
});
4647

47-
it('should test GetObject', async () => {
48-
try {
49-
const getInput: GetObjectInput = {
50-
Bucket: testConfig.bucketName,
51-
Key: testConfig.objectKey,
52-
RequestUids: '123',
53-
};
54-
const getCommand = new GetObjectCommand(getInput);
55-
const getData = await client.send(getCommand);
56-
console.log('GetObject succeeded:', getData);
57-
} catch (err) {
58-
console.log('GetObject failed:', err);
59-
}
48+
it('should test GetSingleObject', async () => {
49+
const getInput: GetObjectInput = {
50+
Bucket: testConfig.bucketName,
51+
Key: testConfig.objectKey,
52+
RequestUids: '123',
53+
};
54+
const getCommand = new GetObjectCommand(getInput);
55+
const getData = await client.send(getCommand);
56+
console.log('GetObject succeeded:', getData);
57+
assert.equal(await getData.Body.transformToString(), 'Hey!!');
6058
});
6159

6260
it('should test GetObjectList', async () => {

0 commit comments

Comments
 (0)