Skip to content

Commit

Permalink
Fix test issues which are caused by short expiry time
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaZhu authored and vinjiang committed May 20, 2021
1 parent 9c9e1ef commit bb8550b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Note: This is an Azure Storage only package. The all up Azure node sdk still has the old storage bits in there. In a future release, those storage bits will be removed and an npm dependency to this storage node sdk will
be taken. This is a GA release and the changes described below indicate the changes from the Azure node SDK 0.9.8 available here - https://github.com/Azure/azure-sdk-for-node.

2020.04 Version 2.10.4
2020.05 Version 2.10.4

* Upgraded underscore to 1.12.1.
* Upgraded `underscore` to 1.12.1.
* Added `host` property to `StorageServiceClient`.

2019.04 Version 2.10.3

Expand Down
6 changes: 3 additions & 3 deletions test/services/blob/blobservice-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1103,8 +1103,8 @@ describe('BlobService', function () {
assert.equal(error, null);
assert.equal(result.entries.length, 1);
assert.notEqual(result.entries[0], undefined);
assert.ok(result.entries[0].remainingRetentionDays !== undefined);
assert.equal(result.entries[0].deleted, true);
assert.equal(result.entries[0].remainingRetentionDays === softdeleteDays || result.entries[0].remainingRetentionDays === softdeleteDays - 1, true);
assert.notEqual(result.entries[0].deletedTime, undefined);
assert.equal(result.entries[0].deletedTime.length > 0, true);
done();
Expand Down Expand Up @@ -2171,7 +2171,7 @@ describe('BlobService', function () {
var sharedAccessPolicy = {
AccessPolicy: {
Permissions: BlobUtilities.SharedAccessPermissions.READ,
Expiry: new Date('October 12, 2020 11:53:40 am GMT'),
Expiry: new Date('October 12, 2022 11:53:40 am GMT'),
}
};

Expand Down Expand Up @@ -2199,7 +2199,7 @@ describe('BlobService', function () {
var sharedAccessPolicy = {
AccessPolicy: {
Permissions: BlobUtilities.SharedAccessPermissions.READ,
Expiry: new Date('October 12, 2020 11:53:40 am GMT'),
Expiry: new Date('October 12, 2022 11:53:40 am GMT'),
}
};

Expand Down
6 changes: 3 additions & 3 deletions test/services/file/fileservice-file-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,14 +891,14 @@ describe('File', function () {

var sourceSharedAccessPolicy = {
AccessPolicy: {
Expiry: new Date('February 12, 2020 11:03:40 am GMT'),
Expiry: new Date('February 12, 2022 11:03:40 am GMT'),
Permissions: 'r'
}
};

var destSharedAccessPolicy = {
AccessPolicy: {
Expiry: new Date('February 12, 2020 11:03:40 am GMT'),
Expiry: new Date('February 12, 2022 11:03:40 am GMT'),
Permissions: 'rwd'
}
};
Expand Down Expand Up @@ -961,7 +961,7 @@ describe('File', function () {
var sasTestFileNameWithSpecialChar;

var startDate = new Date('May 30, 2015 08:00:00 am GMT');
var expiryDate = new Date('May 30, 2020 08:00:00 am GMT');
var expiryDate = new Date('May 30, 2022 08:00:00 am GMT');
var sharedAccessPolicy = {
AccessPolicy: {
Permissions: FileUtilities.SharedAccessPermissions.READ,
Expand Down
6 changes: 3 additions & 3 deletions test/services/file/fileservice-share-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,21 +586,21 @@ describe('FileShare', function () {
var readWriteSharePolicy = {
AccessPolicy: {
Permissions: 'rw',
Expiry: new Date('2020-10-01')
Expiry: new Date('2022-10-01')
}
};

var readCreateSharePolicy = {
AccessPolicy: {
Permissions: 'rc',
Expiry: new Date('2020-10-01')
Expiry: new Date('2022-10-01')
}
};

var filePolicy = {
AccessPolicy: {
Permissions: 'd',
Expiry: new Date('2020-10-10')
Expiry: new Date('2022-10-10')
}
};

Expand Down

0 comments on commit bb8550b

Please sign in to comment.