WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e284830

Browse files
committed
as per crd
1 parent c919384 commit e284830

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

test/e2e/testcase/testcase.go

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,33 +116,26 @@ func RunTestCases(f *framework.Framework) {
116116
})
117117

118118
ginkgo.It("service qualities opsState and metadata", func() {
119-
// deploy
119+
// Deploy
120120
gss, err := f.DeployGssWithServiceQualities()
121121
gomega.Expect(err).To(gomega.BeNil())
122122
err = f.ExpectGssCorrect(gss, []int{0, 1, 2})
123123
gomega.Expect(err).To(gomega.BeNil())
124124

125-
// Patch serviceQualities with REQUIRED 'permanent' field
125+
// Patch serviceQualities with structure
126126
patchFields := map[string]interface{}{
127127
"serviceQualities": []map[string]interface{}{
128128
{
129-
"name": "health-check",
130-
"permanent": true, // REQUIRED FIELD
131-
"probe": map[string]interface{}{
132-
"exec": map[string]interface{}{
133-
"command": []string{"sh", "-c", "echo ok; exit 0"},
134-
},
129+
"name": "health-check",
130+
"containerName": "default-game",
131+
"permanent": false,
132+
"exec": map[string]interface{}{
133+
"command": []string{"sh", "-c", "exit 0"},
135134
},
136-
"actions": []map[string]interface{}{
135+
"serviceQualityAction": []map[string]interface{}{
137136
{
138-
"result": "ok",
137+
"state": true, // REQUIRED
139138
"opsState": "Maintaining",
140-
"labels": map[string]string{
141-
"sq": "healthy",
142-
},
143-
"annotations": map[string]string{
144-
"note": "updated",
145-
},
146139
},
147140
},
148141
},
@@ -160,12 +153,10 @@ func RunTestCases(f *framework.Framework) {
160153
err = f.WaitForGsSpecOpsState(gss.GetName()+"-2", "Maintaining")
161154
gomega.Expect(err).To(gomega.BeNil())
162155

163-
// Verify metadata (label + annotation)
156+
// Verify OpsState (labels/annotations are NOT supported by CRD)
164157
gs, err := f.GetGameServer(gss.GetName() + "-0")
165158
gomega.Expect(err).To(gomega.BeNil())
166-
167-
gomega.Expect(gs.GetLabels()["sq"]).To(gomega.Equal("healthy"))
168-
gomega.Expect(gs.GetAnnotations()["note"]).To(gomega.Equal("updated"))
159+
gomega.Expect(gs.Spec.OpsState).To(gomega.Equal("Maintaining"))
169160
})
170161

171162
ginkgo.Describe("network control", func() {

0 commit comments

Comments
 (0)