blob: a627c770a0871a70be4ac326128d6eaf526fba39 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
use crate::common;
#[tokio::test]
async fn test_simple() {
use aws_sdk_s3::ByteStream;
let ctx = common::context();
ctx.create_bucket("test-simple");
let data = ByteStream::from_static(b"Hello world!");
ctx.client
.put_object()
.bucket("test-simple")
.key("test")
.body(data)
.send()
.await
.unwrap();
let res = ctx
.client
.get_object()
.bucket("test-simple")
.key("test")
.send()
.await
.unwrap();
assert_bytes_eq!(res.body, b"Hello world!");
}
#[tokio::test]
async fn test_simple_2() {
use aws_sdk_s3::ByteStream;
let ctx = common::context();
ctx.create_bucket("test-simple-2");
let data = ByteStream::from_static(b"Hello world!");
ctx.client
.put_object()
.bucket("test-simple-2")
.key("test")
.body(data)
.send()
.await
.unwrap();
let res = ctx
.client
.get_object()
.bucket("test-simple-2")
.key("test")
.send()
.await
.unwrap();
assert_bytes_eq!(res.body, b"Hello world!");
}
|