1
- // Copyright (c) 2018, 2022 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2018, 2023 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .kubernetes .operator .steps ;
@@ -137,7 +137,7 @@ public void tearDown() {
137
137
@ Test
138
138
void whenReadAdminServerHealth_decrementRemainingServers () {
139
139
selectServer (ADMIN_NAME );
140
- defineResponse (200 , OK_RESPONSE , "http://" + ADMIN_NAME + ".Test:3456" );
140
+ defineResponse (200 , OK_RESPONSE , "http://" + ADMIN_NAME + ".Test.svc :3456" );
141
141
142
142
Packet packet = testSupport .runSteps (readHealthStep );
143
143
@@ -155,7 +155,7 @@ private void defineResponse(int status, String body, @Nonnull String url) {
155
155
void whenReadConfiguredManagedServerHealth_decrementRemainingServers () {
156
156
V1Service service = selectServer (CONFIGURED_MANAGED_SERVER1 );
157
157
configureServiceWithClusterName (CONFIGURED_CLUSTER_NAME , service );
158
- defineResponse (200 , OK_RESPONSE , "http://" + CONFIGURED_MANAGED_SERVER1 + ".Test:7001" );
158
+ defineResponse (200 , OK_RESPONSE , "http://" + CONFIGURED_MANAGED_SERVER1 + ".Test.svc :7001" );
159
159
160
160
Packet packet = testSupport .runSteps (readHealthStep );
161
161
@@ -169,7 +169,7 @@ void whenReadConfiguredManagedServerHealth_decrementRemainingServers() {
169
169
void whenReadDynamicManagedServerHealth_decrementRemainingServers () {
170
170
V1Service service = selectServer (DYNAMIC_MANAGED_SERVER1 );
171
171
configureServiceWithClusterName (DYNAMIC_CLUSTER_NAME , service );
172
- defineResponse (200 , OK_RESPONSE , "http://" + DYNAMIC_MANAGED_SERVER1 + ".Test:7001" );
172
+ defineResponse (200 , OK_RESPONSE , "http://" + DYNAMIC_MANAGED_SERVER1 + ".Test.svc :7001" );
173
173
174
174
Packet packet = testSupport .runSteps (readHealthStep );
175
175
@@ -180,7 +180,7 @@ void whenReadDynamicManagedServerHealth_decrementRemainingServers() {
180
180
void whenServerRunning_verifyServerHealth () {
181
181
selectServer (MANAGED_SERVER1 );
182
182
183
- defineResponse (200 , OK_RESPONSE , "http://" + MANAGED_SERVER1 + ".Test:8001" );
183
+ defineResponse (200 , OK_RESPONSE , "http://" + MANAGED_SERVER1 + ".Test.svc :8001" );
184
184
185
185
Packet packet = testSupport .runSteps (readHealthStep );
186
186
@@ -199,7 +199,7 @@ private Map<String, String> getServerStateMap(Packet packet) {
199
199
@ Test
200
200
void whenAdminPodIPNull_verifyServerHealth () {
201
201
selectServer (ADMIN_NAME );
202
- defineResponse (200 , OK_RESPONSE , "http://admin-server.Test:3456" );
202
+ defineResponse (200 , OK_RESPONSE , "http://admin-server.Test.svc :3456" );
203
203
204
204
Packet packet = testSupport .runSteps (readHealthStep );
205
205
@@ -209,7 +209,7 @@ void whenAdminPodIPNull_verifyServerHealth() {
209
209
@ Test
210
210
void whenAdminPodIPNull_requestSendWithCredentials () {
211
211
selectServer (ADMIN_NAME );
212
- defineResponse (200 , OK_RESPONSE , "http://admin-server.Test:3456" );
212
+ defineResponse (200 , OK_RESPONSE , "http://admin-server.Test.svc :3456" );
213
213
214
214
testSupport .runSteps (readHealthStep );
215
215
@@ -232,7 +232,7 @@ private String expectedAuthorizationHeader() {
232
232
void whenServerOverloaded_verifyServerHealth () {
233
233
selectServer (MANAGED_SERVER1 );
234
234
235
- defineResponse (500 , "" , "http://" + MANAGED_SERVER1 + ".Test:8001" );
235
+ defineResponse (500 , "" , "http://" + MANAGED_SERVER1 + ".Test.svc :8001" );
236
236
237
237
Packet packet = testSupport .runSteps (readHealthStep );
238
238
@@ -245,7 +245,7 @@ void whenServerOverloaded_verifyServerHealth() {
245
245
void whenUnableToReadHealth_verifyNotAvailable () {
246
246
selectServer (MANAGED_SERVER1 );
247
247
248
- defineResponse (404 , "" , "http://" + MANAGED_SERVER1 + ".Test:8001" );
248
+ defineResponse (404 , "" , "http://" + MANAGED_SERVER1 + ".Test.svc :8001" );
249
249
250
250
Packet packet = testSupport .runSteps (readHealthStep );
251
251
@@ -394,15 +394,15 @@ void whenAuthorizedToReadHealthAndThenWait_verifySecretCleared() {
394
394
void whenNotAuthorizedToReadHealth_verifySecretCleared () {
395
395
selectServer (MANAGED_SERVER1 );
396
396
397
- defineResponse (403 , "" , "http://" + MANAGED_SERVER1 + ".Test:8001" );
397
+ defineResponse (403 , "" , "http://" + MANAGED_SERVER1 + ".Test.svc :8001" );
398
398
399
399
testSupport .runSteps (readHealthStep );
400
400
401
401
assertThat (info .getWebLogicCredentialsSecret (), is (nullValue ()));
402
402
}
403
403
404
404
private void defineExpectedURLInResponse (String protocol , int port ) {
405
- defineResponse (200 , OK_RESPONSE , protocol + "://dyn-managed-server2.Test:" + port );
405
+ defineResponse (200 , OK_RESPONSE , protocol + "://dyn-managed-server2.Test.svc :" + port );
406
406
}
407
407
408
408
private boolean readServerHealthSucceeded (Packet packet ) {
0 commit comments