Skip to content

Commit

Permalink
Merge pull request #342 from jiacfan/master
Browse files Browse the repository at this point in the history
Code changes for version 2.3.0
  • Loading branch information
vinjiang authored Aug 17, 2017
2 parents 1873f8a + bddba29 commit 611a9e9
Show file tree
Hide file tree
Showing 30 changed files with 3,759 additions and 97 deletions.
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install
## Tests

### Running
Unit tests don't require real credentials and don't require any environment varaibles to be set. By default the unit tests are run with Nock recording data.
Unit tests don't require real credentials and don't require any environment variables to be set. By default the unit tests are run with Nock recording data.

If you would like to run the unit test against a live storage account, you will need to setup environment variables which will be used. These test will use these credentials to run live tests against Azure with the provided credentials. Note that you will be charged for storage usage. You need verify the clean up script did its job at the end of a test run.

Expand All @@ -36,7 +36,7 @@ Unit tests can then be run from root directory using:
npm test
```

To run unit tests against a live storage account, please set environment variable to turn off Nock by:
To run unit tests against live storage accounts, please set environment variable to turn off Nock by:

```bash
export NOCK_OFF=true
Expand All @@ -46,12 +46,11 @@ and set up the following environment variables for storage account credentials b

```bash
export AZURE_STORAGE_CONNECTION_STRING="valid storage connection string"
export AZURE_STORAGE_CONNECTION_STRING_PREMIUM_ACCOUNT="optional valid storage connection string for premium storage account"
export AZURE_STORAGE_CONNECTION_STRING_SSE_ENABLED_ACCOUNT="optional valid storage connection string for storage account with storage service encryption enabled"
```
or
```bash
export AZURE_STORAGE_ACCOUNT="valid storage account name"
export AZURE_STORAGE_ACCESS_KEY="valid storage account key"
```

Note: `AZURE_STORAGE_CONNECTION_STRING_PREMIUM_ACCOUNT` and `AZURE_STORAGE_CONNECTION_STRING_SSE_ENABLED_ACCOUNT` are optional settings to enable testing suites related to premium storage account and storage service encryption, and only needed to be set when you are developing related features.

### Testing Features
As you develop a feature, you'll need to write tests to ensure quality. Your changes should be covered by both unit tests. You should also run existing tests related to your change to address any unexpected breaks.
Expand Down
20 changes: 19 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
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.

2017.08 Version 2.3.0

ALL
* Updated storage service version to 2017-04-17. For more information, please see - https://docs.microsoft.com/en-us/rest/api/storageservices/versioning-for-the-azure-storage-services
* Updated the dependency of the 'request' module to avoid security vulnerability: (https://snyk.io/test/npm/azure-storage).
* Added `requestServerEncrypted` property to `ServiceResponse` which indicates if the contents of the request have been successfully encrypted.
* Improved API documentation.

BLOB
* PageBlobs: For Premium Accounts only, added support for getting and setting the tier on a page blob. The tier can also be set when creating or copying from an existing page blob.

FILE
* Added `serverEncryped` property to `FileResult` and `DirectoryResult` which indicates if the file data and application metadata are completely encrypted using the specified algorithm on the server.
* Fixed a TypeScript issue that SharedAccessPermissions for FileUtilities is missing in type definition file.

TABLE
* Fixed a typo in table query example for combineFilters function.

2017.08 Version 2.2.2

ALL
Expand Down Expand Up @@ -135,7 +153,7 @@ ALL

BLOB
* Fixed the issue that the service error message will be written to the destination stream if getting error when downloading the blob to a stream/file.
* Added `serverEncryped` property to 'BlobResult' class which indicates if the blob data and application metadata are completely encrypted using the specified algorithm on the server.
* Added `serverEncryped` property to `BlobResult` class which indicates if the blob data and application metadata are completely encrypted using the specified algorithm on the server.

FILE
* Fixed the issue that the service error message will be written to the destination stream if getting error when downloading the file to a stream/file.
Expand Down
4 changes: 4 additions & 0 deletions browser/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Note: This is the change log file for Azure Storage JavaScript Client Library.

2017.08 Version 0.2.3-preview.9

* Generated browser compatible JavaScript files based on Microsoft Azure Storage SDK for Node.js 2.3.0.

2017.08 Version 0.2.2-preview.8

* Generated browser compatible JavaScript files based on Microsoft Azure Storage SDK for Node.js 2.2.2.
Expand Down
12 changes: 10 additions & 2 deletions lib/common/services/storageserviceclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,21 @@ StorageServiceClient.prototype.withFilter = function (newFilter) {
* @return {Object} A response object.
*/
StorageServiceClient._buildResponse = function (isSuccessful, body, headers, statusCode, md5) {
return {
var response = {
isSuccessful: isSuccessful,
statusCode: statusCode,
body: body,
headers: headers,
md5: md5
};

if (!azureutil.objectIsNull(headers)) {
if (headers[HeaderConstants.REQUEST_SERVER_ENCRYPTED] !== undefined) {
response.requestServerEncrypted = (headers[HeaderConstants.REQUEST_SERVER_ENCRYPTED] === 'true');
}
}

return response;
};

/**
Expand Down Expand Up @@ -1185,7 +1193,7 @@ StorageServiceClient._normalizeError = function (error, response) {
return null;
};

/*
/**
* Sets proxy object specified by caller.
*
* @param {object} proxy proxy to use for tunneling
Expand Down
Loading

0 comments on commit 611a9e9

Please sign in to comment.