New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow easily running tests against AWS #482
Conversation
efd2496
to
00c4507
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current config, galley tests fail with
post cryptomessage 1: [brig] E, request=N/A, GeneralError (TransportError (HttpExceptionRequest Request {
[brig] host = "localhost"
[brig] port = 4569
[brig] secure = False
(i.e. brig is trying to connect to localhost here, but I don't run the fake-AWS services locally). The configuration doesn't seem right.
services/cargohold/Makefile
Outdated
@@ -64,6 +64,10 @@ $(DEB_IT): | |||
i: | |||
../integration.sh $(EXE_IT) -s $(NAME).integration.yaml -i ../integration.yaml | |||
|
|||
.PHONY: i-aws | |||
i-aws: | |||
INTEGRATION_USE_REAL_AWS=1 ../integration.sh $(EXE_IT) -s $(NAME).integration.yaml -i ../integration.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to use -s $(NAME).integration-aws.yaml
? The script writes merges and writes to that file, but the Makefile doesn't use that. (same for all the Makefiles)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm, yeah... rebase gone wrong :/ should be all green now
services/gen-aws-conf.sh
Outdated
then | ||
echo "Could not find AWS config file to override settings, specify a location on S3 to download the file or add one at ${DIR}/integration-aws.yaml and retry: " | ||
read location | ||
aws s3 cp s3://$location . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect path. Should be aws s3 cp s3://$location "${DIR}/integration-aws.yaml"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Also, there are a few warnings in the bash script when running |
00c4507
to
61521c6
Compare
Oh nice one, thanks for the tip. |
Should be much cleaner now, assumes that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Currently we tend to test things only against fake/mocked AWS services; while this is nice from a feedback loop point of view, it would also be helpful to be able to test things against the actual AWS API and get that sort of feedback sooner rather than later.
This PR intends to streamline that workflow making some assumptions:
AWS_REGION
,AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
. ThisAWS_ACCESS_KEY_ID
has access to the resources specified in the configuration filesIf the preconditions are met, one can simply run
make i-aws
which is equivalent tomake integration
except that it attempts to use real AWS resources instead.