use of org.eclipse.jkube.gradle.plugin.KubernetesExtension in project jkube by eclipse.
the class KubernetesResourceTaskTest method runTask_withSkipResource_shouldDoNothing.
@Test
public void runTask_withSkipResource_shouldDoNothing() {
// Given
KubernetesExtension extension = new TestKubernetesExtension() {
@Override
public Property<Boolean> getSkipResource() {
return new DefaultProperty<>(Boolean.class).value(true);
}
};
when(taskEnvironment.project.getExtensions().getByType(KubernetesExtension.class)).thenReturn(extension);
final KubernetesResourceTask kubernetesResourceTask = new KubernetesResourceTask(KubernetesExtension.class);
// When
kubernetesResourceTask.runTask();
// Then
assertThat(taskEnvironment.getRoot().toPath().resolve("build").resolve("jkube")).doesNotExist();
}
Aggregations