Skip to content

Add test support for Cloudex #695

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

Merged
merged 1 commit into from
Feb 14, 2017
Merged

Add test support for Cloudex #695

merged 1 commit into from
Feb 14, 2017

Conversation

begedin
Copy link
Contributor

@begedin begedin commented Feb 13, 2017

What's in this PR?

This PR makes it so Cloudex can run in dev and test mode, even if the API keys are missing. Without this, the application will not start in either of the two modes.

I thought we had an issue for this, but I cannot find it. With this and #694, Cloudex should work much better.

config :cloudex, :cloudinary_api, Cloudex.CloudinaryApi.Test
config :cloudex, api_key: "test_key", secret: "test_secret", cloud_name: "test_cloud_name"

IO.puts("NOTE: No Cloudex configuration found. Cloudex is runnning in test mode.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to do this as a warn with a yellow log color.

Also, is this test_key, etc an actual Cloudinary value, or just something we're using?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just a random value. We need to provide a value, any value, or Cloudex raises an error on startup.

@begedin begedin force-pushed the cloudex-test-support branch 2 times, most recently from 788d9e6 to 390f286 Compare February 14, 2017 08:56
@begedin
Copy link
Contributor Author

begedin commented Feb 14, 2017

@joshsmith I replaced IO.puts with a require Logger and a Logger.warn to get the yellow text. Should be good to go now.

@joshsmith joshsmith force-pushed the cloudex-test-support branch from 390f286 to ea8524a Compare February 14, 2017 21:48
@joshsmith joshsmith merged commit 9178213 into develop Feb 14, 2017
@joshsmith joshsmith deleted the cloudex-test-support branch February 14, 2017 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants