-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf630c7
commit 2cc56af
Showing
10 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
|
||
if( eckit_HAVE_S3 ) | ||
|
||
file( | ||
COPY S3Config.yaml S3Credentials.yaml | ||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
ecbuild_add_test( | ||
TARGET eckit_test_s3client | ||
SOURCES test_s3client.cc | ||
INCLUDES ${AWSSDK_INCLUDE_DIRS} | ||
LIBS eckit ${AWSSDK_LINK_LIBRARIES} | ||
) | ||
|
||
ecbuild_add_test( | ||
TARGET eckit_test_s3handle | ||
SOURCES test_s3handle.cc | ||
INCLUDES ${AWSSDK_INCLUDE_DIRS} | ||
LIBS eckit ${AWSSDK_LINK_LIBRARIES} | ||
) | ||
set( S3_TEST_HOST "minio" ) | ||
set( S3_TEST_PORT "9000" ) | ||
set( S3_TEST_ENDPOINT ${S3_TEST_HOST}:${S3_TEST_PORT} ) | ||
set( S3_TEST_REGION "eu-central-1" ) | ||
set( S3_TEST_BUCKET "eckit-test-bucket" ) | ||
|
||
configure_file( test_s3_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/test_s3_config.h @ONLY ) | ||
|
||
configure_file( S3Config.yaml.in S3Config.yaml @ONLY ) | ||
configure_file( S3Credentials.yaml.in S3Credentials.yaml @ONLY ) | ||
|
||
set( test_srcs client handle ) | ||
|
||
foreach( _test ${test_srcs} ) | ||
|
||
ecbuild_add_test( | ||
TARGET eckit_test_s3_${_test} | ||
SOURCES test_s3_${_test}.cc | ||
INCLUDES test_s3_config.h ${AWSSDK_INCLUDE_DIRS} | ||
LIBS eckit ${AWSSDK_LINK_LIBRARIES} | ||
ENVIRONMENT "${_test_environment}" | ||
) | ||
|
||
endforeach() | ||
|
||
endif( eckit_HAVE_S3 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
--- | ||
servers: | ||
- endpoint: @S3_TEST_ENDPOINT@ | ||
region: @S3_TEST_REGION@ | ||
|
||
- endpoint: "127.0.0.1:9000" | ||
region: "default" # (default) | ||
secure: true # (default) | ||
backend: "AWS" # (default) | ||
|
||
- endpoint: "minio:9000" | ||
region: "eu-central-1" | ||
secure: true # (default) | ||
backend: "AWS" # (default) | ||
|
||
- endpoint: "localhost:9000" | ||
region: "eu-central-1" | ||
secure: true # (default) | ||
backend: "AWS" # (default) | ||
|
||
# region is inferred from the endpoint | ||
- endpoint: "eu-central-1.ecmwf.int:9000" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
credentials: | ||
- endpoint: @S3_TEST_ENDPOINT@ | ||
accessKeyID: minio | ||
secretKey: minio1234 | ||
|
||
- endpoint: localhost:9000 | ||
accessKeyID: asd1 | ||
secretKey: asd1 | ||
|
||
- endpoint: 127.0.0.1:9000 | ||
accessKeyID: asd2 | ||
secretKey: asd2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* (C) Copyright 1996- ECMWF. | ||
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation nor | ||
* does it submit to any jurisdiction. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define S3_TEST_HOST "minio" | ||
#define S3_TEST_PORT "9000" | ||
#define S3_TEST_ENDPOINT "minio:9000" | ||
#define S3_TEST_REGION "eu-central-1" | ||
#define S3_TEST_BUCKET "eckit-test-bucket" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* (C) Copyright 1996- ECMWF. | ||
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation nor | ||
* does it submit to any jurisdiction. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#cmakedefine S3_TEST_HOST "@S3_TEST_HOST@" | ||
#cmakedefine S3_TEST_PORT "@S3_TEST_PORT@" | ||
#cmakedefine S3_TEST_ENDPOINT "@S3_TEST_ENDPOINT@" | ||
#cmakedefine S3_TEST_REGION "@S3_TEST_REGION@" | ||
#cmakedefine S3_TEST_BUCKET "@S3_TEST_BUCKET@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters