Skip to content

Commit cf60bd0

Browse files
committed
Remove the redundant code
1 parent 81c8756 commit cf60bd0

File tree

3 files changed

+23
-486
lines changed

3 files changed

+23
-486
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ItSitConfig.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public class ItSitConfig extends BaseTest {
5858
*/
5959
@BeforeClass
6060
public static void staticPrepare() throws Exception {
61+
prepare(
62+
"integration-tests/src/test/resources/sitconfig/scripts/create-domain-auto-custom-sit-config20.py");
63+
}
64+
65+
public static void prepare(String domainScript) throws Exception {
6166
// initialize test properties and create the directories
6267
if (!QUICKTEST) {
6368
// initialize test properties and create the directories
@@ -90,7 +95,7 @@ public static void staticPrepare() throws Exception {
9095
};
9196
copySitConfigFiles(files, "test-secrets");
9297
// create weblogic domain with configOverrides
93-
domain = createSitConfigDomain();
98+
domain = createSitConfigDomain(domainScript);
9499
Assert.assertNotNull(domain);
95100
domainYaml =
96101
BaseTest.getUserProjectsDir()
@@ -137,17 +142,15 @@ public static void staticUnPrepare() throws Exception {
137142
* @return - created domain
138143
* @throws Exception - if it cannot create the domain
139144
*/
140-
private static Domain createSitConfigDomain() throws Exception {
145+
protected static Domain createSitConfigDomain(String domainScript) throws Exception {
141146
// load input yaml to map and add configOverrides
142147
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAININIMAGE_WLST_YAML);
143148
domainMap.put("configOverrides", "sitconfigcm");
144149
domainMap.put("configOverridesFile", configOverrideDir);
145150
domainMap.put("domainUID", DOMAINUID);
146151
domainMap.put("adminNodePort", new Integer(ADMINPORT));
147152
domainMap.put("t3ChannelPort", new Integer(T3CHANNELPORT));
148-
domainMap.put(
149-
"createDomainPyScript",
150-
"integration-tests/src/test/resources/sitconfig/scripts/create-domain-auto-custom-sit-config20.py");
153+
domainMap.put("createDomainPyScript", domainScript);
151154
domainMap.put(
152155
"javaOptions",
153156
"-Dweblogic.debug.DebugSituationalConfig=true -Dweblogic.debug.DebugSituationalConfigDumpXml=true");

0 commit comments

Comments
 (0)