Created
October 31, 2017 20:35
-
-
Save kmacgugan/0b6a26d25a5a837acf65bf884530b5df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the converge-service you can use mocked data as the backend by passing in a config flag --elasticsearch or --mock | |
https://github.com/chef/converge-service/blob/master/cmd/converge-service/converge-service.go#L37 | |
If mock is passed in the server starts the mock backend when starting up: | |
https://github.com/chef/converge-service/blob/master/cmd/converge-service/converge-service.go#L82 | |
This sets up which backend the backend package interface is using. | |
Interface defined here: | |
https://github.com/chef/converge-service/blob/master/backend/client.go#L18 | |
The mock functions are easily implemented to return static data: | |
https://github.com/chef/converge-service/blob/master/backend/mock/mock.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment