Skip to content

Commit 3933d08

Browse files
committed
fix: 增加单测
1 parent c0aef24 commit 3933d08

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test/test.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,3 +6919,37 @@ group('returnBody', function () {
69196919
);
69206920
});
69216921
});
6922+
6923+
6924+
group('EnableLog', function () {
6925+
test('EnableLog uploadFile', function (done) {
6926+
const cos = new COS({
6927+
// 必选参数
6928+
SecretId: config.SecretId,
6929+
SecretKey: config.SecretKey,
6930+
EnableLog: true,
6931+
});
6932+
cos.uploadFile(
6933+
{
6934+
Bucket: config.Bucket,
6935+
Region: config.Region,
6936+
Key: '2mb.zip',
6937+
Body: util.createFile({ size: 1024 * 1024 * 2 }),
6938+
ChunkSize: 1024 * 1024,
6939+
},
6940+
function (err, data) {
6941+
cos.getObject(
6942+
{
6943+
Bucket: config.Bucket,
6944+
Region: config.Region,
6945+
Key: '1mb.zip',
6946+
},
6947+
function (err, data) {
6948+
assert.ok(data);
6949+
done();
6950+
}
6951+
);
6952+
}
6953+
);
6954+
});
6955+
});

0 commit comments

Comments
 (0)