Exemplo n.º 1
0
        public void TestResolveEnvSuccess(string secretValue, string envVarName)
        {
            var client = new SecretHub.Client();

            System.Collections.Generic.IDictionary <string, string> res = client.ResolveEnv();
            Assert.Equal(secretValue, res[envVarName]);
        }
Exemplo n.º 2
0
        public void TestResolveEnvFail()
        {
            var   client             = new SecretHub.Client();
            var   ex                 = Assert.Throws <ApplicationException>(() => client.ResolveEnv());
            Regex expectedErrorRegex = new Regex(@"^.*\(server\.secret_not_found\) $");

            Assert.True(expectedErrorRegex.IsMatch(ex.Message), "error should end in the (server.secret_not_found) error code");
        }