Make sure AAD token is passed down. (#751)

This commit is contained in:
Andres Paz 2021-06-22 19:29:52 -07:00 коммит произвёл GitHub
Родитель ce8c50ffc7
Коммит e63c06bfd0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 10 добавлений и 0 удалений

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

@ -569,6 +569,7 @@ let ``Submit uses default values`` () =
Base URI:
Location: myLocation
Credential: Default
AadToken:
Job Name:
Shots: 500
Output: FriendlyUri
@ -589,6 +590,7 @@ let ``Submit uses default values with default target`` () =
Base URI:
Location: myLocation
Credential: Default
AadToken:
Job Name:
Shots: 500
Output: FriendlyUri
@ -621,6 +623,7 @@ let ``Submit allows overriding default values`` () =
Base URI:
Location: myLocation
Credential: CLI
AadToken: myTok
Job Name: myJobName
Shots: 750
Output: FriendlyUri
@ -657,6 +660,7 @@ let ``Submit extracts the location from a quantum endpoint`` () =
Base URI: https://westus.quantum.microsoft.com/
Location: westus
Credential: VisualStudio
AadToken: myTok
Job Name: myJobName
Shots: 750
Output: FriendlyUri
@ -689,6 +693,7 @@ let ``Submit allows overriding default values with default target`` () =
Base URI:
Location: myLocation
Credential: Interactive
AadToken: myTok
Job Name: myJobName
Shots: 750
Output: FriendlyUri
@ -724,6 +729,7 @@ let ``Submit allows to include --base-uri option when --location is not present`
Base URI: http://mybaseuri.foo.com/
Location: mybaseuri
Credential: Default
AadToken:
Job Name:
Shots: 500
Output: FriendlyUri
@ -746,6 +752,7 @@ let ``Submit allows to include --location option when --base-uri is not present`
Base URI:
Location: myLocation
Credential: Default
AadToken:
Job Name:
Shots: 500
Output: FriendlyUri
@ -772,6 +779,7 @@ let ``Submit allows spaces for the --location option`` () =
Base URI:
Location: My Location
Credential: Default
AadToken:
Job Name:
Shots: 500
Output: FriendlyUri

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

@ -346,6 +346,7 @@ namespace Microsoft.Quantum.EntryPointDriver
$"Base URI: {BaseUri}",
$"Location: {Location ?? ExtractLocation(BaseUri)}",
$"Credential: {Credential}",
$"AadToken: {AadToken?.Substring(0, 5)}",
$"Job Name: {JobName}",
$"Shots: {Shots}",
$"Output: {Output}",

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

@ -470,6 +470,7 @@ namespace Microsoft.Quantum.EntryPointDriver
Workspace = azureSettings.Workspace,
Target = DefaultIfShadowed(entryPoint, TargetOption, azureSettings.Target),
Storage = DefaultIfShadowed(entryPoint, StorageOption, azureSettings.Storage),
AadToken = DefaultIfShadowed(entryPoint, AadTokenOption, azureSettings.AadToken),
BaseUri = DefaultIfShadowed(entryPoint, BaseUriOption, azureSettings.BaseUri),
Location = DefaultIfShadowed(entryPoint, LocationOption, azureSettings.Location),
Credential = DefaultIfShadowed(entryPoint, CredentialOption, azureSettings.Credential),