Skip to content
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

read aws credentials from STDIN #26

Merged
merged 6 commits into from
Sep 30, 2015
Merged

read aws credentials from STDIN #26

merged 6 commits into from
Sep 30, 2015

Conversation

csquared
Copy link
Contributor

fixes #19

works like:

aws sts get-session-token | convox install

@ddollar
Copy link
Contributor

ddollar commented Sep 17, 2015

@ddollar
Copy link
Contributor

ddollar commented Sep 17, 2015

mind adding a few tests around this one? i've added a couple of other examples of cli tests for other commands

@csquared
Copy link
Contributor Author

i thought you'd never ask :)

@csquared
Copy link
Contributor Author

so testing this isn't super straightforward. a call to install makes multiple network requests to four different hosts:

  • convox.s3.amazonaws.com (via convox/release/version
  • mixpanel
  • aws
  • the newly installed kernel

so far i've repurposed some of the controller test code to mock out the interaction w. aws.
right now i just return in install after the call to CreateStack so i could make sure that host was set up correctly.

stubbing out the new kernel should follow the pattern of some of the other tests.

still not sure what i want to do with S3 and mixpanel. i'm tempted to just let the S3 one hit the network but don't want to do that for mixpanel. thoughts welcome.

@ddollar
Copy link
Contributor

ddollar commented Sep 17, 2015

I would probably stub out the version-getter and mixpanel. You can create a VersionChecker variable that normally is the object from convox/release/version but can be set to a mock object during the tests.

@ddollar ddollar changed the title read aws credentials from STDIN [WIP] read aws credentials from STDIN Sep 18, 2015
@csquared csquared changed the title [WIP] read aws credentials from STDIN [BLOCKED] read aws credentials from STDIN Sep 18, 2015
@csquared csquared changed the title [BLOCKED] read aws credentials from STDIN read aws credentials from STDIN Sep 24, 2015
stackId := "arn:aws:cloudformation:us-east-1:123456789:stack/MyStack/aaf549a0-a413-11df-adb3-5081b3858e83"
cycles := []awsutil.Cycle{
awsutil.Cycle{
awsutil.Request{"/", "", "/./"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have to update this to check what we put in

@ddollar
Copy link
Contributor

ddollar commented Sep 24, 2015

Use pointers to return credentials so you can nil them

@csquared
Copy link
Contributor Author

even if i pass in a version, we make network requests. this is ready to merge

@ddollar
Copy link
Contributor

ddollar commented Sep 30, 2015

👍

ddollar added a commit that referenced this pull request Sep 30, 2015
@ddollar ddollar merged commit 371856c into master Sep 30, 2015
@ddollar ddollar deleted the sts-tokens-for-install branch September 30, 2015 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants