mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
allow s3 test in docker
read AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY from ./aws.creds when running: make docker-system-tests
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -48,3 +48,5 @@ build/
|
||||
pgp/keyrings/aptly2*.gpg
|
||||
pgp/keyrings/aptly2*.gpg~
|
||||
pgp/keyrings/.#*
|
||||
|
||||
*.creds
|
||||
|
||||
1
Makefile
1
Makefile
@@ -66,6 +66,7 @@ docker-test: install
|
||||
@rm -f aptly.test
|
||||
go test -v -coverpkg="./..." -c -tags testruncli
|
||||
@echo Running python tests ...
|
||||
@test -e aws.creds && . ./aws.creds; \
|
||||
export PATH=$(BINPATH)/:$(PATH); \
|
||||
export APTLY_VERSION=$(VERSION); \
|
||||
$(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE) $(TEST)
|
||||
|
||||
@@ -8,7 +8,7 @@ try:
|
||||
if 'AWS_SECRET_ACCESS_KEY' in os.environ and 'AWS_ACCESS_KEY_ID' in os.environ:
|
||||
s3_conn = boto.connect_s3()
|
||||
else:
|
||||
print("S3 tests disabled: AWS creds not found in the environment")
|
||||
print("S3 tests disabled: AWS creds not found in the environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)")
|
||||
s3_conn = None
|
||||
except ImportError as e:
|
||||
print("S3 tests disabled: can't import boto", e)
|
||||
@@ -32,6 +32,8 @@ class S3Test(BaseTest):
|
||||
"test1": {
|
||||
"region": "us-east-1",
|
||||
"bucket": self.bucket_name,
|
||||
"awsAccessKeyID": os.environ["AWS_ACCESS_KEY_ID"],
|
||||
"awsSecretAccessKey": os.environ["AWS_SECRET_ACCESS_KEY"]
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user