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

Supporting local (mock) AWS endpoints for testing #63

Closed
marceldegraaf opened this issue Jan 16, 2015 · 7 comments · Fixed by #65
Closed

Supporting local (mock) AWS endpoints for testing #63

marceldegraaf opened this issue Jan 16, 2015 · 7 comments · Fixed by #65
Labels
feature-request A feature should be added or improved. help wanted We are asking the community to submit a PR to resolve this issue.

Comments

@marceldegraaf
Copy link
Contributor

We're wondering if it is currently possible (and if not, if you would be interested in a PR) to configure local mock endpoints in aws-go. We would love to use something like fake_sns or fake_sqs to test our SNS/SQS integration locally.

@stripecodahale
Copy link
Contributor

This isn't currently possible, but it would be a welcome change.

@stripecodahale stripecodahale added enhancement guidance Question that needs advice or information. help wanted We are asking the community to submit a PR to resolve this issue. and removed invalid guidance Question that needs advice or information. labels Jan 16, 2015
@marceldegraaf
Copy link
Contributor Author

Thanks, we'll look into submitting a PR for this.

@marceldegraaf
Copy link
Contributor Author

Hi @stripecodahale, my colleague @mrdg and I have discussed a possible implementation for this feature. We want to quickly run that by you before we start hacking on it :-).

So, our proposal is to add an overrides map to the endpoints package, containing tuples of service name (e.g. "ec2") and endpoint (e.g. "http://localhost:1234"). This overrides map has precedence over the existing code in endpoints.Lookup(), allowing one to override one or more service endpoints for local testing.

If you're OK with this, we'll submit the PR as soon as possible.

@stripecodahale
Copy link
Contributor

As long as the overrides are for specific regions — e.g. endpoints.Add("test1", etc)—it sounds good.

@marceldegraaf
Copy link
Contributor Author

I'm not sure I understand what you mean. Can you elaborate on what the region specifier should do in the context of a local service endpoint override? Thanks 😄

@stripecodahale
Copy link
Contributor

Sorry, that was vague. I'm going through email before having coffee. :)

I mean, I'd want to provide the ability to add test regions with specific endpoints rather than redefine the behavior of existing regions. Essentially, just add a region name to the (service, endpoint) tuple.

This way, test code could e.g. safely depend on a test-1 region instead of modifying the behavior of an existing region.

@marceldegraaf
Copy link
Contributor Author

Heh, no problem!

Alright, sounds good. We'll probably have a PR for this in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. help wanted We are asking the community to submit a PR to resolve this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants