Skip to content

Commit

Permalink
Re-enable route backbeat tests
Browse files Browse the repository at this point in the history
- Update old ones
- Fix some tests not compatible with existing code, after
  confirming the changes were expected
- Do not run the tests with azure/aws real backend in some cases,
  because the backends are either not healthy, or the tests
  doesn't work. To be done separately.

Issue: CLDSRV-591
  • Loading branch information
williamlardier committed Dec 12, 2024
1 parent 9481e78 commit d8cd2e4
Show file tree
Hide file tree
Showing 4 changed files with 1,074 additions and 1,057 deletions.
2 changes: 0 additions & 2 deletions tests/functional/aws-node-sdk/lib/utility/bucket-util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const bluebird = require('bluebird');
const AWS = require('aws-sdk');
AWS.config.logger = console;
const { S3 } = require('aws-sdk');
const projectFixture = require('../fixtures/project');
const getConfig = require('../../test/support/config');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function testSuite() {
assert.equal(err, null, 'Expected success ' +
`but got error ${err}`);
setTimeout(() => azureClient.getContainerClient(azureContainerName)
.getProperties(keyName)
.getBlobClient(keyName).getProperties()
.then(() => assert.fail('Expected error'), err => {
assert.strictEqual(err.statusCode, 404);
assert.strictEqual(err.code, 'NotFound');
Expand Down Expand Up @@ -112,13 +112,13 @@ function testSuite() {
assert.equal(err, null, 'Expected success ' +
`but got error ${err}`);
setTimeout(() =>
azureClient.getContainerClient(azureContainerName)
.getProperties(`${azureContainerName}/${this.test.azureObject}`)
.then(() => assert.fail('Expected error'), err => {
assert.strictEqual(err.statusCode, 404);
assert.strictEqual(err.code, 'NotFound');
return done();
}), azureTimeout);
azureClient.getContainerClient(azureContainerName)
.getBlobClient(`${azureContainerName}/${this.test.azureObject}`).getProperties()
.then(() => assert.fail('Expected error'), err => {
assert.strictEqual(err.statusCode, 404);
assert.strictEqual(err.code, 'NotFound');
return done();
}), azureTimeout);
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let bucketUtil;
let s3;

function azureCheck(container, key, expected, cb) {
azureClient.getContainerClient(container).getProperties(key).then(res => {
azureClient.getContainerClient(container).getBlobClient(key).getProperties().then(res => {
assert.ok(!expected.error);
const convertedMD5 = convertMD5(res.contentSettings.contentMD5);
assert.strictEqual(convertedMD5, expectedMD5);
Expand Down
Loading

0 comments on commit d8cd2e4

Please sign in to comment.