Cleaning up env variables after azure-tests.js

This commit is contained in:
Andre Rodrigues 2012-02-13 18:53:57 -08:00
Родитель e049950872
Коммит af1572c510
1 изменённых файлов: 19 добавлений и 3 удалений

Просмотреть файл

@ -35,7 +35,7 @@ var originalAzureStorageAccount = null;
var originalAzureStorageAccessKey = null;
var originalServiceBusNamespace = null;
var originalServiceBusIssuer = null;
var originalServiceBusPassword = null;
var originalServiceBusAccessKey = null;
var originalWrapNamespace = null;
module.exports = testCase(
@ -62,8 +62,8 @@ module.exports = testCase(
originalServiceBusIssuer = process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ISSUER];
}
if (!originalServiceBusPassword && process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ACCESS_KEY]) {
originalServiceBusPassword = process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ACCESS_KEY];
if (!originalServiceBusAccessKey && process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ACCESS_KEY]) {
originalServiceBusAccessKey = process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ACCESS_KEY];
}
if (!originalWrapNamespace && process.env[ServiceClient.EnvironmentVariables.AZURE_WRAP_NAMESPACE]) {
@ -86,6 +86,22 @@ module.exports = testCase(
process.env[ServiceClient.EnvironmentVariables.AZURE_STORAGE_ACCESS_KEY] = originalAzureStorageAccessKey;
}
if (originalServiceBusNamespace) {
process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_NAMESPACE] = originalServiceBusNamespace;
}
if (originalServiceBusIssuer) {
process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ISSUER] = originalServiceBusIssuer;
}
if (originalServiceBusAccessKey) {
process.env[ServiceClient.EnvironmentVariables.AZURE_SERVICEBUS_ACCESS_KEY] = originalServiceBusAccessKey;
}
if (originalWrapNamespace) {
process.env[ServiceClient.EnvironmentVariables.AZURE_WRAP_NAMESPACE] = originalWrapNamespace;
}
// clean up
callback();
},