Closed Ganeshrockz closed 9 months ago
In RegisterScenario
function r.Register(scenarios.ScenarioRegistration{
error is not handled.
In RegisterScenario function r.Register(scenarios.ScenarioRegistration{ error is not handled.
Merging this without running acceptance tests for this PR because these changes should not affect them in anyway. Will trigger the workflow (added in this PR for running the examples) once it gets merged to main.
Changes proposed in this PR:
TLDR~ Framework to ease examples validation present in this repository.
Background
Framework
TestScenario
that takes in the name of scenario (a terraform example config), applies the terraform, runs validations and destroys the deployment.Alternatives
Future work
How I've tested this PR:
CI, Local testing
How I expect reviewers to test this PR:
examples/main_test.go
contains the core logic for testing these scenarios with hooks that needs to be implemented by each scenario.examples/scenarios/
with each scenario defined in it's own folder and thecommon
folder holding all the helper functions.Validate()
function for each scenario holds custom logic that differs according to the deployment topology of the workloads. EOD, all examples try to deploy a client and server application and verify if the communication between them flows through the mesh. This logic can be found inValidateFakeServiceResponse
where we hit the client app's load balancer and verify if the desired upstream is hit. To review the individual validate functions, you might need to go over the README.md file for the example present in theexamples/
folder. For example to understand how the validation works for service-sameness, please go overexamples/service-sameness/README.md
.Checklist: