mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-13 10:38:08 +00:00
saving secrets in keyvault (#2200)
This commit is contained in:
@ -43,11 +43,11 @@ namespace Tests {
|
||||
|
||||
public static Gen<ISecret<T>> ISecret<T>() {
|
||||
if (typeof(T) == typeof(string)) {
|
||||
return Arb.Generate<string>().Select(s => (ISecret<T>)new SecretValue<string>(s));
|
||||
return Arb.Generate<string>().Select(s => (ISecret<T>)new SecretAddress<string>(new Uri("http://test")));
|
||||
}
|
||||
|
||||
if (typeof(T) == typeof(GithubAuth)) {
|
||||
return Arb.Generate<GithubAuth>().Select(s => (ISecret<T>)new SecretValue<GithubAuth>(s));
|
||||
return Arb.Generate<GithubAuth>().Select(s => (ISecret<T>)new SecretAddress<T>(new Uri("http://test")));
|
||||
} else {
|
||||
throw new Exception($"Unsupported secret type {typeof(T)}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user