Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Entra App Secrets from Storage tests #44427

Merged
Merged
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
8ac365e
Removed AAD info from TestConfigurationsTemplate
seanmcc-msft Jun 6, 2024
264fb2a
Re-plumbed Storage tests to rely on TestEnvironment.Credential
seanmcc-msft Jun 6, 2024
1e9ec99
safe state
seanmcc-msft Jun 6, 2024
709b9e0
WIP
seanmcc-msft Jun 6, 2024
1899641
WIP
seanmcc-msft Jun 6, 2024
bb03313
WIP
seanmcc-msft Jun 6, 2024
c6e33a3
Removing public access
seanmcc-msft Jun 6, 2024
e84c94f
Recorded most Queues tests
seanmcc-msft Jun 6, 2024
271542e
All Queues tests
seanmcc-msft Jun 6, 2024
75101dc
Recorded most Files tests
seanmcc-msft Jun 6, 2024
4fa4084
Recorded most Data Lake tests
seanmcc-msft Jun 6, 2024
65180f2
Recorded most Blobs tests
seanmcc-msft Jun 7, 2024
68873aa
Blob Batch tests
seanmcc-msft Jun 7, 2024
5326557
Change Feed tests
seanmcc-msft Jun 7, 2024
98fdf8c
update
seanmcc-msft Jun 7, 2024
3a4d516
Some DM Lib tests
seanmcc-msft Jun 7, 2024
f728c1d
More DM Lib tests
seanmcc-msft Jun 7, 2024
1223160
Hopefully fixed Batch
seanmcc-msft Jun 7, 2024
d194c5e
More files tests
seanmcc-msft Jun 7, 2024
6ed60b5
Fixed Queues tests
seanmcc-msft Jun 7, 2024
c56077e
Fixed Change Feed tests
seanmcc-msft Jun 7, 2024
bde9ade
DM Lib Files tests
seanmcc-msft Jun 7, 2024
50edc49
More Data Lake tests
seanmcc-msft Jun 7, 2024
797f504
Blob tests
seanmcc-msft Jun 7, 2024
757451b
WIP
seanmcc-msft Jun 7, 2024
ff99832
WIP
seanmcc-msft Jun 7, 2024
022f374
WIP
seanmcc-msft Jun 7, 2024
1213858
WIP
seanmcc-msft Jun 7, 2024
2e095ba
WIP
seanmcc-msft Jun 7, 2024
479347c
WIP
seanmcc-msft Jun 7, 2024
400efb1
WIP
seanmcc-msft Jun 7, 2024
4be51aa
Some Blob tests
seanmcc-msft Jun 7, 2024
27051c8
Append Blob tests
seanmcc-msft Jun 7, 2024
bcd54cd
Block Blob tests
seanmcc-msft Jun 7, 2024
0d0e554
Most Page Blob tests
seanmcc-msft Jun 7, 2024
54dbf44
Rest of Page Blob tests
seanmcc-msft Jun 7, 2024
c698b47
Fixed Common tests
seanmcc-msft Jun 7, 2024
c968fb1
File System tests
seanmcc-msft Jun 7, 2024
14933ba
Additional Data Lake tests
seanmcc-msft Jun 7, 2024
1164820
Container tests
seanmcc-msft Jun 7, 2024
9adca65
Bunch of Files tests
seanmcc-msft Jun 7, 2024
e6f6827
Blob tests
seanmcc-msft Jun 7, 2024
0d18ac4
Fixed ImmutableStorageWithVersioningTests
seanmcc-msft Jun 11, 2024
957f560
Update
seanmcc-msft Jun 11, 2024
7e5be3b
Update
seanmcc-msft Jun 11, 2024
410768b
Update
seanmcc-msft Jun 11, 2024
8261cc6
Update
seanmcc-msft Jun 11, 2024
fe05ebe
Update
seanmcc-msft Jun 11, 2024
772395f
Update
seanmcc-msft Jun 11, 2024
838bdbf
Update
seanmcc-msft Jun 11, 2024
53669b2
Update
seanmcc-msft Jun 11, 2024
eaed1ee
Update
seanmcc-msft Jun 11, 2024
c4f8122
Fixed last of DM Lib tests
seanmcc-msft Jun 11, 2024
3c99e30
update
seanmcc-msft Jun 11, 2024
2ebbe82
update
seanmcc-msft Jun 11, 2024
a7daaed
update
seanmcc-msft Jun 11, 2024
b2c8613
update
seanmcc-msft Jun 11, 2024
d6e0c13
update
seanmcc-msft Jun 11, 2024
ce66bd4
update
seanmcc-msft Jun 11, 2024
8ab21c7
update
seanmcc-msft Jun 11, 2024
d2480d7
update
seanmcc-msft Jun 11, 2024
fa2c5ba
update
seanmcc-msft Jun 11, 2024
bc31221
update
seanmcc-msft Jun 11, 2024
2958313
update
seanmcc-msft Jun 11, 2024
2e7b58a
update
seanmcc-msft Jun 11, 2024
9f02fdd
update
seanmcc-msft Jun 11, 2024
6235817
update
seanmcc-msft Jun 11, 2024
55ed614
update
seanmcc-msft Jun 12, 2024
f2c984a
update
seanmcc-msft Jun 12, 2024
dd83cba
update
seanmcc-msft Jun 12, 2024
10bdbdd
update
seanmcc-msft Jun 12, 2024
cdcf588
update
seanmcc-msft Jun 12, 2024
9eca768
update
seanmcc-msft Jun 12, 2024
91f40b9
update
seanmcc-msft Jun 12, 2024
a9ef617
update
seanmcc-msft Jun 12, 2024
e6c7716
update
seanmcc-msft Jun 12, 2024
fbd27c8
update
seanmcc-msft Jun 12, 2024
85e0839
update
seanmcc-msft Jun 12, 2024
611674f
update
seanmcc-msft Jun 12, 2024
e5b9fb7
update
seanmcc-msft Jun 12, 2024
3c9609d
update
seanmcc-msft Jun 12, 2024
b720203
update
seanmcc-msft Jun 12, 2024
b7bf5c9
update
seanmcc-msft Jun 12, 2024
b70d820
update
seanmcc-msft Jun 12, 2024
ae6c8db
updated test-resources-post.ps1
seanmcc-msft Jun 12, 2024
70d989e
updated tests.yaml
seanmcc-msft Jun 12, 2024
2de20fe
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 12, 2024
780b186
Fixed ImmutableStorageWithVersioningTests
seanmcc-msft Jun 12, 2024
cadb5bc
Fixed test
seanmcc-msft Jun 12, 2024
8ce2b99
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 19, 2024
8aa14ef
Update
seanmcc-msft Jun 20, 2024
d6644a0
Revert "Update"
seanmcc-msft Jun 20, 2024
d102a7c
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 20, 2024
c8b7a2e
update
seanmcc-msft Jun 20, 2024
b2f9a0d
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 24, 2024
1e6a410
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 26, 2024
7db0bda
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jun 28, 2024
cba5271
PR comment
seanmcc-msft Jul 1, 2024
0c3ec95
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jul 2, 2024
a0f1cb4
PR comment
seanmcc-msft Jul 2, 2024
364b812
Update sdk/storage/tests.yml
seanmcc-msft Jul 2, 2024
f81361e
Made some tests playback only
seanmcc-msft Jul 2, 2024
9600fb6
Update
seanmcc-msft Jul 2, 2024
c15428d
Update
seanmcc-msft Jul 2, 2024
7874bec
Update
seanmcc-msft Jul 2, 2024
36d03c0
Update
seanmcc-msft Jul 2, 2024
19c21c5
Merge branch 'main' into feature/storage/remoteStorageTestAppSecrets
seanmcc-msft Jul 10, 2024
479a176
Reenabled Immutability Storage with Versioning live tests
seanmcc-msft Jul 11, 2024
66ca87f
Reenabled Managed Disk live tests
seanmcc-msft Jul 11, 2024
d676efe
Fixed last of live base tests
seanmcc-msft Jul 11, 2024
6f392fb
Typo
seanmcc-msft Jul 11, 2024
c5f955a
PR comment
seanmcc-msft Jul 11, 2024
dff53a2
PR comment
seanmcc-msft Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Re-plumbed Storage tests to rely on TestEnvironment.Credential
  • Loading branch information
