Added UserSecrets tool to E2ETests to enable setting up NanoServer related config in a local user secret store

This commit is contained in:
Kiran Challa 2016-05-11 12:22:58 -07:00
parent 3c7cfbf340
commit 5627d00329
2 changed files with 13 additions and 4 deletions

View File

@ -24,6 +24,7 @@ namespace E2ETests
var configuration = new ConfigurationBuilder() var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory()) .SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("remoteDeploymentConfig.json") .AddJsonFile("remoteDeploymentConfig.json")
.AddUserSecrets()
.AddEnvironmentVariables() .AddEnvironmentVariables()
.Build(); .Build();
@ -57,11 +58,11 @@ namespace E2ETests
_remoteDeploymentConfig.FileSharePath, _remoteDeploymentConfig.FileSharePath,
_remoteDeploymentConfig.ServerName, _remoteDeploymentConfig.ServerName,
_remoteDeploymentConfig.AccountName, _remoteDeploymentConfig.AccountName,
_remoteDeploymentConfig.AccountPassword, _remoteDeploymentConfig.AccountPassword)
_remoteDeploymentConfig.ExecutableRelativePath)
{ {
TargetFramework = "netcoreapp1.0", TargetFramework = "netcoreapp1.0",
ApplicationBaseUriHint = applicationBaseUrl ApplicationBaseUriHint = applicationBaseUrl,
ApplicationType = applicationType
}; };
deploymentParameters.EnvironmentVariables.Add( deploymentParameters.EnvironmentVariables.Add(
new KeyValuePair<string, string>("ASPNETCORE_ENVIRONMENT", "SocialTesting")); new KeyValuePair<string, string>("ASPNETCORE_ENVIRONMENT", "SocialTesting"));

View File

@ -17,6 +17,7 @@
"Microsoft.Extensions.Configuration.Binder": "1.0.0-*", "Microsoft.Extensions.Configuration.Binder": "1.0.0-*",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-*", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-*",
"Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*",
"xunit": "2.1.0" "xunit": "2.1.0"
@ -37,5 +38,12 @@
] ]
} }
}, },
"testRunner": "xunit" "tools": {
"Microsoft.Extensions.SecretManager.Tools": {
"version": "1.0.0-*",
"imports": "portable-net451+win8"
}
},
"testRunner": "xunit",
"userSecretsId": "MusicStore.E2ETests"
} }