6
6
7
7
import java .util .Properties ;
8
8
import oracle .kubernetes .operator .utils .Domain ;
9
+ import oracle .kubernetes .operator .utils .ExecCommand ;
10
+ import oracle .kubernetes .operator .utils .ExecResult ;
9
11
import oracle .kubernetes .operator .utils .Operator ;
10
12
import oracle .kubernetes .operator .utils .TestUtils ;
11
13
import org .junit .AfterClass ;
@@ -86,15 +88,18 @@ public static void staticUnPrepare() throws Exception {
86
88
if (domain != null ) domain .destroy ();
87
89
if (operator != null ) operator .destroy ();
88
90
} finally {
89
- // TestUtils.cleanupAll(getProjectRoot());
90
- TestUtils .executeCommandStrArray (
91
+ String cmd =
91
92
"export RESULT_ROOT="
92
93
+ getResultRoot ()
93
94
+ " export PV_ROOT="
94
95
+ getPvRoot ()
95
96
+ " && "
96
97
+ getProjectRoot ()
97
- + "/src/integration-tests/bash/cleanup.sh" );
98
+ + "/src/integration-tests/bash/cleanup.sh" ;
99
+ ExecResult result = ExecCommand .exec (cmd );
100
+ if (result .exitValue () != 0 ) {
101
+ logger .info ("FAILED: command to call cleanup script failed " + cmd + result .stderr ());
102
+ }
98
103
}
99
104
logger .info ("SUCCESS" );
100
105
}
@@ -106,7 +111,7 @@ public static void staticUnPrepare() throws Exception {
106
111
*/
107
112
@ Test
108
113
public void testAdminServerExternalService () throws Exception {
109
- logTestBegin ();
114
+ logTestBegin ("testAdminServerExternalService" );
110
115
domain .verifyAdminServerExternalService (getUsername (), getPassword ());
111
116
logger .info ("SUCCESS" );
112
117
}
@@ -118,7 +123,7 @@ public void testAdminServerExternalService() throws Exception {
118
123
*/
119
124
@ Test
120
125
public void testAdminT3Channel () throws Exception {
121
- logTestBegin ();
126
+ logTestBegin ("testAdminT3Channel" );
122
127
// check if the property is set to true
123
128
Boolean exposeAdmint3Channel = new Boolean (domainProps .getProperty ("exposeAdminT3Channel" ));
124
129
@@ -143,7 +148,7 @@ public void testAdminT3Channel() throws Exception {
143
148
*/
144
149
@ Test
145
150
public void testDomainLifecyle () throws Exception {
146
- logTestBegin ();
151
+ logTestBegin ("testDomainLifecyle" );
147
152
domain .destroy ();
148
153
domain .create ();
149
154
operator .verifyExternalRESTService ();
@@ -162,7 +167,7 @@ public void testDomainLifecyle() throws Exception {
162
167
*/
163
168
@ Test
164
169
public void testClusterScaling () throws Exception {
165
- logTestBegin ();
170
+ logTestBegin ("testClusterScaling" );
166
171
String managedServerNameBase = domainProps .getProperty ("managedServerNameBase" );
167
172
int replicas = 3 ;
168
173
String podName = domainUid + "-" + managedServerNameBase + replicas ;
@@ -219,7 +224,7 @@ public void testClusterScaling() throws Exception {
219
224
*/
220
225
@ Test
221
226
public void testOperatorLifecycle () throws Exception {
222
- logTestBegin ();
227
+ logTestBegin ("testOperatorLifecycle" );
223
228
operator .destroy ();
224
229
operator .create ();
225
230
operator .verifyExternalRESTService ();
0 commit comments