Skip to content

Commit 9bb9379

Browse files
authored
Share tests (Azure#20559)
1 parent d616b36 commit 9bb9379

File tree

5 files changed

+652
-1
lines changed

5 files changed

+652
-1
lines changed

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def get_file_client(self, file_name, **kwargs):
230230
policies=self._pipeline._impl_policies # pylint: disable = protected-access
231231
)
232232
return ShareFileClient(
233-
self.url, file_path=file_name, share_name=self.share_name, napshot=self.snapshot,
233+
self.url, file_path=file_name, share_name=self.share_name, snapshot=self.snapshot,
234234
credential=self.credential, api_version=self.api_version,
235235
_hosts=self._hosts, _configuration=self._config,
236236
_pipeline=_pipeline, _location_mode=self._location_mode, **kwargs)
Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- application/xml
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
Content-Length:
12+
- '0'
13+
User-Agent:
14+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
15+
x-ms-date:
16+
- Thu, 14 Oct 2021 17:59:55 GMT
17+
x-ms-version:
18+
- '2020-10-02'
19+
method: PUT
20+
uri: https://storagename.file.core.windows.net/utshare1490e7b?restype=share
21+
response:
22+
body:
23+
string: ''
24+
headers:
25+
content-length:
26+
- '0'
27+
date:
28+
- Thu, 14 Oct 2021 17:59:56 GMT
29+
etag:
30+
- '"0x8D98F3C6E7FA5DA"'
31+
last-modified:
32+
- Thu, 14 Oct 2021 17:59:56 GMT
33+
server:
34+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
35+
x-ms-version:
36+
- '2020-10-02'
37+
status:
38+
code: 201
39+
message: Created
40+
- request:
41+
body: null
42+
headers:
43+
Accept:
44+
- application/xml
45+
Accept-Encoding:
46+
- gzip, deflate
47+
Connection:
48+
- keep-alive
49+
Content-Length:
50+
- '0'
51+
User-Agent:
52+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
53+
x-ms-date:
54+
- Thu, 14 Oct 2021 17:59:56 GMT
55+
x-ms-file-attributes:
56+
- none
57+
x-ms-file-creation-time:
58+
- now
59+
x-ms-file-last-write-time:
60+
- now
61+
x-ms-file-permission:
62+
- inherit
63+
x-ms-version:
64+
- '2020-10-02'
65+
method: PUT
66+
uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b?restype=directory
67+
response:
68+
body:
69+
string: ''
70+
headers:
71+
content-length:
72+
- '0'
73+
date:
74+
- Thu, 14 Oct 2021 17:59:56 GMT
75+
etag:
76+
- '"0x8D98F3C6EB478FA"'
77+
last-modified:
78+
- Thu, 14 Oct 2021 17:59:56 GMT
79+
server:
80+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
81+
x-ms-file-attributes:
82+
- Directory
83+
x-ms-file-change-time:
84+
- '2021-10-14T17:59:56.7766778Z'
85+
x-ms-file-creation-time:
86+
- '2021-10-14T17:59:56.7766778Z'
87+
x-ms-file-id:
88+
- '13835128424026341376'
89+
x-ms-file-last-write-time:
90+
- '2021-10-14T17:59:56.7766778Z'
91+
x-ms-file-parent-id:
92+
- '0'
93+
x-ms-file-permission-key:
94+
- 17913408918638655783*10394889115079208622
95+
x-ms-request-server-encrypted:
96+
- 'true'
97+
x-ms-version:
98+
- '2020-10-02'
99+
status:
100+
code: 201
101+
message: Created
102+
- request:
103+
body: null
104+
headers:
105+
Accept:
106+
- application/xml
107+
Accept-Encoding:
108+
- gzip, deflate
109+
Connection:
110+
- keep-alive
111+
Content-Length:
112+
- '0'
113+
User-Agent:
114+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
115+
x-ms-content-length:
116+
- '1024'
117+
x-ms-date:
118+
- Thu, 14 Oct 2021 17:59:56 GMT
119+
x-ms-file-attributes:
120+
- none
121+
x-ms-file-creation-time:
122+
- now
123+
x-ms-file-last-write-time:
124+
- now
125+
x-ms-file-permission:
126+
- Inherit
127+
x-ms-type:
128+
- file
129+
x-ms-version:
130+
- '2020-10-02'
131+
method: PUT
132+
uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b
133+
response:
134+
body:
135+
string: ''
136+
headers:
137+
content-length:
138+
- '0'
139+
date:
140+
- Thu, 14 Oct 2021 17:59:56 GMT
141+
etag:
142+
- '"0x8D98F3C6EBEB406"'
143+
last-modified:
144+
- Thu, 14 Oct 2021 17:59:56 GMT
145+
server:
146+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
147+
x-ms-file-attributes:
148+
- Archive
149+
x-ms-file-change-time:
150+
- '2021-10-14T17:59:56.8437254Z'
151+
x-ms-file-creation-time:
152+
- '2021-10-14T17:59:56.8437254Z'
153+
x-ms-file-id:
154+
- '11529285414812647424'
155+
x-ms-file-last-write-time:
156+
- '2021-10-14T17:59:56.8437254Z'
157+
x-ms-file-parent-id:
158+
- '13835128424026341376'
159+
x-ms-file-permission-key:
160+
- 4099112195243312672*10394889115079208622
161+
x-ms-request-server-encrypted:
162+
- 'true'
163+
x-ms-version:
164+
- '2020-10-02'
165+
status:
166+
code: 201
167+
message: Created
168+
- request:
169+
body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
170+
headers:
171+
Accept:
172+
- application/xml
173+
Accept-Encoding:
174+
- gzip, deflate
175+
Connection:
176+
- keep-alive
177+
Content-Length:
178+
- '1024'
179+
Content-Type:
180+
- application/octet-stream
181+
User-Agent:
182+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
183+
x-ms-date:
184+
- Thu, 14 Oct 2021 17:59:56 GMT
185+
x-ms-range:
186+
- bytes=0-1023
187+
x-ms-version:
188+
- '2020-10-02'
189+
x-ms-write:
190+
- update
191+
method: PUT
192+
uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b?comp=range
193+
response:
194+
body:
195+
string: ''
196+
headers:
197+
content-length:
198+
- '0'
199+
content-md5:
200+
- yaNM/IXZgmmMasifdgcavQ==
201+
date:
202+
- Thu, 14 Oct 2021 17:59:56 GMT
203+
etag:
204+
- '"0x8D98F3C6EC9B285"'
205+
last-modified:
206+
- Thu, 14 Oct 2021 17:59:56 GMT
207+
server:
208+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
209+
x-ms-request-server-encrypted:
210+
- 'true'
211+
x-ms-version:
212+
- '2020-10-02'
213+
status:
214+
code: 201
215+
message: Created
216+
- request:
217+
body: null
218+
headers:
219+
Accept:
220+
- application/xml
221+
Accept-Encoding:
222+
- gzip, deflate
223+
Connection:
224+
- keep-alive
225+
Content-Length:
226+
- '0'
227+
User-Agent:
228+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
229+
x-ms-date:
230+
- Thu, 14 Oct 2021 17:59:56 GMT
231+
x-ms-version:
232+
- '2020-10-02'
233+
method: PUT
234+
uri: https://storagename.file.core.windows.net/utshare1490e7b?restype=share&comp=snapshot
235+
response:
236+
body:
237+
string: ''
238+
headers:
239+
content-length:
240+
- '0'
241+
date:
242+
- Thu, 14 Oct 2021 17:59:57 GMT
243+
etag:
244+
- '"0x8D98F3C6E7FA5DA"'
245+
last-modified:
246+
- Thu, 14 Oct 2021 17:59:56 GMT
247+
server:
248+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
249+
x-ms-snapshot:
250+
- '2021-10-14T17:59:57.0000000Z'
251+
x-ms-version:
252+
- '2020-10-02'
253+
status:
254+
code: 201
255+
message: Created
256+
- request:
257+
body: null
258+
headers:
259+
Accept:
260+
- application/xml
261+
Accept-Encoding:
262+
- gzip, deflate
263+
Connection:
264+
- keep-alive
265+
Content-Length:
266+
- '0'
267+
User-Agent:
268+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
269+
x-ms-date:
270+
- Thu, 14 Oct 2021 17:59:57 GMT
271+
x-ms-version:
272+
- '2020-10-02'
273+
method: DELETE
274+
uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b
275+
response:
276+
body:
277+
string: ''
278+
headers:
279+
content-length:
280+
- '0'
281+
date:
282+
- Thu, 14 Oct 2021 17:59:57 GMT
283+
server:
284+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
285+
x-ms-version:
286+
- '2020-10-02'
287+
status:
288+
code: 202
289+
message: Accepted
290+
- request:
291+
body: null
292+
headers:
293+
Accept:
294+
- application/xml
295+
Accept-Encoding:
296+
- gzip, deflate
297+
Connection:
298+
- keep-alive
299+
User-Agent:
300+
- azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0)
301+
x-ms-date:
302+
- Thu, 14 Oct 2021 17:59:57 GMT
303+
x-ms-range:
304+
- bytes=0-33554431
305+
x-ms-version:
306+
- '2020-10-02'
307+
method: GET
308+
uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b?sharesnapshot=2021-10-14T17:59:57.0000000Z
309+
response:
310+
body:
311+
string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
312+
headers:
313+
accept-ranges:
314+
- bytes
315+
content-length:
316+
- '1024'
317+
content-range:
318+
- bytes 0-1023/1024
319+
content-type:
320+
- application/octet-stream
321+
date:
322+
- Thu, 14 Oct 2021 17:59:57 GMT
323+
etag:
324+
- '"0x8D98F3C6EC9B285"'
325+
last-modified:
326+
- Thu, 14 Oct 2021 17:59:56 GMT
327+
server:
328+
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
329+
vary:
330+
- Origin
331+
x-ms-file-attributes:
332+
- Archive
333+
x-ms-file-change-time:
334+
- '2021-10-14T17:59:56.8437254Z'
335+
x-ms-file-creation-time:
336+
- '2021-10-14T17:59:56.8437254Z'
337+
x-ms-file-id:
338+
- '11529285414812647424'
339+
x-ms-file-last-write-time:
340+
- '2021-10-14T17:59:56.8437254Z'
341+
x-ms-file-parent-id:
342+
- '13835128424026341376'
343+
x-ms-file-permission-key:
344+
- 4099112195243312672*10394889115079208622
345+
x-ms-server-encrypted:
346+
- 'true'
347+
x-ms-type:
348+
- File
349+
x-ms-version:
350+
- '2020-10-02'
351+
status:
352+
code: 206
353+
message: Partial Content
354+
version: 1

0 commit comments

Comments
 (0)