use of com.thoughtworks.go.config.SecretConfig in project gocd by gocd.
the class RuleAwarePluginProfileCommandTest method shouldValidateIfSecretConfigIdIsNull.
@Test
public void shouldValidateIfSecretConfigIdIsNull() {
HttpLocalizedOperationResult result = new HttpLocalizedOperationResult();
SecretConfig securityAuthConfig = new SecretConfig(null, "some-plugin", new ConfigurationProperty(new ConfigurationKey("key"), new ConfigurationValue("value")));
cruiseConfig.getSecretConfigs().add(securityAuthConfig);
RuleAwarePluginProfileCommand command = new StubSecretConfigCommand(goConfigService, securityAuthConfig, currentUser, result);
assertThatThrownBy(() -> command.isValid(cruiseConfig)).hasMessageContaining(EntityType.ElasticProfile.idCannotBeBlank());
}
Aggregations