File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed
Azure.Health.Deidentification/tests/Tests/Helpers Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -7,26 +7,17 @@ namespace Azure.Health.Deidentification.Tests
77{
88 public class DeidentificationTestEnvironment : TestEnvironment
99 {
10- public string Endpoint => GetRecordedVariable ( "DEID_SERVICE_ENDPOINT" ) ;
11- public string SasUri => GetRecordedVariable ( "SAS_URI" , options => options . IsSecret ( ) ) ;
12-
10+ public string Endpoint => GetRecordedOptionalVariable ( "DEID_SERVICE_ENDPOINT" ) ?? "https://localhost:5020" ;
11+ public string StorageAccountName => GetRecordedOptionalVariable ( "STORAGE_ACCOUNT_NAME" ) ?? "storageAccount" ;
12+ public string StorageContainerName => GetRecordedOptionalVariable ( "STORAGE_CONTAINER_NAME" ) ?? "container" ;
1313 public static string FakeNextLink => "https://localhost:5020/jobs/net-sdk-job-1234/documents?api-version=2024-11-15&maxpagesize=2&continuationToken=1234" ;
1414 public static string FakeStorageLocation => "https://fakeblobstorage.blob.core.windows.net/container" ;
1515 public static string FakeJobName => "net-sdk-job-1234" ;
1616 public static string FakeContinuationTokenSegment => "continuationToken=1234" ;
1717
1818 public string GetStorageAccountLocation ( )
1919 {
20- if ( ! string . IsNullOrEmpty ( SasUri ) )
21- {
22- // In playback mode, the SAS URI is sanitized to avoid sharing secrets.
23- if ( string . Equals ( SasUri , "Sanitized" , System . StringComparison . OrdinalIgnoreCase ) )
24- {
25- return FakeStorageLocation ;
26- }
27- return SasUri ;
28- }
29- return $ "https://{ GetRecordedVariable ( "STORAGE_ACCOUNT_NAME" ) } .blob.core.windows.net/{ GetRecordedVariable ( "STORAGE_CONTAINER_NAME" ) } ";
20+ return $ "https://{ StorageAccountName } .blob.core.windows.net/{ StorageContainerName } ";
3021 }
3122 }
3223}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ $storageAccountName = $DeploymentOutputs['HEALTHDATAAISERVICES_STORAGE_ACCOUNT_N
2121$containerName = $DeploymentOutputs [' HEALTHDATAAISERVICES_STORAGE_CONTAINER_NAME' ]
2222
2323# Set the local folder path to upload
24- $localFolderPath = " $PSScriptRoot \Azure.Health.Deidentification\tests\data \example_patient_1"
24+ $localFolderPath = " $PSScriptRoot \Azure.Health.Deidentification\tests\Data \example_patient_1"
2525
2626# Check if the connection string is present
2727if ([string ]::IsNullOrWhiteSpace($storageAccountName )) {
You can’t perform that action at this time.
0 commit comments