Skip to content

Commit

Permalink
修改用例顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Feb 5, 2021
1 parent 34d9bc6 commit fc42ef3
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3371,57 +3371,6 @@ group('selectObjectContent(),selectObjectContentStream()', function () {
});
});

group('putBucketVersioning(),getBucketVersioning()', function () {
test('Enabled', function (done, assert) {
cos.deleteBucketReplication({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: "Enabled"
}
}, function (err, data) {
cos.putBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: "Enabled"
}
}, function (err, data) {
setTimeout(function () {
cos.getBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
}, function (err, data) {
assert.ok(data.VersioningConfiguration.Status === 'Enabled');
done();
});
}, 2000);
});
});
});
test('Suspended', function (done, assert) {
cos.putBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: 'Suspended'
}
}, function (err, data) {
assert.ok(!err);
setTimeout(function () {
cos.getBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
}, function (err, data) {
console.log(data.VersioningConfiguration.Status);
assert.ok(data.VersioningConfiguration.Status === 'Suspended');
done();
});
}, 2000);
});
});
});

group('BucketReplication', function () {
var prepared = false;
var repBucket = config.Bucket.replace(/^(.*)(-\d+)$/, '$1-replication$2')
Expand Down Expand Up @@ -3503,6 +3452,57 @@ group('BucketReplication', function () {
});
});

group('putBucketVersioning(),getBucketVersioning()', function () {
test('Enabled', function (done, assert) {
cos.deleteBucketReplication({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: "Enabled"
}
}, function (err, data) {
cos.putBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: "Enabled"
}
}, function (err, data) {
setTimeout(function () {
cos.getBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
}, function (err, data) {
assert.ok(data.VersioningConfiguration.Status === 'Enabled');
done();
});
}, 2000);
});
});
});
test('Suspended', function (done, assert) {
cos.putBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
VersioningConfiguration: {
Status: 'Suspended'
}
}, function (err, data) {
assert.ok(!err);
setTimeout(function () {
cos.getBucketVersioning({
Bucket: config.Bucket,
Region: config.Region,
}, function (err, data) {
console.log(data.VersioningConfiguration.Status);
assert.ok(data.VersioningConfiguration.Status === 'Suspended');
done();
});
}, 2000);
});
});
});

group('BucketOrigin', function () {
test('putBucketOrigin(),getBucketOrigin()', function (done, assert) {
var prefix = Date.now().toString(36) + '/';
Expand Down

0 comments on commit fc42ef3

Please sign in to comment.