Sorry for the delay, this took me some time to try this in the lab.
In my lab environment, running SCS 2.0.8, this works as expected. Let me walk you through what I did to confirm.
1.) I created a service and pointed it to https://github.com/dmikusa-pivotal/cook-config, which is my fork of the demo config repo. I didn't set a search path and just used the master branch.
cf create-service -c '{ "git": { "uri": "https://github.com/spring-cloud-services-samples/cook-config", "label": "master" } }' p-config-server standard cook-config-server
2.) I then pushed the cook demo app. See here. This should automatically bind the service from step #[1.]
3.) Access the app in your browser and go to the `/restaurants` endpoint to confirm that it's working. When the `development` profile is set, you should see the message from the dev config file & when `production` is set you should see the message from the prod config. This is a basic sanity check.
4.) From here on out, it is easier to test the functionality using `curl` than it is with an app. To do that you need to grab a couple pieces of information. So run `cf env cook` and look at the VCAP_SERVICES for the app. Grab the uri, client_id and client_secret. We'll use them in the next step.
5.) We can then query config server directly using the following `curl` command (this needs a Bash shell and won't work on Windows, at least without the subsystem for Linux or something like that). Makes sure you insert the uri, client id and client secret into the place holders in the command before you run it.
curl -k -H "Authorization: bearer $(curl -k -s -X POST 'https://p-spring-cloud-services.uaa.run.pivotal.io/oauth/token' -d 'grant_type=client_credentials&client_id=<insert client id>&client_secret=<insert client_secret>' | jq .access_token | cut -d '"' -f 2)" <insert uri>/cook/prod
This will do two things. First, it will use the client_id and client_secret to fetch a token. The token is then used in a second request to actually request some data from the config server.
To test, we want to update our service and do two things. First, point to the `search-paths` branch of my config repo which has folders. Second, add in a single searchPaths entry. We'll start there and work up to multiple searchPaths.
cf update-service -c '{ "git": { "uri": "https://github.com/dmikusa-pivotal/cook-config.git", "label": "search-paths", "searchPaths": "dev" } }' cook-config-server
When that has completed, run the curl command above and check the output. You should see that it's found two config files, cook.properties from the root and dev/cook.properties.
Update the service again and add a second search path.
cf update-service -c '{ "git": { "uri": "https://github.com/dmikusa-pivotal/cook-config.git", "label": "search-paths", "searchPaths": "dev,prod" } }' cook-config-server
When this completes run the curl command again. This time you should see config from three files. It will look like the output below. You should be able to see that it's returning config from all three locations: the root, my first search path and my second search path (since these all have config files that match the app name), which is what the search path feature is supposed to do.
{"name":"cook","profiles":["prod"],"label":null,"version":"5d5a3f26022dd00becdbad855c7d27ae530685f7","state":null,"propertySources":[{"name":"https://github.com/dmikusa-pivotal/cook-config.git/prod/cook.properties","source":{"cook.special":"Prod Config"}},{"name":"https://github.com/dmikusa-pivotal/cook-config.git/dev/cook.properties","source":{"cook.special":"Dev Config"}},{"name":"https://github.com/dmikusa-pivotal/cook-config.git/cook.properties","source":{"cook.special":"Not in Folder config"}}]}
At any rate, I hope that explains what the feature is supposed to do. You can then give it a try with your repo & see what you get back. It's difficult to provide more guidance without seeing the repo and requests that you're making. If you need more help, please follow up with the URL to a public repo with your config, the `cf update-service -c` config and the `curl` command you're using to load the config.
Thanks!