seanmcc-msft committed Jun 6, 2024
commit 264fb2adddb193a1051185ccf69446c04046c4ee
16 changes: 8 additions & 8 deletions sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ public void Ctor_TokenAuth_Http()

// Act
TestHelper.AssertExpectedException(
() => new AppendBlobClient(httpUri, Tenants.GetOAuthCredential()),
() => new AppendBlobClient(httpUri, TestEnvironment.Credential),
new ArgumentException("Cannot use TokenCredential without HTTPS."));
}

@@ -176,7 +176,7 @@ public async Task Ctor_DefaultAudience()

AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -204,7 +204,7 @@ public async Task Ctor_CustomAudience()

AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -232,7 +232,7 @@ public async Task Ctor_StorageAccountAudience()

AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -575,7 +575,7 @@ public async Task CreateAsync_EncryptionScopeAccountSAS()
public async Task CreateAsync_EncryptionScopeIdentitySAS()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential);
await using DisposingContainer test = await GetTestContainerAsync(oauthService);

Response<UserDelegationKey> userDelegationKey = await oauthService.GetUserDelegationKeyAsync(
@@ -1801,7 +1801,7 @@ await destBlob.AppendBlockFromUriAsync(
public async Task AppendBlockFromUriAsync_SourceBearerToken()
{
// Arrange
BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient serviceClient = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(
service: serviceClient,
publicAccessType: PublicAccessType.None);
@@ -1836,7 +1836,7 @@ public async Task AppendBlockFromUriAsync_SourceBearerToken()
public async Task AppendBlockFromUriAsync_SourceBearerTokenFail()
{
// Arrange
BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient serviceClient = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(
service: serviceClient,
publicAccessType: PublicAccessType.None);
@@ -2146,7 +2146,7 @@ public void CanMockClientConstructors()
mock = new Mock<AppendBlobClient>(new Uri("https://test/test"), new BlobClientOptions()).Object;
mock = new Mock<AppendBlobClient>(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object;
mock = new Mock<AppendBlobClient>(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object;
mock = new Mock<AppendBlobClient>(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object;
mock = new Mock<AppendBlobClient>(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object;
}

private AppendBlobRequestConditions BuildDestinationAccessConditions(
38 changes: 19 additions & 19 deletions sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ public void Ctor_TokenAuth_Http()

// Act
TestHelper.AssertExpectedException(
() => new BlobBaseClient(httpUri, Tenants.GetOAuthCredential()),
() => new BlobBaseClient(httpUri, TestEnvironment.Credential),
new ArgumentException("Cannot use TokenCredential without HTTPS."));
}

@@ -204,7 +204,7 @@ public async Task Ctor_AzureSasCredential()
public async Task Ctor_AzureSasCredential_UserDelegationSAS()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(oauthService);
var client = test.Container.GetBlobClient(GetNewBlobName());
await client.UploadAsync(new MemoryStream());
@@ -266,7 +266,7 @@ public async Task Ctor_DefaultAudience()

BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -298,7 +298,7 @@ public async Task Ctor_CustomAudience()

BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -330,7 +330,7 @@ public async Task Ctor_StorageAccountAudience()

BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -3237,7 +3237,7 @@ public async Task SyncCopyFromUriAsync_VersionId()
public async Task SyncCopyFromUri_SourceBearerToken()
{
// Arrange
BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient serviceClient = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(
service: serviceClient,
publicAccessType: PublicAccessType.None);
@@ -3275,7 +3275,7 @@ public async Task SyncCopyFromUri_SourceBearerToken()
public async Task SyncCopyFromUri_SourceBearerTokenFail()
{
// Arrange
BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient serviceClient = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(
service: serviceClient,
publicAccessType: PublicAccessType.None);
@@ -3586,7 +3586,7 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
public async Task DeleteAsync_VersionIdentitySAS()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(oauthService);
AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName()));
Response<BlobContentInfo> createResponse = await blob.CreateAsync();
@@ -3617,7 +3617,7 @@ public async Task DeleteAsync_VersionIdentitySAS()
public async Task DeleteAsync_VersionInvalidSAS()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(oauthService);
AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName()));
Response<BlobContentInfo> createResponse = await blob.CreateAsync();
@@ -3675,7 +3675,7 @@ public async Task DeleteAsync_VersionBlobSAS(BlobSasPermissions blobSasPermissio
public async Task DeleteAsync_VersionBlobIdentitySAS(BlobSasPermissions blobSasPermissions)
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(oauthService);
AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName()));
Response<BlobContentInfo> createResponse = await blob.CreateAsync();
@@ -3732,7 +3732,7 @@ public async Task DeleteAsync_VersionContainerSAS(BlobContainerSasPermissions bl
public async Task DeleteAsync_VersionContainerIdentitySAS(BlobContainerSasPermissions blobContainerSasPermissions)
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingContainer test = await GetTestContainerAsync(oauthService);
AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName()));
Response<BlobContentInfo> createResponse = await blob.CreateAsync();
@@ -4253,7 +4253,7 @@ public async Task GetPropertiesAsync_ContainerSAS()
[RecordedTest]
public async Task GetPropertiesAsync_ContainerIdentitySAS()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
var containerName = GetNewContainerName();
var blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -4416,7 +4416,7 @@ public async Task GetPropertiesAsync_BlobSasWithContentHeaders()
[RecordedTest]
public async Task GetPropertiesAsync_BlobIdentitySAS()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
var containerName = GetNewContainerName();
var blobName = GetNewBlobName();

@@ -4537,7 +4537,7 @@ public async Task GetPropertiesAsync_SnapshotSAS_Using_BlobClient()
[RecordedTest]
public async Task GetPropertiesAsync_SnapshotIdentitySAS()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
var containerName = GetNewContainerName();
var blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -6416,7 +6416,7 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task GetSetTagsAsync_BlobIdentityTagSas()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -6451,7 +6451,7 @@ public async Task GetSetTagsAsync_BlobIdentityTagSas()
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task GetSetTagsAsync_InvalidBlobIdentitySas()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -6526,7 +6526,7 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task GetSetTagsAsync_ContainerIdentityTagSas()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -6560,7 +6560,7 @@ public async Task GetSetTagsAsync_ContainerIdentityTagSas()
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task GetSetTagsAsync_InvalidContainerIdentitySas()
{
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -7821,7 +7821,7 @@ public void CanMockClientConstructors()
mock = new Mock<BlobBaseClient>(new Uri("https://test/test"), new BlobClientOptions()).Object;
mock = new Mock<BlobBaseClient>(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object;
mock = new Mock<BlobBaseClient>(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object;
mock = new Mock<BlobBaseClient>(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object;
mock = new Mock<BlobBaseClient>(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object;
}

[RecordedTest]
10 changes: 5 additions & 5 deletions sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ public void Ctor_TokenAuth_Http()

// Act
TestHelper.AssertExpectedException(
() => new BlobClient(httpUri, Tenants.GetOAuthCredential()),
() => new BlobClient(httpUri, TestEnvironment.Credential),
new ArgumentException("Cannot use TokenCredential without HTTPS."));
}

@@ -218,7 +218,7 @@ public async Task Ctor_DefaultAudience()

BlobClient aadBlob = InstrumentClient(new BlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -250,7 +250,7 @@ public async Task Ctor_CustomAudience()

BlobClient aadBlob = InstrumentClient(new BlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -282,7 +282,7 @@ public async Task Ctor_StorageAccountAudience()

BlobClient aadBlob = InstrumentClient(new BlobClient(
uriBuilder.ToUri(),
Tenants.GetOAuthCredential(),
TestEnvironment.Credential,
options));

// Assert
@@ -1522,7 +1522,7 @@ public void CanMockClientConstructors()
mock = new Mock<BlobClient>(new Uri("https://test/test"), new BlobClientOptions()).Object;
mock = new Mock<BlobClient>(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object;
mock = new Mock<BlobClient>(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object;
mock = new Mock<BlobClient>(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object;
mock = new Mock<BlobClient>(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object;
}
}
}
Original file line number Diff line number Diff line change
@@ -478,7 +478,7 @@ private BlobSasBuilder BuildBlobSasBuilder(bool includeBlob, bool includeSnapsho
public async Task BlobSasBuilder_PreauthorizedAgentObjectId()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string preauthorizedAgentGuid = Recording.Random.NewGuid().ToString();

@@ -516,7 +516,7 @@ public async Task BlobSasBuilder_PreauthorizedAgentObjectId()
public async Task BlobSasBuilder_CorrelationId()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();

await using DisposingContainer test = await GetTestContainerAsync(service: oauthService, containerName: containerName);
8 changes: 4 additions & 4 deletions sdk/storage/Azure.Storage.Blobs/tests/BlobSasTests.cs
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ public async Task BlobSas_AllPermissions()
public async Task BlobIdentitySas_AllPermissions()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -119,7 +119,7 @@ public async Task BlobVersionSas_AllPermissions()
public async Task BlobVersionIdentitySas_AllPermissions()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -189,7 +189,7 @@ public async Task BlobSnapshotSas_AllPermissions()
public async Task BlobSnapshotIdentitySas_AllPermissions()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
@@ -253,7 +253,7 @@ public async Task ContainerSas_AllPermissions()
public async Task ContainerIdentitySas_AllPermissions()
{
// Arrange
BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth();
BlobServiceClient oauthService = GetServiceClient_OAuth();
string containerName = GetNewContainerName();
string blobName = GetNewBlobName();
await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService);
Loading