35 references to WithExistingSecret
Aspire.Hosting.Radius.Tests (35)
Publishing\ExistingSecretStoreBicepTests.cs (2)
35s.WithExistingSecret("app/tls-cert", "tls.crt", "tls.key"))); 51s.WithExistingSecret("tls-cert", "tls.crt", "tls.key")));
Publishing\PostCallbackSecretValidationTests.cs (4)
428.WithExistingSecret("default/preexisting", "username"); 750.WithExistingSecret("shared-ns/shared-secret", "username"); 752.WithExistingSecret("shared-ns/shared-secret", "password"); 771.WithExistingSecret("default/api-env-secret", "username");
Secrets\AddRadiusSecretStoreTests.cs (14)
174Assert.Throws<ArgumentException>(() => store.WithExistingSecret(reference, "k")); 185.WithExistingSecret(reference, "k"); 196Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/tls", "ok", " ")); 204.WithExistingSecret("app/s", "k1"); 208var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k2")); 220var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k")); 229.WithExistingSecret("app/s", "k1", "k2", "k3"); 242Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", "ok", " ")); 244store.WithExistingSecret("app/s", "ok"); 256Assert.Throws<ArgumentException>(() => store.WithExistingSecret("BAD/REF", "ok")); 258store.WithExistingSecret("app/s", "ok"); 275var ex = Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", key)); 285var ex = Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", new string('a', 254))); 312.WithExistingSecret("app/s", key);
Secrets\SecretStoreValidationTests.cs (15)
92.WithExistingSecret("app/appsecrets", "k"), 110.WithExistingSecret("app/appsecrets", "k"); 120.WithExistingSecret("app/appsecrets", "k"); 145.WithExistingSecret("app/tls", "tls.crt"); 173var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k")); 199.WithExistingSecret("app/s", "dup", "dup"); 247.WithExistingSecret("app/s", "k"); 328.WithExistingSecret("prod/my-secret"); 344.WithExistingSecret("prod/my-secret"); 359.WithExistingSecret("bare-name", "k"); 422.WithExistingSecret("prod/my-secret", "k"); 435s.WithExistingSecret("db-creds", "password")); 437.WithExistingSecret("prod/db-creds", "password"); 456s.WithExistingSecret("db-creds", "password")); 458s.WithExistingSecret("db-creds", "password"));