@@ -24,10 +24,10 @@ public class WorkspaceTest
2424 {
2525 private const string SETUP = @"
2626Live tests require you to configure your environment with these variables:
27- * AZUREQUANTUM_WORKSPACE_NAME : the name of an Azure Quantum workspace to use for live testing.
28- * AZUREQUANTUM_SUBSCRIPTION_ID : the Azure Quantum workspace's Subscription Id.
29- * AZUREQUANTUM_WORKSPACE_RG : the Azure Quantum workspace's resource group.
30- * AZUREQUANTUM_WORKSPACE_LOCATION : the Azure Quantum workspace's location (region).
27+ * AZURE_QUANTUM_WORKSPACE_NAME : the name of an Azure Quantum workspace to use for live testing.
28+ * AZURE_QUANTUM_SUBSCRIPTION_ID : the Azure Quantum workspace's Subscription Id.
29+ * AZURE_QUANTUM_WORKSPACE_RG : the Azure Quantum workspace's resource group.
30+ * AZURE_QUANTUM_WORKSPACE_LOCATION : the Azure Quantum workspace's location (region).
3131
3232We'll also try to authenticate with Azure using an instance of DefaultCredential. See
3333https://docs.microsoft.com/en-us/dotnet/api/overview/azure/identity-readme#authenticate-the-client
@@ -187,24 +187,24 @@ private static void AssertJob(CloudJob job)
187187
188188 private IWorkspace GetLiveWorkspace ( )
189189 {
190- if ( string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_SUBSCRIPTION_ID " ) ) ||
191- string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_WORKSPACE_RG " ) ) ||
192- string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_WORKSPACE_NAME " ) ) ||
193- string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_SUBSCRIPTION_ID " ) ) )
190+ if ( string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_SUBSCRIPTION_ID " ) ) ||
191+ string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_WORKSPACE_RG " ) ) ||
192+ string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_WORKSPACE_NAME " ) ) ||
193+ string . IsNullOrWhiteSpace ( System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_SUBSCRIPTION_ID " ) ) )
194194 {
195195 Assert . Inconclusive ( SETUP ) ;
196196 }
197197
198198 var options = new QuantumJobClientOptions ( ) ;
199- options . Diagnostics . ApplicationId = "ClientTests" ;
199+ options . Diagnostics . ApplicationId = Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_NET_APPID" ) ?? "ClientTests" ;
200200
201201 var credential = Authentication . CredentialFactory . CreateCredential ( Authentication . CredentialType . Default ) ;
202202
203203 return new Workspace (
204- subscriptionId : System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_SUBSCRIPTION_ID " ) ,
205- resourceGroupName : System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_WORKSPACE_RG " ) ,
206- workspaceName : System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_WORKSPACE_NAME " ) ,
207- location : System . Environment . GetEnvironmentVariable ( "AZUREQUANTUM_WORKSPACE_LOCATION " ) ,
204+ subscriptionId : System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_SUBSCRIPTION_ID " ) ,
205+ resourceGroupName : System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_WORKSPACE_RG " ) ,
206+ workspaceName : System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_WORKSPACE_NAME " ) ,
207+ location : System . Environment . GetEnvironmentVariable ( "AZURE_QUANTUM_WORKSPACE_LOCATION " ) ,
208208 options : options ,
209209 credential : credential ) ;
210210 }
0 commit comments