File tree 10 files changed +44
-26
lines changed
10 files changed +44
-26
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ license = "Apache-2.0"
6
6
publish = false
7
7
edition = " 2021"
8
8
9
+ [lib ]
10
+ doctest = false
11
+ test = false
12
+
9
13
[dependencies ]
10
14
common-base = {path = " ../base" }
11
15
common-datablocks = {path = " ../datablocks" }
Original file line number Diff line number Diff line change @@ -14,4 +14,3 @@ async fn get(&self, path: &str) -> Result<Bytes>;
14
14
15
15
async fn put (& self , path : & str , content : Vec <u8 >) -> common_exception :: Result <()>;
16
16
```
17
-
Original file line number Diff line number Diff line change 11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
-
16
- #[ cfg( test) ]
17
- mod s3_input_stream_test;
18
14
19
15
mod metrics;
20
16
mod s3;
Original file line number Diff line number Diff line change 11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
-
16
- #[ cfg( test) ]
17
- mod azure_blob_accessor_test;
18
14
19
15
mod azure_blob_accessor;
20
16
mod azure_blob_input_stream;
Original file line number Diff line number Diff line change @@ -31,6 +31,3 @@ mod data_accessor;
31
31
mod impls;
32
32
mod in_memory_data;
33
33
mod schemes;
34
-
35
- #[ cfg( test) ]
36
- mod schemes_test;
Original file line number Diff line number Diff line change 11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
14
16
15
use std:: io:: SeekFrom ;
17
16
18
17
use common_base:: tokio;
18
+ use common_dal:: DataAccessor ;
19
+ use common_dal:: S3 ;
19
20
use common_exception:: ErrorCode ;
20
21
use futures:: AsyncReadExt ;
21
22
use futures:: AsyncSeekExt ;
@@ -25,9 +26,6 @@ use rusoto_s3::PutObjectRequest;
25
26
use rusoto_s3:: S3Client ;
26
27
use rusoto_s3:: S3 as RusotoS3 ;
27
28
28
- use crate :: DataAccessor ;
29
- use crate :: S3 ;
30
-
31
29
struct TestFixture {
32
30
region_name : String ,
33
31
endpoint_url : String ,
Original file line number Diff line number Diff line change 11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
14
16
15
use std:: io:: SeekFrom ;
17
16
use std:: str;
18
17
19
18
use common_base:: tokio;
19
+ use common_dal:: AzureBlobAccessor ;
20
+ use common_dal:: DataAccessor ;
20
21
use common_exception:: Result ;
21
22
use futures:: AsyncReadExt ;
22
23
use futures:: AsyncSeekExt ;
23
24
24
- use crate :: AzureBlobAccessor ;
25
- use crate :: DataAccessor ;
26
-
27
25
fn generate_test_data ( ) -> String {
28
26
let mut s = "0123456789" . to_string ( ) ;
29
27
s. push_str ( "abcdefghijklmnopqrstuvwxyz" ) ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2021 Datafuse Labs.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ mod aws_s3;
16
+ mod azure_blob;
Original file line number Diff line number Diff line change
1
+ // Copyright 2021 Datafuse Labs.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ mod impls;
16
+ mod schemes;
Original file line number Diff line number Diff line change 11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
14
16
15
use std:: str:: FromStr ;
17
16
17
+ use common_dal:: StorageScheme ;
18
+ use common_dal:: StorageScheme :: AzureStorageBlob ;
19
+ use common_dal:: StorageScheme :: LocalFs ;
20
+ use common_dal:: StorageScheme :: S3 ;
18
21
use common_exception:: ErrorCode ;
19
22
20
- use crate :: schemes:: StorageScheme :: AzureStorageBlob ;
21
- use crate :: schemes:: StorageScheme :: LocalFs ;
22
- use crate :: schemes:: StorageScheme :: S3 ;
23
- use crate :: StorageScheme ;
24
-
25
23
#[ test]
26
24
fn test_scheme_from_str ( ) {
27
25
let valid_schemes = vec ! [
You can’t perform that action at this time.
0 commit comments