public async Task AddAnnotations_can_add_annotations_when_none_exits() { var namespaceName = NamespaceName.Create("namespace-from-test-" + Guid.NewGuid().ToString().Substring(0, 5)); var config = KubernetesClientConfiguration.BuildConfigFromConfigFile(); var client = new k8s.Kubernetes(config); var sut = new NamespaceRepository(client); try { await sut.CreateNamespaceAsync(namespaceName); var annotations = new Dictionary <string, string> { { "type-a", "ab" }, { "type-b", "bc" } }; // Act await sut.AddAnnotations(namespaceName, annotations); // Assert var resultNamespace = client.ReadNamespace(namespaceName); var resultAnnotations = resultNamespace.Metadata.Annotations; Assert.Equal(annotations, resultAnnotations); } finally { client.DeleteNamespace( body: new V1DeleteOptions(), name: namespaceName ); } }