Skip to content

Commit e399299

Browse files
committed
Added recorded file for test case.
1 parent e7e901e commit e399299

File tree

2 files changed

+266
-2
lines changed

2 files changed

+266
-2
lines changed

src/Peering/Peering.Test/ScenarioTests/CreateNewDirectConnectionTests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@ function Test-NewDirectConnectionWithMicrosoftIpProvidedAddress
304304
Assert-AreEqual $null $createdConnection.BgpSession
305305
Assert-AreEqual $true $createdConnection.UseForPeeringService
306306
Assert-AreEqual "Microsoft" $createdConnection.SessionAddressProvider
307-
308-
removePeerAsn $asn
307+
removePeerAsn $asn
309308

310309
}
311310

@@ -315,7 +314,9 @@ Microsoft Provided IP address
315314
#>
316315
function Test-NewDirectConnectionWithNoPeeringFacility
317316
{
317+
$asn = makePeerAsn 65000
318318
Assert-ThrowsContains {New-AzPeeringDirectConnectionObject -PeeringDbFacilityId} "Missing an argument for parameter 'PeeringDBFacilityId'"
319+
removePeerAsn $asn
319320
}
320321

321322
<#
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
{
2+
"Entries": [
3+
{
4+
"RequestUri": "/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572?api-version=2019-09-01-preview",
5+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U5MTlmOWEtNGUyNi00NzM2LWFhOGQtZDU5NmQ5YTQ5MjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuUGVlcmluZy9wZWVyQXNucy82NTAwMC1HbG9iYWwyNTcyP2FwaS12ZXJzaW9uPTIwMTktMDktMDEtcHJldmlldw==",
6+
"RequestMethod": "PUT",
7+
"RequestBody": "{\r\n \"properties\": {\r\n \"peerAsn\": 65000,\r\n \"peerContactInfo\": {\r\n \"emails\": [\r\n \"[email protected]\",\r\n \"[email protected]\"\r\n ],\r\n \"phone\": [\r\n \"2342432433250\"\r\n ]\r\n },\r\n \"peerName\": \"AS65000-Global3825\"\r\n }\r\n}",
8+
"RequestHeaders": {
9+
"x-ms-client-request-id": [
10+
"78609f81-9e0e-4c68-a7a8-1387eb6ce374"
11+
],
12+
"Accept-Language": [
13+
"en-US"
14+
],
15+
"User-Agent": [
16+
"FxVersion/4.6.27817.01",
17+
"OSName/Windows",
18+
"OSVersion/Microsoft.Windows.10.0.18362.",
19+
"Microsoft.Azure.Management.Peering.PeeringManagementClient/0.12.0.0"
20+
],
21+
"Content-Type": [
22+
"application/json; charset=utf-8"
23+
],
24+
"Content-Length": [
25+
"279"
26+
]
27+
},
28+
"ResponseHeaders": {
29+
"Cache-Control": [
30+
"no-cache"
31+
],
32+
"Pragma": [
33+
"no-cache"
34+
],
35+
"x-ms-request-id": [
36+
"81c2c3f4-1df3-4606-8c2d-d913456135fe"
37+
],
38+
"x-ms-ratelimit-remaining-subscription-resource-requests": [
39+
"58"
40+
],
41+
"x-ms-correlation-request-id": [
42+
"2190de9c-3544-4665-a644-11c2fcdbeb06"
43+
],
44+
"x-ms-routing-request-id": [
45+
"NORTHEUROPE:20191015T153315Z:2190de9c-3544-4665-a644-11c2fcdbeb06"
46+
],
47+
"Strict-Transport-Security": [
48+
"max-age=31536000; includeSubDomains"
49+
],
50+
"X-Content-Type-Options": [
51+
"nosniff"
52+
],
53+
"Date": [
54+
"Tue, 15 Oct 2019 15:33:15 GMT"
55+
],
56+
"Content-Length": [
57+
"501"
58+
],
59+
"Content-Type": [
60+
"application/json; charset=utf-8"
61+
],
62+
"Expires": [
63+
"-1"
64+
]
65+
},
66+
"ResponseBody": "{\r\n \"properties\": {\r\n \"peerAsn\": 65000,\r\n \"peerContactInfo\": {\r\n \"emails\": [\r\n \"[email protected]\",\r\n \"[email protected]\"\r\n ],\r\n \"phone\": [\r\n \"2342432433250\"\r\n ]\r\n },\r\n \"peerName\": \"AS65000-Global3825\",\r\n \"validationState\": \"None\"\r\n },\r\n \"name\": \"65000-Global2572\",\r\n \"id\": \"/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572\",\r\n \"type\": \"Microsoft.Peering/peerAsns\"\r\n}",
67+
"StatusCode": 201
68+
},
69+
{
70+
"RequestUri": "/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572?api-version=2019-09-01-preview",
71+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U5MTlmOWEtNGUyNi00NzM2LWFhOGQtZDU5NmQ5YTQ5MjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuUGVlcmluZy9wZWVyQXNucy82NTAwMC1HbG9iYWwyNTcyP2FwaS12ZXJzaW9uPTIwMTktMDktMDEtcHJldmlldw==",
72+
"RequestMethod": "PUT",
73+
"RequestBody": "{\r\n \"properties\": {\r\n \"peerAsn\": 65000,\r\n \"peerContactInfo\": {\r\n \"emails\": [\r\n \"[email protected]\",\r\n \"[email protected]\"\r\n ],\r\n \"phone\": [\r\n \"2342432433250\"\r\n ]\r\n },\r\n \"peerName\": \"AS65000-Global3825\",\r\n \"validationState\": \"Approved\"\r\n }\r\n}",
74+
"RequestHeaders": {
75+
"x-ms-client-request-id": [
76+
"f0f45c7f-9ded-4951-8b78-a7bdc4b29e2d"
77+
],
78+
"Accept-Language": [
79+
"en-US"
80+
],
81+
"User-Agent": [
82+
"FxVersion/4.6.27817.01",
83+
"OSName/Windows",
84+
"OSVersion/Microsoft.Windows.10.0.18362.",
85+
"Microsoft.Azure.Management.Peering.PeeringManagementClient/0.12.0.0"
86+
],
87+
"Content-Type": [
88+
"application/json; charset=utf-8"
89+
],
90+
"Content-Length": [
91+
"315"
92+
]
93+
},
94+
"ResponseHeaders": {
95+
"Cache-Control": [
96+
"no-cache"
97+
],
98+
"Pragma": [
99+
"no-cache"
100+
],
101+
"x-ms-request-id": [
102+
"15489e71-d969-429a-a550-b9053d03417b"
103+
],
104+
"x-ms-ratelimit-remaining-subscription-resource-requests": [
105+
"57"
106+
],
107+
"x-ms-correlation-request-id": [
108+
"bea7fbb2-6cf8-4b0d-8410-4685b17a66c1"
109+
],
110+
"x-ms-routing-request-id": [
111+
"NORTHEUROPE:20191015T153317Z:bea7fbb2-6cf8-4b0d-8410-4685b17a66c1"
112+
],
113+
"Strict-Transport-Security": [
114+
"max-age=31536000; includeSubDomains"
115+
],
116+
"X-Content-Type-Options": [
117+
"nosniff"
118+
],
119+
"Date": [
120+
"Tue, 15 Oct 2019 15:33:17 GMT"
121+
],
122+
"Content-Length": [
123+
"505"
124+
],
125+
"Content-Type": [
126+
"application/json; charset=utf-8"
127+
],
128+
"Expires": [
129+
"-1"
130+
]
131+
},
132+
"ResponseBody": "{\r\n \"properties\": {\r\n \"peerAsn\": 65000,\r\n \"peerContactInfo\": {\r\n \"emails\": [\r\n \"[email protected]\",\r\n \"[email protected]\"\r\n ],\r\n \"phone\": [\r\n \"2342432433250\"\r\n ]\r\n },\r\n \"peerName\": \"AS65000-Global3825\",\r\n \"validationState\": \"Approved\"\r\n },\r\n \"name\": \"65000-Global2572\",\r\n \"id\": \"/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572\",\r\n \"type\": \"Microsoft.Peering/peerAsns\"\r\n}",
133+
"StatusCode": 200
134+
},
135+
{
136+
"RequestUri": "/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572?api-version=2019-09-01-preview",
137+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U5MTlmOWEtNGUyNi00NzM2LWFhOGQtZDU5NmQ5YTQ5MjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuUGVlcmluZy9wZWVyQXNucy82NTAwMC1HbG9iYWwyNTcyP2FwaS12ZXJzaW9uPTIwMTktMDktMDEtcHJldmlldw==",
138+
"RequestMethod": "GET",
139+
"RequestBody": "",
140+
"RequestHeaders": {
141+
"x-ms-client-request-id": [
142+
"61393de6-3238-4592-bcdd-bc64b022c43f"
143+
],
144+
"Accept-Language": [
145+
"en-US"
146+
],
147+
"User-Agent": [
148+
"FxVersion/4.6.27817.01",
149+
"OSName/Windows",
150+
"OSVersion/Microsoft.Windows.10.0.18362.",
151+
"Microsoft.Azure.Management.Peering.PeeringManagementClient/0.12.0.0"
152+
]
153+
},
154+
"ResponseHeaders": {
155+
"Cache-Control": [
156+
"no-cache"
157+
],
158+
"Pragma": [
159+
"no-cache"
160+
],
161+
"x-ms-request-id": [
162+
"d0d9131a-5cdb-42af-936f-335f5f25ed3f"
163+
],
164+
"x-ms-ratelimit-remaining-subscription-resource-requests": [
165+
"58"
166+
],
167+
"x-ms-correlation-request-id": [
168+
"192a6823-d95e-481f-bd19-65b00c8d5ddf"
169+
],
170+
"x-ms-routing-request-id": [
171+
"NORTHEUROPE:20191015T153317Z:192a6823-d95e-481f-bd19-65b00c8d5ddf"
172+
],
173+
"Strict-Transport-Security": [
174+
"max-age=31536000; includeSubDomains"
175+
],
176+
"X-Content-Type-Options": [
177+
"nosniff"
178+
],
179+
"Date": [
180+
"Tue, 15 Oct 2019 15:33:17 GMT"
181+
],
182+
"Content-Length": [
183+
"501"
184+
],
185+
"Content-Type": [
186+
"application/json; charset=utf-8"
187+
],
188+
"Expires": [
189+
"-1"
190+
]
191+
},
192+
"ResponseBody": "{\r\n \"properties\": {\r\n \"peerAsn\": 65000,\r\n \"peerContactInfo\": {\r\n \"emails\": [\r\n \"[email protected]\",\r\n \"[email protected]\"\r\n ],\r\n \"phone\": [\r\n \"2342432433250\"\r\n ]\r\n },\r\n \"peerName\": \"AS65000-Global3825\",\r\n \"validationState\": \"None\"\r\n },\r\n \"name\": \"65000-Global2572\",\r\n \"id\": \"/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572\",\r\n \"type\": \"Microsoft.Peering/peerAsns\"\r\n}",
193+
"StatusCode": 200
194+
},
195+
{
196+
"RequestUri": "/subscriptions/3e919f9a-4e26-4736-aa8d-d596d9a49239/providers/Microsoft.Peering/peerAsns/65000-Global2572?api-version=2019-09-01-preview",
197+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U5MTlmOWEtNGUyNi00NzM2LWFhOGQtZDU5NmQ5YTQ5MjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuUGVlcmluZy9wZWVyQXNucy82NTAwMC1HbG9iYWwyNTcyP2FwaS12ZXJzaW9uPTIwMTktMDktMDEtcHJldmlldw==",
198+
"RequestMethod": "DELETE",
199+
"RequestBody": "",
200+
"RequestHeaders": {
201+
"x-ms-client-request-id": [
202+
"60bb0497-de47-472e-acfe-1d776f1c4f39"
203+
],
204+
"Accept-Language": [
205+
"en-US"
206+
],
207+
"User-Agent": [
208+
"FxVersion/4.6.27817.01",
209+
"OSName/Windows",
210+
"OSVersion/Microsoft.Windows.10.0.18362.",
211+
"Microsoft.Azure.Management.Peering.PeeringManagementClient/0.12.0.0"
212+
]
213+
},
214+
"ResponseHeaders": {
215+
"Cache-Control": [
216+
"no-cache"
217+
],
218+
"Pragma": [
219+
"no-cache"
220+
],
221+
"x-ms-request-id": [
222+
"5b64987c-10f5-44cd-b0f1-658161c55293"
223+
],
224+
"x-ms-ratelimit-remaining-subscription-deletes": [
225+
"14998"
226+
],
227+
"x-ms-correlation-request-id": [
228+
"945a931a-472c-42fb-b4a9-35e047a1fea4"
229+
],
230+
"x-ms-routing-request-id": [
231+
"NORTHEUROPE:20191015T153318Z:945a931a-472c-42fb-b4a9-35e047a1fea4"
232+
],
233+
"Strict-Transport-Security": [
234+
"max-age=31536000; includeSubDomains"
235+
],
236+
"X-Content-Type-Options": [
237+
"nosniff"
238+
],
239+
"Date": [
240+
"Tue, 15 Oct 2019 15:33:18 GMT"
241+
],
242+
"Expires": [
243+
"-1"
244+
],
245+
"Content-Length": [
246+
"0"
247+
]
248+
},
249+
"ResponseBody": "",
250+
"StatusCode": 200
251+
}
252+
],
253+
"Names": {
254+
"Test-NewDirectConnectionWithNoPeeringFacility": [
255+
"65000-Global2572",
256+
"AS65000-Global3825",
257+
"2342432433250"
258+
]
259+
},
260+
"Variables": {
261+
"SubscriptionId": "3e919f9a-4e26-4736-aa8d-d596d9a49239"
262+
}
263+
}

0 commit comments

Comments
 (0)