Skip to content

Commit b53e56a

Browse files
author
Zim Kalinowski
authored
Test kubernetesconfiguration (Azure#11370)
* adding test * non working test * kubernetes configuration test * fixed test + recording * updated test
1 parent 56fb672 commit b53e56a

File tree

2 files changed

+399
-0
lines changed

2 files changed

+399
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
interactions:
2+
- request:
3+
body: 'b''{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties":
4+
{"agentPublicKeyCertificate": "MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM
5+
D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO",
6+
"aadProfile": {"tenantId": "00000000-0000-0000-0000-000000000000", "clientAppId":
7+
"f8cd1fd9-154f-4da7-b348-595f283c13a3", "serverAppId": "45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}'''
8+
headers:
9+
Accept:
10+
- application/json
11+
Accept-Encoding:
12+
- gzip, deflate
13+
Connection:
14+
- keep-alive
15+
Content-Length:
16+
- '1110'
17+
Content-Type:
18+
- application/json; charset=utf-8
19+
User-Agent:
20+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
21+
msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python
22+
accept-language:
23+
- en-US
24+
method: PUT
25+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview
26+
response:
27+
body:
28+
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"type":"SystemAssigned","principalId":"85f5f3dc-a8d8-4086-b279-9fafeb6d3272","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"provisioningState":"Accepted","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM
29+
D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}'
30+
headers:
31+
azure-asyncoperation:
32+
- https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39?api-version=2020-01-01-preview
33+
cache-control:
34+
- no-cache
35+
content-length:
36+
- '1523'
37+
content-type:
38+
- application/json; charset=utf-8
39+
date:
40+
- Mon, 11 May 2020 14:39:53 GMT
41+
expires:
42+
- '-1'
43+
pragma:
44+
- no-cache
45+
server:
46+
- Kestrel
47+
strict-transport-security:
48+
- max-age=31536000; includeSubDomains
49+
x-content-type-options:
50+
- nosniff
51+
x-ms-ratelimit-remaining-subscription-writes:
52+
- '1199'
53+
status:
54+
code: 201
55+
message: Created
56+
- request:
57+
body: null
58+
headers:
59+
Accept:
60+
- application/json
61+
Accept-Encoding:
62+
- gzip, deflate
63+
Connection:
64+
- keep-alive
65+
User-Agent:
66+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
67+
msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python
68+
method: GET
69+
uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39?api-version=2020-01-01-preview
70+
response:
71+
body:
72+
string: '{"id":"/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39","name":"81f83e33-4e1f-4e58-81fb-2d57bf8e2e39","status":"Succeeded","startTime":"2020-05-11T14:39:52.1146845Z","properties":{"provisioningState":"Succeeded"}}'
73+
headers:
74+
cache-control:
75+
- no-cache
76+
content-length:
77+
- '269'
78+
content-type:
79+
- application/json; charset=utf-8
80+
date:
81+
- Mon, 11 May 2020 14:40:23 GMT
82+
expires:
83+
- '-1'
84+
pragma:
85+
- no-cache
86+
server:
87+
- Kestrel
88+
strict-transport-security:
89+
- max-age=31536000; includeSubDomains
90+
transfer-encoding:
91+
- chunked
92+
vary:
93+
- Accept-Encoding
94+
x-content-type-options:
95+
- nosniff
96+
status:
97+
code: 200
98+
message: OK
99+
- request:
100+
body: null
101+
headers:
102+
Accept:
103+
- application/json
104+
Accept-Encoding:
105+
- gzip, deflate
106+
Connection:
107+
- keep-alive
108+
User-Agent:
109+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
110+
msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python
111+
method: GET
112+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview
113+
response:
114+
body:
115+
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"type":"SystemAssigned","principalId":"85f5f3dc-a8d8-4086-b279-9fafeb6d3272","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"provisioningState":"Succeeded","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM
116+
D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}'
117+
headers:
118+
cache-control:
119+
- no-cache
120+
content-length:
121+
- '1524'
122+
content-type:
123+
- application/json; charset=utf-8
124+
date:
125+
- Mon, 11 May 2020 14:40:25 GMT
126+
expires:
127+
- '-1'
128+
pragma:
129+
- no-cache
130+
server:
131+
- Kestrel
132+
strict-transport-security:
133+
- max-age=31536000; includeSubDomains
134+
transfer-encoding:
135+
- chunked
136+
vary:
137+
- Accept-Encoding
138+
x-content-type-options:
139+
- nosniff
140+
status:
141+
code: 200
142+
message: OK
143+
- request:
144+
body: '{"properties": {"repositoryUrl": "[email protected]:k8sdeveloper425/flux-get-started",
145+
"operatorNamespace": "SRS_Namespace", "operatorInstanceName": "SRSGitHubFluxOp-01",
146+
"operatorType": "Flux", "operatorParams": "[email protected]",
147+
"operatorScope": "namespace", "enableHelmOperator": "true", "helmOperatorProperties":
148+
{"chartVersion": "0.3.0", "chartValues": "--set git.ssh.secretName=flux-git-deploy
149+
--set tillerNamespace=kube-system"}}}'
150+
headers:
151+
Accept:
152+
- application/json
153+
Accept-Encoding:
154+
- gzip, deflate
155+
Connection:
156+
- keep-alive
157+
Content-Length:
158+
- '463'
159+
Content-Type:
160+
- application/json; charset=utf-8
161+
User-Agent:
162+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
163+
msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python
164+
accept-language:
165+
- en-US
166+
method: PUT
167+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview
168+
response:
169+
body:
170+
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":3},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set
171+
git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"[email protected]:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"[email protected]","repositoryPublicKey":"","configKind":0,"createdDate":"0001-01-01T00:00:00+00:00","lastModifiedDate":"0001-01-01T00:00:00+00:00"}}'
172+
headers:
173+
api-supported-versions:
174+
- 2019-11-01-Preview
175+
cache-control:
176+
- no-cache
177+
content-length:
178+
- '1199'
179+
content-type:
180+
- application/json; charset=utf-8
181+
date:
182+
- Mon, 11 May 2020 14:40:27 GMT
183+
expires:
184+
- '-1'
185+
location:
186+
- /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration
187+
pragma:
188+
- no-cache
189+
server:
190+
- openresty/1.15.8.2
191+
strict-transport-security:
192+
- max-age=31536000; includeSubDomains
193+
x-content-type-options:
194+
- nosniff
195+
x-ms-ratelimit-remaining-subscription-writes:
196+
- '1199'
197+
status:
198+
code: 201
199+
message: Created
200+
- request:
201+
body: null
202+
headers:
203+
Accept:
204+
- application/json
205+
Accept-Encoding:
206+
- gzip, deflate
207+
Connection:
208+
- keep-alive
209+
User-Agent:
210+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
211+
msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python
212+
accept-language:
213+
- en-US
214+
method: GET
215+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview
216+
response:
217+
body:
218+
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":3},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set
219+
git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"[email protected]:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"[email protected]","repositoryPublicKey":"","configKind":0,"createdDate":"0001-01-01T00:00:00+00:00","lastModifiedDate":"0001-01-01T00:00:00+00:00"}}'
220+
headers:
221+
api-supported-versions:
222+
- 2019-11-01-Preview
223+
cache-control:
224+
- no-cache
225+
content-length:
226+
- '1199'
227+
content-type:
228+
- application/json; charset=utf-8
229+
date:
230+
- Mon, 11 May 2020 14:40:27 GMT
231+
expires:
232+
- '-1'
233+
pragma:
234+
- no-cache
235+
server:
236+
- openresty/1.15.8.2
237+
strict-transport-security:
238+
- max-age=31536000; includeSubDomains
239+
transfer-encoding:
240+
- chunked
241+
vary:
242+
- Accept-Encoding,Accept-Encoding
243+
x-content-type-options:
244+
- nosniff
245+
status:
246+
code: 200
247+
message: OK
248+
- request:
249+
body: null
250+
headers:
251+
Accept:
252+
- application/json
253+
Accept-Encoding:
254+
- gzip, deflate
255+
Connection:
256+
- keep-alive
257+
Content-Length:
258+
- '0'
259+
User-Agent:
260+
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
261+
msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python
262+
accept-language:
263+
- en-US
264+
method: DELETE
265+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview
266+
response:
267+
body:
268+
string: '{"version":"1.1","content":null,"statusCode":200,"reasonPhrase":"OK","headers":[],"trailingHeaders":[],"requestMessage":null,"isSuccessStatusCode":true}'
269+
headers:
270+
api-supported-versions:
271+
- 2019-11-01-Preview
272+
cache-control:
273+
- no-cache
274+
content-length:
275+
- '152'
276+
content-type:
277+
- application/json; charset=utf-8
278+
date:
279+
- Mon, 11 May 2020 14:40:28 GMT
280+
expires:
281+
- '-1'
282+
pragma:
283+
- no-cache
284+
server:
285+
- openresty/1.15.8.2
286+
strict-transport-security:
287+
- max-age=31536000; includeSubDomains
288+
transfer-encoding:
289+
- chunked
290+
vary:
291+
- Accept-Encoding
292+
x-content-type-options:
293+
- nosniff
294+
x-ms-ratelimit-remaining-subscription-deletes:
295+
- '14999'
296+
status:
297+
code: 200
298+
message: OK
299+
version: 1

0 commit comments

Comments
 (0)