public async Task CanDeleteTag() { // Arrange ContainerRepositoryClient client = CreateClient(); string tag = "test-delete-tag"; if (Mode != RecordedTestMode.Playback) { await ImportImage(_repositoryName, tag); } // Act await client.DeleteTagAsync(tag); // Assert // This will be removed, pending investigation into potential race condition. // https://github.com/azure/azure-sdk-for-net/issues/19699 if (Mode != RecordedTestMode.Playback) { await Task.Delay(5000); } Assert.ThrowsAsync <RequestFailedException>(async() => { await client.GetTagPropertiesAsync(tag); }); }
public async Task CanDeleteTag() { // Arrange ContainerRepositoryClient client = CreateClient(); string tag = "test-delete"; await ImportImage(tag); // Act await client.DeleteTagAsync(tag); // Assert // The delete takes some time, so if we call GetTagProperties() without a delay, we get a 200 response. await Task.Delay(5000); Assert.ThrowsAsync <RequestFailedException>(async() => { await client.GetTagPropertiesAsync(tag); }); }