@@ -56,6 +56,7 @@ func TestSeparateEDnode(t *testing.T) {
56
56
"auth.adminUsername" : username ,
57
57
"auth.adminPassword" : password ,
58
58
"group.name" : "dnode" ,
59
+ "group.enableXdqpSsl" : "true" ,
59
60
"logCollection.enabled" : "false" ,
60
61
},
61
62
}
@@ -91,7 +92,6 @@ func TestSeparateEDnode(t *testing.T) {
91
92
if err != nil {
92
93
t .Fatalf (err .Error ())
93
94
}
94
- t .Logf ("Get hosts response:\n " + string (body ))
95
95
96
96
bootstrapHostJSON := gjson .Get (string (body ), `host-default-list.list-items.list-item.#(roleref="bootstrap").nameref` )
97
97
t .Logf (`BootstrapHost: = %s` , bootstrapHostJSON )
@@ -100,6 +100,25 @@ func TestSeparateEDnode(t *testing.T) {
100
100
t .Errorf ("Bootstrap does not exists on cluster" )
101
101
}
102
102
103
+ t .Log ("====Verify xdqp-ssl-enabled is set to true" )
104
+ endpoint := fmt .Sprintf ("http://%s/manage/v2/groups/dnode/properties?format=json" , tunnel .Endpoint ())
105
+ t .Logf (`Endpoint for group properties: %s` , endpoint )
106
+
107
+ request := digestAuth .NewRequest (username , password , "GET" , endpoint , "" )
108
+ resp , err = request .Execute ()
109
+ if err != nil {
110
+ t .Fatalf (err .Error ())
111
+ }
112
+ defer resp .Body .Close ()
113
+ body , err = ioutil .ReadAll (resp .Body )
114
+ if err != nil {
115
+ t .Fatalf (err .Error ())
116
+ }
117
+
118
+ xdqpSSLEnabled := gjson .Get (string (body ), `xdqp-ssl-enabled` )
119
+ // verify xdqp-ssl-enabled is set to trues
120
+ assert .Equal (t , true , xdqpSSLEnabled .Bool (), "xdqp-ssl-enabled should be set to true" )
121
+
103
122
enodeOptions := & helm.Options {
104
123
KubectlOptions : kubectlOptions ,
105
124
SetValues : map [string ]string {
@@ -111,6 +130,7 @@ func TestSeparateEDnode(t *testing.T) {
111
130
"auth.adminPassword" : password ,
112
131
"group.name" : "enode" ,
113
132
"bootstrapHostName" : bootstrapHostJSON .Str ,
133
+ "group.enableXdqpSsl" : "false" ,
114
134
"logCollection.enabled" : "false" ,
115
135
},
116
136
}
@@ -120,6 +140,25 @@ func TestSeparateEDnode(t *testing.T) {
120
140
// wait until the first enode pod is in Ready status
121
141
k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName0 , 45 , 20 * time .Second )
122
142
143
+ t .Log ("====Verify xdqp-ssl-enabled is set to false on Enode" )
144
+ endpoint = fmt .Sprintf ("http://%s/manage/v2/groups/enode/properties?format=json" , tunnel .Endpoint ())
145
+ t .Logf (`Endpoint for group properties: %s` , endpoint )
146
+
147
+ request = digestAuth .NewRequest (username , password , "GET" , endpoint , "" )
148
+ resp , err = request .Execute ()
149
+ if err != nil {
150
+ t .Fatalf (err .Error ())
151
+ }
152
+ defer resp .Body .Close ()
153
+ body , err = ioutil .ReadAll (resp .Body )
154
+ if err != nil {
155
+ t .Fatalf (err .Error ())
156
+ }
157
+
158
+ xdqpSSLEnabled = gjson .Get (string (body ), `xdqp-ssl-enabled` )
159
+ // verify xdqp-ssl-enabled is set to false
160
+ assert .Equal (t , false , xdqpSSLEnabled .Bool ())
161
+
123
162
groupEndpoint := fmt .Sprintf ("http://%s/manage/v2/groups" , tunnel .Endpoint ())
124
163
t .Logf (`Endpoint: %s` , groupEndpoint )
125
164
@@ -132,7 +171,6 @@ func TestSeparateEDnode(t *testing.T) {
132
171
if body , err = ioutil .ReadAll (resp .Body ); err != nil {
133
172
t .Fatalf (err .Error ())
134
173
}
135
- t .Logf ("Groups status response:\n " + string (body ))
136
174
137
175
// verify groups dnode, enode exists on the cluster
138
176
if ! strings .Contains (string (body ), "<nameref>dnode</nameref>" ) && ! strings .Contains (string (body ), "<nameref>enode</nameref>" ) {
0 commit comments