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

Building via "mvn clean install" requires config server to run. If there is no config server available then it fails during test #25

Closed
BrunoSilvaATB opened this issue Jun 3, 2020 · 2 comments · Fixed by #158
Assignees
Milestone

Comments

@BrunoSilvaATB
Copy link
Contributor

After checking out the project, a normal “mvn clean install” should not require a connection to the CoatRack config server. We should consider including a default config for the tests, so that building including “mvn test” can be done without config server.

@BrunoSilvaATB BrunoSilvaATB self-assigned this Aug 11, 2020
@BrunoSilvaATB
Copy link
Contributor Author

@gr-hovest-atb I have been working on this issue and found different alternatives to solve it:

  • One that is working already (in my local) is by using an application-test.yml on local with the configuration wished (I used the default config on the config server), then the user just need to run on the console the command
    **mvn clean test -Dspring.profiles.active=test and uncomment the line with spring.cloud.config.enabled=false (added by me on the bootstrap.properties file)

  • The other way (I am trying it now) is to connect a Maven Profile (this maven profile needed to be activated by default and have a properties to pass to the bootstrap.properties of Spring Boot), so that when the user inserts the command "mvn test",
    Maven would activate the default profile and pass the parameter "test" to the Spring Boot profile activating it.

PS: For this to work, the Spring Cloud needs to be disabled ( spring.cloud.config.enabled=false in bootstrap.properties), I already added this line to the bootstrap.properties

@gr-hovest-atb
Copy link
Contributor

gr-hovest-atb commented Dec 7, 2021

It seems like this was "implicitly fixed" by #158

So I assume this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment