Motivation
We currently only assert priorities in "service qualities" e2e. We should also validate that a ServiceQuality action can set opsState and write custom labels/annotations on a GameServer.
What to test
- A simple exec probe (always returns a fixed exit code/message).
- Action maps state/result to:
opsState change (e.g., to Maintaining).
- Metadata labels/annotations (e.g.,
sq=healthy, note=updated).
Proposed approach
- Deploy a basic GSS (3 replicas).
- Patch
.spec.serviceQualities via f.PatchGssSpec with a single probe:
- Wait until the condition is written (Pod condition) and then verify:
gs.Spec.OpsState matches expectation.
gs.metadata.labels/annotations contain the expected keys/values.
Acceptance criteria
- New e2e test added under
test/e2e/testcase that passes in CI.
- Verifies both
opsState and metadata mutations for at least one GameServer.
Useful pointers
- Controller applies actions:
pkg/controllers/gameserver/gameserver_manager.go
- E2E helpers:
test/e2e/framework/framework.go
- Existing basic SQ test for reference:
test/e2e/testcase/testcase.go
How to run
It's recommended to update your code in PR and wait for CI results.
Motivation
We currently only assert priorities in "service qualities" e2e. We should also validate that a ServiceQuality action can set
opsStateand write custom labels/annotations on a GameServer.What to test
opsStatechange (e.g., toMaintaining).sq=healthy,note=updated).Proposed approach
.spec.serviceQualitiesviaf.PatchGssSpecwith a single probe:opsState=Maintainingand labels/annotations.opsState=None.gs.Spec.OpsStatematches expectation.gs.metadata.labels/annotationscontain the expected keys/values.Acceptance criteria
test/e2e/testcasethat passes in CI.opsStateand metadata mutations for at least one GameServer.Useful pointers
pkg/controllers/gameserver/gameserver_manager.gotest/e2e/framework/framework.gotest/e2e/testcase/testcase.goHow to run
It's recommended to update your code in PR and wait for CI results.