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

helper utilities for accessing service environment variables #165

Open
n1ru4l opened this issue Mar 20, 2020 · 0 comments
Open

helper utilities for accessing service environment variables #165

n1ru4l opened this issue Mar 20, 2020 · 0 comments

Comments

@n1ru4l
Copy link
Collaborator

n1ru4l commented Mar 20, 2020

Is your feature request related to a problem? Please describe.
It would be nice to have a helper function for retrieving an environment variable value from a service configuration. E.g. Inside your test you want to enqueue something to a redis queue whose name is set through a container environment variable.

Describe the solution you'd like
Add a helper function to the docker/test-helper.

// throws in case `serviceName` or `environmentVariableName` does not exist.
type ResolveServiceEnvironmentVariableValue = (
  serviceName: string,
  environmentVariableName: string
) => string

Describe alternatives you've considered

  • Hardcoding the environment variables inside your tests.
  • Load the docker-compose.yml file inside the test file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant