Skip to content

Add a dummy app to simulate get_env calls#64

Open
javiermtorres wants to merge 1 commit intomasterfrom
test/simulate_app
Open

Add a dummy app to simulate get_env calls#64
javiermtorres wants to merge 1 commit intomasterfrom
test/simulate_app

Conversation

@javiermtorres
Copy link
Copy Markdown

No description provided.

@javiermtorres javiermtorres requested a review from a team as a code owner February 8, 2023 22:37
Comment thread src/capwap_loc_provider.erl
Comment thread test/capwap_dummy_app.erl Outdated
Comment thread test/capwap_loc_provider_SUITE.erl
Comment thread test/loc_provider_proxy.erl Outdated
@javiermtorres javiermtorres force-pushed the test/simulate_app branch 2 times, most recently from 05b718c to 8ee0727 Compare February 8, 2023 22:55
Copy link
Copy Markdown
Member

@RoadRunnr RoadRunnr left a comment

Choose a reason for hiding this comment

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

so much effort just to be able to use application:get_env/1 instead of application:get_env/2 ???

There is no explicit note on the intended use of application:get_env/1 in the documentation, but from checking the OTP applications and the source of application, I get the impression that the /1 variant is intended for libraries that want to read the environment of the calling application without having to know what that application is.

This project is clearly not a library and it knows exactly which application environment it wants to read or write to. I therefore see no value in adding the complexity to the test to simulate an application. Just use application:get_env(capwap, Value) everywhere and be done with it.

@javiermtorres
Copy link
Copy Markdown
Author

It's already done.

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

Successfully merging this pull request may close these issues.

3 participants