mirror of https://github.com/apache/nifi.git
NIFI-11990 Disabled Kubernetes Auto Config in Test Class
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #7643.
This commit is contained in:
parent
3b21794255
commit
807df22af9
|
@ -17,6 +17,8 @@
|
|||
package org.apache.nifi.kubernetes.client;
|
||||
|
||||
import io.fabric8.kubernetes.client.KubernetesClient;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.Timeout;
|
||||
|
@ -24,8 +26,20 @@ import org.junit.jupiter.api.Timeout;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
class StandardKubernetesClientProviderTest {
|
||||
private static final String DISABLE_AUTO_CONFIG_PROPERTY = "kubernetes.disable.autoConfig";
|
||||
|
||||
StandardKubernetesClientProvider provider;
|
||||
|
||||
@BeforeAll
|
||||
static void setDisableAutoConfig() {
|
||||
System.setProperty(DISABLE_AUTO_CONFIG_PROPERTY, Boolean.TRUE.toString());
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void clearDisableAutoConfig() {
|
||||
System.clearProperty(DISABLE_AUTO_CONFIG_PROPERTY);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void setProvider() {
|
||||
provider = new StandardKubernetesClientProvider();
|
||||
|
|
Loading…
Reference in New Issue