public SetKeyVaultSecretTests()
        {
            base.SetupTest();

            secretAttributes  = new SecretAttributes(true, null, null, null, null);
            secureSecretValue = SecretValue.ConvertToSecureString();
            secret            = new Secret()
            {
                VaultName = VaultName, Name = SecretName, Version = SecretVersion, SecretValue = secureSecretValue, Attributes = secretAttributes
            };

            cmdlet = new SetAzureKeyVaultSecret()
            {
                CommandRuntime    = commandRuntimeMock.Object,
                DataServiceClient = keyVaultClientMock.Object,
                VaultName         = secret.VaultName,
                Name        = secret.Name,
                SecretValue = secret.SecretValue,
                Disable     = new SwitchParameter(!(secretAttributes.Enabled.Value)),
                Expires     = secretAttributes.Expires,
                NotBefore   = secretAttributes.NotBefore,
                ContentType = secretAttributes.ContentType,
                Tags        = secretAttributes.Tags
            };
        }
Exemplo n.º 2
0
        public SetKeyVaultSecretTests()
        {
            base.SetupTest();

            cmdlet = new SetAzureKeyVaultSecret()
            {
                CommandRuntime    = commandRuntimeMock.Object,
                DataServiceClient = keyVaultClientMock.Object,
                VaultName         = VaultName
            };
        }
        public SetKeyVaultSecretTests()
        {
            base.SetupTest();

            secretAttributes = new SecretAttributes(true, null, null, null, null);
            secureSecretValue = SecretValue.ConvertToSecureString();
            secret = new Secret() { VaultName = VaultName, Name = SecretName, Version = SecretVersion, SecretValue = secureSecretValue, Attributes = secretAttributes };

            cmdlet = new SetAzureKeyVaultSecret()
            {
                CommandRuntime = commandRuntimeMock.Object,
                DataServiceClient = keyVaultClientMock.Object,
                VaultName = secret.VaultName,
                Name = secret.Name,
                SecretValue = secret.SecretValue,
                Disable = new SwitchParameter(!(secretAttributes.Enabled.Value)),
                Expires = secretAttributes.Expires,
                NotBefore = secretAttributes.NotBefore,
                ContentType = secretAttributes.ContentType,
                Tag = secretAttributes.Tags
            };
        }