@@ -203,7 +203,7 @@ var _ = Describe("Cluster create/delete flow", Ordered, func() {
203203 params := api.PutV2ClustersNameLabelsParams {}
204204 params .Activeprojectid = testTenantID
205205 body := api.PutV2ClustersNameLabelsJSONRequestBody {
206- Labels : & map [string ]string {"app" : "wordpress" },
206+ Labels : & map [string ]string {"app" : "wordpress" , "default-extension" : "baseline" },
207207 }
208208 resp , err := cli .PutV2ClustersNameLabelsWithResponse (context .Background (), clusterName , & params , body )
209209 Expect (err ).ToNot (HaveOccurred ())
@@ -218,10 +218,9 @@ var _ = Describe("Cluster create/delete flow", Ordered, func() {
218218 Expect (err ).ToNot (HaveOccurred ())
219219 Expect (resp .StatusCode ()).To (Equal (200 ))
220220 Expect (* resp .JSON200 .Name ).To (Equal (clusterName ))
221- Expect (* resp .JSON200 .Labels ).To (HaveLen (3 ))
221+ Expect (* resp .JSON200 .Labels ).To (HaveLen (2 ))
222222 Expect (* resp .JSON200 .Labels ).To (HaveKeyWithValue ("app" , "wordpress" ))
223223 Expect (* resp .JSON200 .Labels ).To (HaveKeyWithValue ("default-extension" , "baseline" ))
224- Expect (* resp .JSON200 .Labels ).To (HaveKeyWithValue ("trusted-compute-compatible" , "false" ))
225224 Expect (* resp .JSON200 .Nodes ).To (HaveLen (1 ))
226225 nodes := * resp .JSON200 .Nodes
227226 Expect (* nodes [0 ].Role ).To (Equal ("all" ))
@@ -234,13 +233,35 @@ var _ = Describe("Cluster create/delete flow", Ordered, func() {
234233 err = containsLabels (testTenantID .String (), clusterName , []string {
235234 "app:wordpress" ,
236235 "default-extension:baseline" ,
237- "trusted-compute-compatible:false" ,
238236 fmt .Sprintf ("edge-orchestrator.intel.com/clustername:%v" , clusterName ),
239237 fmt .Sprintf ("edge-orchestrator.intel.com/project-id:%v" , testTenantID .String ()),
240238 })
241239 Expect (err ).ToNot (HaveOccurred ())
242240 })
243241
242+ It ("Should delete label" , func () {
243+ params := api.PutV2ClustersNameLabelsParams {}
244+ params .Activeprojectid = testTenantID
245+ body := api.PutV2ClustersNameLabelsJSONRequestBody {
246+ Labels : & map [string ]string {"default-extension" : "baseline" },
247+ }
248+ resp , err := cli .PutV2ClustersNameLabelsWithResponse (context .Background (), clusterName , & params , body )
249+ Expect (err ).ToNot (HaveOccurred ())
250+ Expect (resp .StatusCode ()).To (Equal (200 ))
251+
252+ })
253+
254+ It ("Deleted label should be missing in label list" , func () {
255+ params := api.GetV2ClustersNameParams {}
256+ params .Activeprojectid = testTenantID
257+ resp , err := cli .GetV2ClustersNameWithResponse (context .Background (), clusterName , & params )
258+ Expect (err ).ToNot (HaveOccurred ())
259+ Expect (resp .StatusCode ()).To (Equal (200 ))
260+ Expect (* resp .JSON200 .Name ).To (Equal (clusterName ))
261+ Expect (* resp .JSON200 .Labels ).To (HaveLen (1 ))
262+ Expect (* resp .JSON200 .Labels ).To (HaveKeyWithValue ("default-extension" , "baseline" ))
263+ })
264+
244265 It ("Should fail to delete cluster template if cluster is running" , func () {
245266 params := api.DeleteV2TemplatesNameVersionParams {}
246267 params .Activeprojectid = testTenantID
0 commit comments