Skip to content

E2E: ServiceQuality action updates opsState and metadata #291

@ballista01

Description

@ballista01

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions