diff options
author | vasraz <vasyl.razinkov@est.tech> | 2023-06-19 17:51:23 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2023-06-20 10:05:26 +0000 |
commit | c465f8fac8cc8be671319fca2100e98fc4a4c13f (patch) | |
tree | 0c050c754ae64afe4b2ca2d2a1a2266b7f310262 /common-app-api/src/test | |
parent | 068a01213a8b2daac93b0c2aab33b9a73e7fb70b (diff) |
Disable DMaaP if Kafka active
DMaaP healthcheck cannot succeed when using Kafka, which in turn causes distribution to fail
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: Ia6e1e35b9a2e819e38e62caeb797342948f34e92
Issue-ID: SDC-4542
Diffstat (limited to 'common-app-api/src/test')
-rw-r--r-- | common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java | 111 |
1 files changed, 14 insertions, 97 deletions
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java index cd6705dfdf..bd0564f676 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java @@ -8,9 +8,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,107 +21,24 @@ package org.openecomp.sdc.be.config; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.List; -import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; -import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString; -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding; -import static org.hamcrest.CoreMatchers.allOf; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +class DistributionEngineConfigurationTest { -public class DistributionEngineConfigurationTest { + @Test + void validateSetGetEnvironments() { + final String testEnvironment = "testEnvironment"; + DistributionEngineConfiguration distributionEngineConfiguration = new DistributionEngineConfiguration(); + distributionEngineConfiguration.setEnvironments(Collections.singletonList(testEnvironment)); - @Test - public void validateBean() { - assertThat(DistributionEngineConfiguration.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSettersExcluding("environments") - )); - } + List<String> response = distributionEngineConfiguration.getEnvironments(); - @Test - public void validateDistribNotifServiceArtifactsBean() { - assertThat(DistributionEngineConfiguration.DistribNotifServiceArtifacts.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters() - )); - } - - @Test - public void validateNotifArtifactTypesBean() { - assertThat(DistributionEngineConfiguration.NotifArtifactTypes.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters() - )); - } - - @Test - public void validateNotifArtifactTypesResourceBean() { - assertThat(DistributionEngineConfiguration.NotifArtifactTypesResource.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters() - )); - } - - @Test - public void validateCreateTopicConfigBean() { - assertThat(DistributionEngineConfiguration.CreateTopicConfig.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters(), - hasValidBeanToString() - )); - } - - @Test - public void validateEnvironmentConfigBean() { - assertThat(DistributionEngineConfiguration.EnvironmentConfig.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters(), - hasValidBeanToString() - )); - } - - @Test - public void validateDistributionStatusTopicConfigBean() { - assertThat(DistributionEngineConfiguration.DistributionStatusTopicConfig.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters(), - hasValidBeanToString() - )); - } - - @Test - public void validateDistributionNotificationTopicConfigBean() { - assertThat(DistributionEngineConfiguration.DistributionNotificationTopicConfig.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters(), - hasValidBeanToString() - )); - } - - @Test - public void validateComponentArtifactTypesConfigBean() { - assertThat(DistributionEngineConfiguration.ComponentArtifactTypesConfig.class, allOf( - hasValidBeanConstructor(), - hasValidGettersAndSetters() - )); - } - - @Test - public void validateSetGetEnvironments() { - final String testEnvironment = "testEnvironment"; - DistributionEngineConfiguration distributionEngineConfiguration = new DistributionEngineConfiguration(); - distributionEngineConfiguration.setEnvironments(Collections.singletonList(testEnvironment)); - - List<String> response = distributionEngineConfiguration.getEnvironments(); - - assertEquals(response.size(), 1); - assertEquals(response.get(0), testEnvironment); - } + assertEquals(1, response.size()); + assertEquals(testEnvironment, response.get(0)); + } } |