Skip to content

Commit 640f683

Browse files
committed
use job on wercker
1 parent 569dee9 commit 640f683

File tree

3 files changed

+39
-62
lines changed

3 files changed

+39
-62
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static void staticUnPrepare() throws Exception {
137137
*
138138
* @throws Exception
139139
*/
140-
// @Test
140+
@Test
141141
public void testDomainOnPVUsingWLST() throws Exception {
142142
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
143143
logTestBegin(testMethodName);
@@ -151,10 +151,10 @@ public void testDomainOnPVUsingWLST() throws Exception {
151151
try {
152152
domain = TestUtils.createDomain(domainonpvwlstFile);
153153
domain.verifyDomainCreated();
154-
// testBasicUseCases(domain);
155-
// testAdvancedUseCasesForADomain(operator1, domain);
154+
testBasicUseCases(domain);
155+
testAdvancedUseCasesForADomain(operator1, domain);
156156

157-
// if (!SMOKETEST) domain.testWlsLivenessProbe();
157+
if (!SMOKETEST) domain.testWlsLivenessProbe();
158158

159159
testCompletedSuccessfully = true;
160160
} finally {
@@ -175,7 +175,7 @@ public void testDomainOnPVUsingWLST() throws Exception {
175175
*
176176
* @throws Exception
177177
*/
178-
// @Test
178+
@Test
179179
public void testDomainOnPVUsingWDT() throws Exception {
180180
Assume.assumeFalse(QUICKTEST);
181181
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -219,7 +219,7 @@ public void testDomainOnPVUsingWDT() throws Exception {
219219
*
220220
* @throws Exception
221221
*/
222-
// @Test
222+
@Test
223223
public void testTwoDomainsManagedByTwoOperators() throws Exception {
224224
Assume.assumeFalse(QUICKTEST);
225225
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -310,7 +310,7 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
310310
*
311311
* @throws Exception
312312
*/
313-
// @Test
313+
@Test
314314
public void testCreateDomainWithStartPolicyAdminOnly() throws Exception {
315315
Assume.assumeFalse(QUICKTEST);
316316
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -344,7 +344,7 @@ public void testCreateDomainWithStartPolicyAdminOnly() throws Exception {
344344
*
345345
* @throws Exception
346346
*/
347-
// @Test
347+
@Test
348348
public void testCreateDomainPVReclaimPolicyRecycle() throws Exception {
349349
Assume.assumeFalse(QUICKTEST);
350350
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -377,7 +377,7 @@ public void testCreateDomainPVReclaimPolicyRecycle() throws Exception {
377377
*
378378
* @throws Exception
379379
*/
380-
// @Test
380+
@Test
381381
public void testCreateDomainWithDefaultValuesInSampleInputs() throws Exception {
382382
Assume.assumeFalse(QUICKTEST);
383383
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -416,7 +416,7 @@ public void testCreateDomainWithDefaultValuesInSampleInputs() throws Exception {
416416
*
417417
* @throws Exception
418418
*/
419-
// @Test
419+
@Test
420420
public void testAutoAndCustomSitConfigOverrides() throws Exception {
421421
Assume.assumeFalse(QUICKTEST);
422422
String testMethod = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -476,7 +476,7 @@ public void testAutoAndCustomSitConfigOverrides() throws Exception {
476476
*
477477
* @throws Exception
478478
*/
479-
// @Test
479+
@Test
480480
public void testOperatorRESTIdentityBackwardCompatibility() throws Exception {
481481
Assume.assumeFalse(QUICKTEST);
482482
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
@@ -498,7 +498,7 @@ public void testOperatorRESTIdentityBackwardCompatibility() throws Exception {
498498
*
499499
* @throws Exception
500500
*/
501-
// @Test
501+
@Test
502502
public void testOperatorRESTUsingCertificateChain() throws Exception {
503503
Assume.assumeFalse(QUICKTEST);
504504

integration-tests/src/test/resources/statedump.sh

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -71,45 +71,36 @@ function state_dump {
7171
local outfile=${DUMP_DIR}/archive_pv_run.out
7272

7373
if [ "$WERCKER" = "true" ]; then
74-
echo @@ Creating Repo Secret
75-
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
76-
--docker-server=$REPO_SERVER \
77-
--docker-username=$REPO_USERNAME \
78-
--docker-password=$REPO_PASSWORD \
79-
--docker-email=$REPO_EMAIL
80-
81-
echo "Checking Repo Secret"
82-
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
83-
if [ "$SECRET" != "1" ]; then
84-
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
85-
exit 1
86-
fi
87-
88-
IMAGE_TO_USE_IN_KRUN = "phx.ocir.io/weblogick8s/serverjre:8"
89-
74+
$SCRIPTPATH/job.sh "/scripts/archive.sh /scratch/acceptance_test_pv /scratch/acceptance_test_pv_archive" 2>&1 | tee ${outfile}
75+
if [ "$?" = "0" ]; then
76+
echo Job complete.
77+
else
78+
echo Job failed. See ${outfile}.
79+
fi
9080
else
91-
IMAGE_TO_USE_IN_KRUN = "store/oracle/serverjre:8"
92-
fi
9381

94-
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'jar cf /sharedparent/pvarchive.jar /sharedparent/acceptance_test_pv' 2>&1 | tee ${outfile}
95-
if [ "$?" = "0" ]; then
96-
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'base64 /sharedparent/pvarchive.jar' > $RESULT_DIR/pvarchive.b64 2>&1
97-
if [ "$?" = "0" ]; then
98-
base64 -di $RESULT_DIR/pvarchive.b64 > $ARCHIVE
99-
if [ "$?" = "0" ]; then
100-
echo Run complete. Archived to $ARCHIVE
101-
else
102-
echo Run failed.
103-
fi
104-
else
105-
# command failed
106-
cat $RESULT_DIR/pvarchive.b64 | head -30
107-
fi
108-
# rm $RESULT_DIR/pvarchive.b64
109-
else
110-
echo Job failed. See ${outfile}.
82+
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'jar cf /sharedparent/pvarchive.jar /sharedparent/acceptance_test_pv' 2>&1 | tee ${outfile}
83+
if [ "$?" = "0" ]; then
84+
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'base64 /sharedparent/pvarchive.jar' > $RESULT_DIR/pvarchive.b64 2>&1
85+
if [ "$?" = "0" ]; then
86+
base64 -di $RESULT_DIR/pvarchive.b64 > $ARCHIVE
87+
if [ "$?" = "0" ]; then
88+
echo Run complete. Archived to $ARCHIVE
89+
else
90+
echo Run failed.
91+
fi
92+
else
93+
# command failed
94+
cat $RESULT_DIR/pvarchive.b64 | head -30
95+
fi
96+
# rm $RESULT_DIR/pvarchive.b64
97+
else
98+
echo Job failed. See ${outfile}.
99+
fi
111100
fi
112101

102+
103+
113104

114105

115106
if [ ! "$LEASE_ID" = "" ]; then

src/integration-tests/bash/cleanup.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -352,21 +352,7 @@ if [ "${DELETE_FILES:-true}" = "true" ]; then
352352
echo @@ Launching run to delete all pv contents. This runs in the k8s cluster, /sharedparent mounts PV_ROOT.
353353
# $SCRIPTPATH/job.sh "rm -fr /scratch/acceptance_test_pv"
354354
if [ "$WERCKER" = "true" ]; then
355-
echo @@ Creating Repo Secret
356-
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
357-
--docker-server=$REPO_SERVER \
358-
--docker-username=$REPO_USERNAME \
359-
--docker-password=$REPO_PASSWORD \
360-
--docker-email=$REPO_EMAIL
361-
362-
echo "Checking Repo Secret"
363-
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
364-
if [ "$SECRET" != "1" ]; then
365-
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
366-
exit 1
367-
fi
368-
369-
$SCRIPTPATH/krun.sh -i phx.ocir.io/weblogick8s/serverjre:8 -s ${IMAGE_PULL_SECRET_WEBLOGIC} -m "${PV_ROOT}:/sharedparent" -c 'id && rm -fr /sharedparent/acceptance_test_pv'
355+
$SCRIPTPATH/job.sh "rm -fr /scratch/acceptance_test_pv"
370356
else
371357
$SCRIPTPATH/krun.sh -m "${PV_ROOT}:/sharedparent" -c 'rm -fr /sharedparent/acceptance_test_pv'
372358
fi

0 commit comments

Comments
 (0)