title: Disabling config server for tests
body: <p>I am using microservice architecture where the services are done with spring boot, to control them, I am using zuul as a proxy, eureka as register and config server as the configuration provider.</p>
  
  <p>In the microservices I configure my bootstrap.yml file as follows:</p>
  
  <pre><code>spring:
    application:
      name: portal-gca-server-${MYENV:local}
    cloud:
      config:
        uri: http://localhost:9090
  </code></pre>
  
  <p>As seen above, the config file name that I look for in the config server is according to my environment variable, otherwise I get the local profile.
  This works fine, but when I run the tests on the development machine it will never work, because instead of searching for the test profile it searches for the location, because the dev machine has no environment variable.
  I know I could register the environment variable to run the tests but that's not the intention or else I would have to do this all the time to run tests and to run the local application.</p>
  
  <p>Is there any way to solve this? I already tried to use the annotations:</p>
  
  <pre><code>webEnvironment = SpringBootTest.WebEnvironment.MOCK
  @ActiveProfiles("test")
  @TestPropertySource(locations="classpath:application-test.properties")
  </code></pre>
  
  <p>None of them any good, because the first thing the application does when executed is to fetch the information in git according to bootstrap.yml.</p>
  
  <p>Has anyone ever experienced this? </p>