diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/DownloadObjectTest.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/DownloadObjectTest.cs index 211cb903e2df..9b2426cd6b63 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/DownloadObjectTest.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/DownloadObjectTest.cs @@ -302,8 +302,8 @@ public void DownloadGzippedFile() // The file has a Content-Encoding of gzip, and it's stored compressed. // We should still be able to download it, and the result should be the original plain text. var stream = new MemoryStream(); - _fixture.Client.DownloadObject(StorageFixture.TestBucket, "gzipped-text.txt", stream); - var expected = Encoding.UTF8.GetBytes("hello world"); + _fixture.Client.DownloadObject(StorageFixture.TestBucket, StorageFixture.GzippedObjectName, stream); + var expected = Encoding.UTF8.GetBytes(StorageFixture.GzippedObjectContent); var actual = stream.ToArray(); Assert.Equal(expected, actual); } @@ -322,8 +322,8 @@ public void DownloadGzippedFile_NoClientDecompression() }); var client = new StorageClientImpl(service); var stream = new MemoryStream(); - client.DownloadObject(StorageFixture.TestBucket, "gzipped-text.txt", stream); - var expected = Encoding.UTF8.GetBytes("hello world"); + client.DownloadObject(StorageFixture.TestBucket, StorageFixture.GzippedObjectName, stream); + var expected = Encoding.UTF8.GetBytes(StorageFixture.GzippedObjectContent); var actual = stream.ToArray(); Assert.Equal(expected, actual); } @@ -340,9 +340,9 @@ public void DownloadGzippedFile_NoClientDecompression_IgnoreHash() }); var client = new StorageClientImpl(service); var stream = new MemoryStream(); - client.DownloadObject(StorageFixture.TestBucket, "gzipped-text.txt", stream, + client.DownloadObject(StorageFixture.TestBucket, StorageFixture.GzippedObjectName, stream, new DownloadObjectOptions { DownloadValidationMode = DownloadValidationMode.Never }); - var expected = Encoding.UTF8.GetBytes("hello world"); + var expected = Encoding.UTF8.GetBytes(StorageFixture.GzippedObjectContent); var actual = stream.ToArray(); Assert.Equal(expected, actual); } @@ -359,9 +359,9 @@ public void DownloadGzippedFile_NoClientDecompression_AutomaticValidationMode() }); var client = new StorageClientImpl(service); var stream = new MemoryStream(); - var obj = client.DownloadObject(StorageFixture.TestBucket, "gzipped-text.txt", stream, + var obj = client.DownloadObject(StorageFixture.TestBucket, StorageFixture.GzippedObjectName, stream, new DownloadObjectOptions { DownloadValidationMode = DownloadValidationMode.Automatic }); - var expected = Encoding.UTF8.GetBytes("hello world"); + var expected = Encoding.UTF8.GetBytes(StorageFixture.GzippedObjectContent); var actual = stream.ToArray(); Assert.Equal(expected, actual); } diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/HmacKeysTest.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/HmacKeysTest.cs index 772f2c9cf554..c86cfb5781eb 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/HmacKeysTest.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/HmacKeysTest.cs @@ -33,7 +33,7 @@ public class HmacKeysTest public HmacKeysTest(StorageFixture fixture) => _fixture = fixture; - [Fact] + [Fact(Skip = "b/477663109")] // This test is async because of the helpers for testing eventually consistent changes. // We are testing sync production code though. public async Task Lifecycle() @@ -102,7 +102,7 @@ await _fixture.EventuallyAsync(s_hmacKeyStateChangeConsistencyDelay, () => }); } - [Fact] + [Fact(Skip = "b/477663109")] public async Task LifecycleAsync() { var client = _fixture.Client; diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/NormalizationTest.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/NormalizationTest.cs index 1930e2f58ebf..820585b76c88 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/NormalizationTest.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/NormalizationTest.cs @@ -32,8 +32,8 @@ public class NormalizationTest // URL should end with Caf%C3%A9 [InlineData("Caf\u00e9", "Normalization Form C")] // Normalization Form D: an ASCII e followed by U+0301 combining character - // URL should end with Cafe%CC%81 - [InlineData("Cafe\u0301", "Normalization Form D")] + // URL should end with Bebe%CC%81 + [InlineData("Bebe\u0301", "Normalization Form D", Skip = "b/477619774")] public void FetchObjectAndCheckContent(string name, string expectedContent) { TestEnvironment.SkipIfVpcSc(); diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/PublicAccessPreventionTest.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/PublicAccessPreventionTest.cs index bb37f81dfc54..2a189a3fb4a3 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/PublicAccessPreventionTest.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/PublicAccessPreventionTest.cs @@ -24,7 +24,7 @@ public class PublicAccessPreventionTest private const string InheritedValue = "inherited"; private static readonly Policy.BindingsData AllUsersViewer = new Policy.BindingsData { - Members = new[] { "domain:google.com" }, + Members = new[] { "allUsers" }, Role = "roles/storage.objectViewer" }; @@ -32,7 +32,7 @@ public class PublicAccessPreventionTest public PublicAccessPreventionTest(StorageFixture fixture) => _fixture = fixture; - [Fact] + [Fact(Skip = "b/477676781")] public void PreventAccessOnExistingBucket() { var client = _fixture.Client; @@ -51,7 +51,7 @@ public void PreventAccessOnExistingBucket() Assert.Throws(() => client.SetBucketIamPolicy(bucketName, policy)); } - [Fact] + [Fact(Skip = "b/477676781")] public void PreventAccessOnNewBucket() { var client = _fixture.Client; @@ -70,7 +70,7 @@ public void PreventAccessOnNewBucket() Assert.Throws(() => client.SetBucketIamPolicy(bucketName, policy)); } - [Fact] + [Fact(Skip = "b/477676781")] public void RestoreAccess() { var client = _fixture.Client; diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/StorageFixture.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/StorageFixture.cs index 9148330bf1e1..48146de04405 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/StorageFixture.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.IntegrationTests/StorageFixture.cs @@ -42,6 +42,8 @@ namespace Google.Cloud.Storage.V1.IntegrationTests public sealed class StorageFixture : CloudProjectFixtureBase, ICollectionFixture { internal const string TestBucket = "dotnet-storage-library-test-bucket"; + internal const string GzippedObjectName = "gzipped-text.txt"; + internal const string GzippedObjectContent = "Hello World"; private const string RequesterPaysProjectEnvironmentVariable = "REQUESTER_PAYS_TEST_PROJECT"; private const string RequesterPaysCredentialsEnvironmentVariable = "REQUESTER_PAYS_CREDENTIALS"; diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/StorageClientSnippets.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/StorageClientSnippets.cs index 3aadb7ea1159..33f1f61d5331 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/StorageClientSnippets.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/StorageClientSnippets.cs @@ -632,7 +632,7 @@ public void GetBucketIamPolicy() // See [GetBucketIamPolicy](ref) for a synchronous example. // End see-also - [Fact] + [Fact(Skip = "b/477676781")] public async Task SetBucketIamPolicy() { var projectId = _fixture.ProjectId; @@ -651,7 +651,7 @@ public async Task SetBucketIamPolicy() Console.WriteLine($"Response code before setting policy: {response1.StatusCode}"); // Fetch the current IAM policy, and modify it in memory to allow all users - // of a certain domain to view objects. + // to view objects. Policy policy = client.GetBucketIamPolicy(bucketName); string role = "roles/storage.objectViewer"; Policy.BindingsData binding = policy.Bindings @@ -662,7 +662,7 @@ public async Task SetBucketIamPolicy() binding = new Policy.BindingsData { Role = role, Members = new List() }; policy.Bindings.Add(binding); } - binding.Members.Add("domain:google.com"); + binding.Members.Add("allUsers"); // Update the IAM policy on the bucket. client.SetBucketIamPolicy(bucketName, policy); diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/UrlSignerSnippets.cs b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/UrlSignerSnippets.cs index 6d7443924323..5933b201abc8 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/UrlSignerSnippets.cs +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.Snippets/UrlSignerSnippets.cs @@ -86,7 +86,7 @@ public async Task ComputeSignedURLGet() Assert.Equal(_fixture.HelloWorldContent, content); } - [Fact] + [Fact(Skip = "b/477663109")] public async Task HmacSignedURLGet() { var bucketName = _fixture.BucketName; diff --git a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.sln b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.sln index c4791e6fbc58..a9f8c02124fa 100644 --- a/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.sln +++ b/apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1.sln @@ -21,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Storage.V1.Thr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ClientTesting", "..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj", "{29974B0C-A7B0-8CA8-AE32-99F622C89044}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.PubSub.V1", "..\Google.Cloud.PubSub.V1\Google.Cloud.PubSub.V1\Google.Cloud.PubSub.V1.csproj", "{2F9E1835-414A-0CC2-963F-F41BDF7AFE4D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -63,6 +65,10 @@ Global {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.Build.0 = Debug|Any CPU {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.ActiveCfg = Release|Any CPU {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.Build.0 = Release|Any CPU + {2F9E1835-414A-0CC2-963F-F41BDF7AFE4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F9E1835-414A-0CC2-963F-F41BDF7AFE4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F9E1835-414A-0CC2-963F-F41BDF7AFE4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F9E1835-414A-0CC2-963F-F41BDF7AFE4D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/tools/Google.Cloud.ClientTesting/TestEnvironment.cs b/tools/Google.Cloud.ClientTesting/TestEnvironment.cs index d11d77f2e684..b767325780e7 100644 --- a/tools/Google.Cloud.ClientTesting/TestEnvironment.cs +++ b/tools/Google.Cloud.ClientTesting/TestEnvironment.cs @@ -92,7 +92,7 @@ public static void SkipOnRestrictedEnvironment() { if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(GoogleApplicationCredentialsEnvironmentVariable))) { - throw new SkipException("Test skipped in VPCSC environment"); + throw new SkipException("Test skipped in restricted environment"); } }