@@ -890,6 +890,24 @@ function get_cluster_replicas {
890
890
echo $replicas
891
891
}
892
892
893
+ function get_startup_control {
894
+ if [ " $# " != 1 ] ; then
895
+ fail " requires 1 parameter: domainkey"
896
+ fi
897
+
898
+ local NAMESPACE=" ` dom_get $1 NAMESPACE` "
899
+ local DOMAIN_UID=" ` dom_get $1 DOMAIN_UID` "
900
+
901
+ local startup_control_cmd=" kubectl get domain $DOMAIN_UID -n $NAMESPACE -o jsonpath='{.spec.startupControl}'"
902
+ local startup_control=` eval $startup_control_cmd `
903
+
904
+ if [ -z ${startup_control} ]; then
905
+ fail " startupControl not found in domain $DOMAIN_UID "
906
+ fi
907
+
908
+ echo $startup_control
909
+ }
910
+
893
911
function verify_managed_servers_ready {
894
912
if [ " $# " != 1 ] ; then
895
913
fail " requires 1 parameter: domainkey"
@@ -1893,7 +1911,6 @@ function verify_domain_created {
1893
1911
1894
1912
local NAMESPACE=" ` dom_get $1 NAMESPACE` "
1895
1913
local DOMAIN_UID=" ` dom_get $1 DOMAIN_UID` "
1896
- local STARTUP_CONTROL=" ` dom_get $1 STARTUP_CONTROL` "
1897
1914
local MS_BASE_NAME=" ` dom_get $1 MS_BASE_NAME` "
1898
1915
1899
1916
trace " verify domain $DOMAIN_UID in $NAMESPACE namespace"
@@ -1913,8 +1930,10 @@ function verify_domain_created {
1913
1930
trace " verify the service and pod of admin server"
1914
1931
verify_service_and_pod_created $DOM_KEY 0
1915
1932
1933
+ local startup_control=` get_startup_control $DOM_KEY `
1934
+
1916
1935
local verify_as_only=false
1917
- if [ " $STARTUP_CONTROL " = " ADMIN" ] ; then
1936
+ if [ " ${startup_control} " = " ADMIN" ] ; then
1918
1937
verify_as_only=true
1919
1938
fi
1920
1939
@@ -2223,6 +2242,22 @@ function test_operator_lifecycle {
2223
2242
declare_test_pass
2224
2243
}
2225
2244
2245
+ function test_create_domain_startup_control_admin {
2246
+ declare_new_test 1 " $@ "
2247
+
2248
+ if [ " $# " != 1 ] ; then
2249
+ fail " requires 1 parameters: domainKey"
2250
+ fi
2251
+
2252
+ local DOM_KEY=${1}
2253
+ local DOMAIN_UID=" ` dom_get $1 DOMAIN_UID` "
2254
+
2255
+ run_create_domain_job $DOMAIN_UID
2256
+ verify_domain_created $DOMAIN_UID
2257
+
2258
+ declare_test_pass
2259
+ }
2260
+
2226
2261
# scale domain $1 up and down, and optionally verify the scaling had no effect on domain $2
2227
2262
function test_cluster_scale {
2228
2263
declare_new_test 1 " $@ "
@@ -2559,8 +2594,7 @@ function test_suite {
2559
2594
test_domain_lifecycle domain1 domain4
2560
2595
2561
2596
# create another domain in the default namespace with startupControl="ADMIN", and verify that only admin server is created
2562
- run_create_domain_job domain5
2563
- verify_domain_created domain5
2597
+ test_create_domain_startup_control_admin domain5
2564
2598
2565
2599
# test managed server 1 pod auto-restart
2566
2600
test_wls_liveness_probe domain1
0 commit comments