Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix UT.

  • Loading branch information...
commit b692d59bf1a04c33f07a0642e6307c6d2b0b8942 1 parent 932a129
@andrerod andrerod authored
View
4 test/services/blob/blobservice-tests.js
@@ -1167,10 +1167,10 @@ suite('blobservice-tests', function () {
var blobServiceassert = azure.createBlobService('storageAccount', 'storageAccessKey', 'host.com:80');
var urlParts = blobServiceassert.getBlobUrl(containerName);
- assert.equal(urlParts.url(), 'http://storageaccount.host.com:80/' + containerName);
+ assert.equal(urlParts.url(), 'http://host.com:80/' + containerName);
urlParts = blobServiceassert.getBlobUrl(containerName, blobName);
- assert.equal(urlParts.url(), 'http://storageaccount.host.com:80/' + containerName + '/' + blobName);
+ assert.equal(urlParts.url(), 'http://host.com:80/' + containerName + '/' + blobName);
done();
});
View
26 test/services/core/storageservicesettings-tests.js
@@ -105,9 +105,9 @@ suite('storageservicesettings-tests', function () {
// Assert
actual._name.should.equal(expectedName);
actual._key.should.equal(expectedKey);
- actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
- actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
- actual._tableEndpointUri.should.equal(expectedTableEndpoint);
+ actual._blobEndpointUri.should.equal(expectedBlobEndpoint + ':443');
+ actual._queueEndpointUri.should.equal(expectedQueueEndpoint + ':443');
+ actual._tableEndpointUri.should.equal(expectedTableEndpoint + ':443');
});
test('testCreateFromConnectionStringWithTableEndpointSpecified', function () {
@@ -126,8 +126,8 @@ suite('storageservicesettings-tests', function () {
// Assert
actual._name.should.equal(expectedName);
actual._key.should.equal(expectedKey);
- actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
- actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
+ actual._blobEndpointUri.should.equal(expectedBlobEndpoint + ':443');
+ actual._queueEndpointUri.should.equal(expectedQueueEndpoint + ':443');
actual._tableEndpointUri.should.equal(expectedTableEndpoint);
});
@@ -148,8 +148,8 @@ suite('storageservicesettings-tests', function () {
actual._name.should.equal(expectedName);
actual._key.should.equal(expectedKey);
actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
- actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
- actual._tableEndpointUri.should.equal(expectedTableEndpoint);
+ actual._queueEndpointUri.should.equal(expectedQueueEndpoint + ':443');
+ actual._tableEndpointUri.should.equal(expectedTableEndpoint + ':443');
});
test('testCreateFromConnectionStringWithQueueEndpointSpecified', function () {
@@ -168,9 +168,9 @@ suite('storageservicesettings-tests', function () {
// Assert
actual._name.should.equal(expectedName);
actual._key.should.equal(expectedKey);
- actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
+ actual._blobEndpointUri.should.equal(expectedBlobEndpoint + ':443');
actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
- actual._tableEndpointUri.should.equal(expectedTableEndpoint);
+ actual._tableEndpointUri.should.equal(expectedTableEndpoint + ':443');
});
test('testCreateFromConnectionStringWithQueueAndBlobEndpointSpecified', function () {
@@ -191,7 +191,7 @@ suite('storageservicesettings-tests', function () {
actual._key.should.equal(expectedKey);
actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
- actual._tableEndpointUri.should.equal(expectedTableEndpoint);
+ actual._tableEndpointUri.should.equal(expectedTableEndpoint + ':443');
});
test('testCreateFromConnectionStringWithAutomaticMissingProtocolFail', function () {
@@ -292,9 +292,9 @@ suite('storageservicesettings-tests', function () {
// Assert
actual._name.should.equal(expectedName);
actual._key.should.equal(expectedKey);
- actual._blobEndpointUri.should.equal(expectedBlobEndpoint);
- actual._queueEndpointUri.should.equal(expectedQueueEndpoint);
- actual._tableEndpointUri.should.equal(expectedTableEndpoint);
+ actual._blobEndpointUri.should.equal(expectedBlobEndpoint + ':443');
+ actual._queueEndpointUri.should.equal(expectedQueueEndpoint + ':443');
+ actual._tableEndpointUri.should.equal(expectedTableEndpoint + ':443');
});
test('getDevelopmentStorageAccount', function () {
View
21 test/services/table/tableservice-tests.js
@@ -51,7 +51,7 @@ var tableNames = [];
var tablePrefix = 'tableservice';
var testPrefix = 'tableservice-tests';
-var numberTests = 20;
+var numberTests = 21;
suite('tableservice-tests', function () {
setup(function (done) {
@@ -830,4 +830,23 @@ suite('tableservice-tests', function () {
done();
});
});
+
+ test('storageConnectionStringsEndpointHttpsExplicit', function (done) {
+ var tableName = testutil.generateId(tablePrefix, tableNames, tabletestutil.isMocked);
+ var expectedName = process.env[ServiceClient.EnvironmentVariables.AZURE_STORAGE_ACCOUNT];
+ var expectedKey = process.env[ServiceClient.EnvironmentVariables.AZURE_STORAGE_ACCESS_KEY];
+ var expectedTableEndpoint = 'http://andrerod.table.core.windows.net';
+ var tableService = azure.createTableService(expectedName, expectedKey, expectedTableEndpoint);
+ tableService.createTable(tableName, function (err) {
+ assert.equal(err, null);
+
+ assert.equal(tableService.storageAccount, expectedName);
+ assert.equal(tableService.storageAccessKey, expectedKey);
+
+ // Explicit table host wins
+ assert.equal(tableService.protocol, 'http://');
+
+ done();
+ });
+ });
});
Please sign in to comment.
Something went wrong with that request. Please try again.