higress-group/higress
Optimize the e2e testing framework to support testing of resource modifications
Aberta
#814 aberto em 2 de fev. de 2024
area/e2ehelp wantedlevel/challenge
Métricas do repositório
- Stars
- (9.036 estrelas)
- Métricas de merge de PR
- (Mesclagem média 7d 9h) (18 fundiu PRs em 30d)
Description
Why do you need it?
Currently, for manifest resources, only tests after creation are supported, and modified tests are not supported.
How could it be?
Add the concept of stage to the test case. Each stage can modify or delete the manifest, and complete a staged test based on the stage.
And the manifest is not deleted after the stage is completed. Only when the overall test case is completed, all manifests created in the test case are deleted.
It might be configured like this:
var HTTPRouteAppRoot = suite.ConformanceTest{
ShortName: "HTTPRouteAppRoot",
Description: "The Ingress in the higress-conformance-infra namespace uses the app root.",
Manifests: []string{"tests/httproute-app-root-base.yaml"},
Features: []suite.SupportedFeature{suite.HTTPConformanceFeature},
Stages: []suite.ConformanceStageTestUnit {
{
Manifests: []string{"tests/httproute-app-root-stage-1.yaml","tests/httproute-app-route-temp.yaml"},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {},
},
{
Manifests: []string{"tests/httproute-app-root-stage-2.yaml"},
DeleteManifests: []string{"tests/httproute-app-route-temp.yaml"},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {},
},
}