Skip to content

Commit 6f69c9c

Browse files
committed
More checkstyle
1 parent 4534dc7 commit 6f69c9c

File tree

7 files changed

+147
-169
lines changed

7 files changed

+147
-169
lines changed

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

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ private static void gitCloneMonitoringExporter() throws Exception {
169169
}
170170

171171
/**
172-
* Build monitoring exporter app
172+
* Build monitoring exporter app.
173173
*
174174
* @throws Exception if could not run the command successfully to clone from github
175175
*/
176176
private static void buildMonitoringExporter() throws Exception {
177177
String monitoringExporterSrcDir = monitoringExporterDir + "/src";
178178
// target dir for monitoring exporter webapp
179-
String monitoringExporterWar =
179+
final String monitoringExporterWar =
180180
monitoringExporterDir + "/apps/monitoringexporter/wls-exporter.war";
181181

182182
// build monitoring exporter project
@@ -827,7 +827,7 @@ public void test19_EndToEndViaChart() throws Exception {
827827
} finally {
828828
/*
829829
uninstallWebHookPrometheusGrafanaViaChart();
830-
uninstallMySQL();
830+
uninstallMysql();
831831
832832
String crdCmd =
833833
" kubectl delete -f " + monitoringExporterEndToEndDir + "/demo-domains/domain1.yaml";
@@ -1213,7 +1213,7 @@ private static void uninstallWebHookPrometheusGrafanaViaChart() throws Exception
12131213
*
12141214
* @throws Exception if could not run the command successfully to uninstall MySQL
12151215
*/
1216-
private static void uninstallMySQL() throws Exception {
1216+
private static void uninstallMysql() throws Exception {
12171217
String monitoringExporterEndToEndDir =
12181218
monitoringExporterDir + "/src/samples/kubernetes/end2end/";
12191219
// unnstall mysql
@@ -1263,27 +1263,6 @@ private static void replaceStringInFile(String filePath, String oldValue, String
12631263
Files.write(src, content.getBytes(charset));
12641264
}
12651265

1266-
/**
1267-
* A utility method to copy Cross Namespaces RBAC yaml template file replacing the DOMAIN_NS,
1268-
* OPERATOR_NS.
1269-
*
1270-
* @throws IOException when copying files from source location to staging area fails
1271-
*/
1272-
private static void createCrossNSRBACFile(String domainNS, String operatorNS) throws IOException {
1273-
String samplesDir = monitoringExporterDir + "/src/samples/kubernetes/deployments/";
1274-
Path src = Paths.get(samplesDir + "/crossnsrbac.yaml");
1275-
Path dst = Paths.get(samplesDir + "/crossnsrbac_" + domainNS + "_" + operatorNS + ".yaml");
1276-
if (!dst.toFile().exists()) {
1277-
logger.log(Level.INFO, "Copying {0}", src.toString());
1278-
Charset charset = StandardCharsets.UTF_8;
1279-
String content = new String(Files.readAllBytes(src), charset);
1280-
content = content.replaceAll("weblogic-domain", domainNS);
1281-
content = content.replaceAll("weblogic-operator", operatorNS);
1282-
logger.log(Level.INFO, "to {0}", dst.toString());
1283-
Files.write(dst, content.getBytes(charset));
1284-
}
1285-
}
1286-
12871266
/**
12881267
* call operator to scale to specified number of replicas.
12891268
*

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ public void testTwoDomainsManagedByOneOperatorSharingPV() throws Exception {
257257
operator1 = TestUtils.createOperator(OPERATOR1_YAML);
258258
}
259259

260-
Domain domain1 = null, domain2 = null;
260+
Domain domain1 = null;
261+
Domain domain2 = null;
261262
boolean testCompletedSuccessfully = false;
262263
try {
263264
// load input yaml to map and add configOverrides

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
// Licensed under the Universal Permissive License v 1.0 as shown at
33
// http://oss.oracle.com/licenses/upl.
4+
45
package oracle.kubernetes.operator;
56

67
import java.nio.file.Files;
@@ -60,9 +61,9 @@ private void setupOperatorAndDomain(String operatorGitRelease, String operatorRe
6061
operatorMap.put("namespace", OP_NS);
6162
operatorMap.put("releaseName", OP_DEP_NAME);
6263
operatorMap.put("serviceAccount", OP_SA);
63-
List<String> dom_ns = new ArrayList<String>();
64-
dom_ns.add(DOM_NS);
65-
operatorMap.put("domainNamespaces", dom_ns);
64+
List<String> domNs = new ArrayList<String>();
65+
domNs.add(DOM_NS);
66+
operatorMap.put("domainNamespaces", domNs);
6667
operator = TestUtils.createOperator(operatorMap, Operator.RestCertType.LEGACY);
6768
TestUtils.exec("kubectl get all --all-namespaces", true);
6869

@@ -79,7 +80,7 @@ private void setupOperatorAndDomain(String operatorGitRelease, String operatorRe
7980
}
8081

8182
/**
82-
* cleanup the domain and operator after every test
83+
* cleanup the domain and operator after every test.
8384
*
8485
* @throws Exception when domain and operator cleanup fails
8586
*/
@@ -99,7 +100,7 @@ public void cleanupOperatorAndDomain() throws Exception {
99100
}
100101

101102
/**
102-
* Releases k8s cluster lease, archives result, pv directories
103+
* Releases k8s cluster lease, archives result, pv directories.
103104
*
104105
* @throws Exception when deleting pv directories or other tearDown tasks fail.
105106
*/
@@ -115,7 +116,7 @@ public static void staticUnPrepare() throws Exception {
115116
}
116117

117118
/**
118-
* Test for upgrading Operator from release 2.0 to develop branch
119+
* Test for upgrading Operator from release 2.0 to develop branch.
119120
*
120121
* @throws Exception when upgrade fails
121122
*/
@@ -135,7 +136,7 @@ public void testOperatorUpgradeFrom2_0() throws Exception {
135136
}
136137

137138
/**
138-
* Test for upgrading Operator from release 2.0.1 to develop branch
139+
* Test for upgrading Operator from release 2.0.1 to develop branch.
139140
*
140141
* @throws Exception when upgrade fails
141142
*/
@@ -155,7 +156,7 @@ public void testOperatorUpgradeFrom2_0_1() throws Exception {
155156
}
156157

157158
/**
158-
* Test for upgrading Operator from release 2.1 to develop branch
159+
* Test for upgrading Operator from release 2.1 to develop branch.
159160
*
160161
* @throws Exception when upgrade fails
161162
*/
@@ -175,7 +176,7 @@ public void testOperatorUpgradeFrom2_1() throws Exception {
175176
}
176177

177178
/**
178-
* Test for upgrading Operator from release 2.2.0 to develop branch
179+
* Test for upgrading Operator from release 2.2.0 to develop branch.
179180
*
180181
* @throws Exception when upgrade fails
181182
*/
@@ -195,7 +196,7 @@ public void testOperatorUpgradeFrom2_2_0() throws Exception {
195196
}
196197

197198
/**
198-
* Test for upgrading Operator from release 2.2.1 to develop branch
199+
* Test for upgrading Operator from release 2.2.1 to develop branch.
199200
*
200201
* @throws Exception when upgrade fails
201202
*/
@@ -215,7 +216,7 @@ public void testOperatorUpgradeFrom2_2_1() throws Exception {
215216
}
216217

217218
/**
218-
* Upgrades operator to develop branch by using the helm upgrade
219+
* Upgrades operator to develop branch by using the helm upgrade.
219220
*
220221
* @param restart boolean parameter used to determine if a restart of domain is checked
221222
* @throws Exception when upgrade fails or basic usecase testing or scaling fails.
@@ -232,7 +233,7 @@ private void upgradeOperator(boolean restart) throws Exception {
232233

233234
/**
234235
* checks the expected version of the upgraded operator in a loop. In Jenkins it takes nearly 8
235-
* minutes to show the updated value of the domain CRD
236+
* minutes to show the updated value of the domain CRD.
236237
*
237238
* @throws Exception when version does not match
238239
*/
@@ -260,7 +261,7 @@ private void checkOperatorVersion() throws Exception {
260261
}
261262

262263
/**
263-
* Check whether the weblogic server instances are rolling restarted
264+
* Check whether the weblogic server instances are rolling restarted.
264265
*
265266
* @throws Exception If restart fails or not restarted
266267
*/

0 commit comments

Comments
 (0)