Skip to content

Commit d444f00

Browse files
committed
Add stub test methods for the generated domain k8s artifacts when the admin port and t3 channel are enabled, and when an image pull secret is enabled
1 parent 2245bcf commit d444f00

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* creates are correct when the admin node port is disabled and t3 channel is disable,
1414
* and there is no image pull secret.
1515
*/
16-
public class CreateDomainGeneratedFilesAdminNodePortDisabledT3ChannelDisabledTest {
16+
public class CreateDomainGeneratedFilesOptionalFeaturesDisabledTest {
1717

1818
private static CreateDomainInputs inputs;
1919
private static GeneratedDomainYamlFiles generatedFiles;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
2+
package oracle.kubernetes.operator.create;
3+
4+
import static oracle.kubernetes.operator.create.KubernetesArtifactUtils.*;
5+
import static org.hamcrest.MatcherAssert.assertThat;
6+
import static org.hamcrest.Matchers.*;
7+
import org.junit.AfterClass;
8+
import org.junit.BeforeClass;
9+
import org.junit.Test;
10+
11+
/**
12+
* Tests that the all artifacts in the yaml files that create-domain-operator.sh
13+
* creates are correct when the admin node port is disabled and t3 channel is disable,
14+
* and there is no image pull secret.
15+
*/
16+
public class CreateDomainGeneratedFilesOptionalFeaturesEnabledTest {
17+
18+
private static CreateDomainInputs inputs;
19+
private static GeneratedDomainYamlFiles generatedFiles;
20+
21+
private static final String TEST_WEBLOGIC_IMAGE_PULL_SECRET_NAME = "test-weblogic-image-pull-secret-name";
22+
23+
@BeforeClass
24+
public static void setup() throws Exception {
25+
inputs =
26+
CreateDomainInputs.newInputs()
27+
.exposeAdminNodePort("true")
28+
.exposeAdminT3Channel("true")
29+
.imagePullSecretName(TEST_WEBLOGIC_IMAGE_PULL_SECRET_NAME);
30+
generatedFiles = GeneratedDomainYamlFiles.generateDomainYamlFiles(inputs);
31+
}
32+
33+
@AfterClass
34+
public static void tearDown() throws Exception {
35+
if (generatedFiles != null) {
36+
generatedFiles.remove();
37+
}
38+
}
39+
40+
@Test
41+
public void generatesCorrect_createWeblogicDomainYaml_createWeblogicDomainJob() throws Exception {
42+
//System.out.println("MOREAUT_DEBUG create domain job =\n" + YamlUtils.newYaml().dump(generatedFiles.getCreateWeblogicDomainJobYaml().getCreateWeblogicDomainJob()));
43+
// TBD
44+
}
45+
46+
@Test
47+
public void generatesCorrect_domainCustomResourceYaml_domain() throws Exception {
48+
//System.out.println("MOREAUT_DEBUG domain custom resource =\n" + YamlUtils.newYaml().dump(generatedFiles.getDomainCustomResourceYaml().getDomain()));
49+
// TBD
50+
}
51+
}

0 commit comments

Comments
 (0)