use of io.strimzi.api.kafka.model.KafkaUserSpec in project strimzi by strimzi.
the class KafkaUserModelTest method testGenerateSecretWithNoTlsAuthenticationKafkaUserReturnsNull.
@Test
public void testGenerateSecretWithNoTlsAuthenticationKafkaUserReturnsNull() {
Secret userCert = ResourceUtils.createUserSecretTls();
KafkaUser user = ResourceUtils.createKafkaUserTls();
user.setSpec(new KafkaUserSpec());
KafkaUserModel model = KafkaUserModel.fromCrd(user, UserOperatorConfig.DEFAULT_SECRET_PREFIX, UserOperatorConfig.DEFAULT_STRIMZI_ACLS_ADMIN_API_SUPPORTED);
assertThat(model.generateSecret(), is(nullValue()));
}
use of io.strimzi.api.kafka.model.KafkaUserSpec in project strimzi by strimzi.
the class KafkaUserModelTest method testGetSimpleAclRulesWithNoSimpleAuthorizationReturnsNull.
@Test
public void testGetSimpleAclRulesWithNoSimpleAuthorizationReturnsNull() {
Secret userCert = ResourceUtils.createUserSecretTls();
KafkaUser user = ResourceUtils.createKafkaUserTls();
user.setSpec(new KafkaUserSpec());
KafkaUserModel model = KafkaUserModel.fromCrd(user, UserOperatorConfig.DEFAULT_SECRET_PREFIX, UserOperatorConfig.DEFAULT_STRIMZI_ACLS_ADMIN_API_SUPPORTED);
assertThat(model.getSimpleAclRules(), is(nullValue()));
}
use of io.strimzi.api.kafka.model.KafkaUserSpec in project strimzi-kafka-operator by strimzi.
the class KafkaUserModelTest method testGenerateSecretWithNoTlsAuthenticationKafkaUserReturnsNull.
@Test
public void testGenerateSecretWithNoTlsAuthenticationKafkaUserReturnsNull() {
Secret userCert = ResourceUtils.createUserSecretTls();
KafkaUser user = ResourceUtils.createKafkaUserTls();
user.setSpec(new KafkaUserSpec());
KafkaUserModel model = KafkaUserModel.fromCrd(user, UserOperatorConfig.DEFAULT_SECRET_PREFIX, UserOperatorConfig.DEFAULT_STRIMZI_ACLS_ADMIN_API_SUPPORTED);
assertThat(model.generateSecret(), is(nullValue()));
}
use of io.strimzi.api.kafka.model.KafkaUserSpec in project strimzi-kafka-operator by strimzi.
the class KafkaUserModelTest method testGetSimpleAclRulesWithNoSimpleAuthorizationReturnsNull.
@Test
public void testGetSimpleAclRulesWithNoSimpleAuthorizationReturnsNull() {
Secret userCert = ResourceUtils.createUserSecretTls();
KafkaUser user = ResourceUtils.createKafkaUserTls();
user.setSpec(new KafkaUserSpec());
KafkaUserModel model = KafkaUserModel.fromCrd(user, UserOperatorConfig.DEFAULT_SECRET_PREFIX, UserOperatorConfig.DEFAULT_STRIMZI_ACLS_ADMIN_API_SUPPORTED);
assertThat(model.getSimpleAclRules(), is(nullValue()));
}
Aggregations