31 references to WithExistingSecret
Aspire.Hosting.Radius.Tests (31)
Publishing\ExistingSecretStoreBicepTests.cs (2)
36s.WithExistingSecret("app/tls-cert", "tls.crt", "tls.key"))); 52s.WithExistingSecret("tls-cert", "tls.crt", "tls.key")));
Secrets\AddRadiusSecretStoreTests.cs (14)
175Assert.Throws<ArgumentException>(() => store.WithExistingSecret(reference, "k")); 186.WithExistingSecret(reference, "k"); 197Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/tls", "ok", " ")); 205.WithExistingSecret("app/s", "k1"); 209var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k2")); 221var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k")); 230.WithExistingSecret("app/s", "k1", "k2", "k3"); 243Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", "ok", " ")); 245store.WithExistingSecret("app/s", "ok"); 257Assert.Throws<ArgumentException>(() => store.WithExistingSecret("BAD/REF", "ok")); 259store.WithExistingSecret("app/s", "ok"); 276var ex = Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", key)); 286var ex = Assert.Throws<ArgumentException>(() => store.WithExistingSecret("app/s", new string('a', 254))); 313.WithExistingSecret("app/s", key);
Secrets\SecretStoreValidationTests.cs (15)
93.WithExistingSecret("app/appsecrets", "k"), 111.WithExistingSecret("app/appsecrets", "k"); 121.WithExistingSecret("app/appsecrets", "k"); 146.WithExistingSecret("app/tls", "tls.crt"); 174var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k")); 200.WithExistingSecret("app/s", "dup", "dup"); 248.WithExistingSecret("app/s", "k"); 329.WithExistingSecret("prod/my-secret"); 345.WithExistingSecret("prod/my-secret"); 360.WithExistingSecret("bare-name", "k"); 423.WithExistingSecret("prod/my-secret", "k"); 436s.WithExistingSecret("db-creds", "password")); 438.WithExistingSecret("prod/db-creds", "password"); 457s.WithExistingSecret("db-creds", "password")); 459s.WithExistingSecret("db-creds", "password"));