Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion e2e/channel/crud_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

var _ = ginkgo.Describe("[Suite: channel][crud] Channel CRUD Lifecycle",
ginkgo.Label(labels.Tier1),
ginkgo.Label(labels.Tier0),
func() {
var h *helper.Helper
var channelID string
Expand Down Expand Up @@ -87,6 +87,23 @@ var _ = ginkgo.Describe("[Suite: channel][crud] Channel CRUD Lifecycle",
Expect(fetched.Spec["is_default"]).To(Equal(true))
})

ginkgo.It("should update channel labels via PATCH", func(ctx context.Context) {
ginkgo.By("patching channel labels")
patched, err := h.Client.PatchChannel(ctx, channelID, client.ResourcePatchRequest{
Labels: map[string]string{
"crud": channelID,
},
})
Expect(err).NotTo(HaveOccurred(), "failed to patch channel")
Expect(patched.Generation).To(Equal(int32(2)), "generation should increment after PATCH")

ginkgo.By("verifying patched labels via GET")
fetched, err := h.Client.ListChannels(ctx, "labels.crud='"+channelID+"'")
Expect(err).NotTo(HaveOccurred())
Expect(fetched.Items).To(HaveLen(1), "should have 1 channel")
Expect(fetched.Items[0].Id).To(HaveValue(Equal(channelID)))
})
Comment thread
coderabbitai[bot] marked this conversation as resolved.

ginkgo.It("should delete channel", func(ctx context.Context) {
ginkgo.By("deleting channel")
deleted, err := h.Client.DeleteChannel(ctx, channelID)
Expand Down
19 changes: 18 additions & 1 deletion e2e/version/crud_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

var _ = ginkgo.Describe("[Suite: version][crud] Version CRUD Lifecycle",
ginkgo.Label(labels.Tier1),
ginkgo.Label(labels.Tier0),
func() {
var h *helper.Helper
var channelID string
Expand Down Expand Up @@ -98,6 +98,23 @@ var _ = ginkgo.Describe("[Suite: version][crud] Version CRUD Lifecycle",
Expect(fetched.Spec["raw_version"]).To(Equal("4.18.0"))
})

ginkgo.It("should update version labels via PATCH", func(ctx context.Context) {
ginkgo.By("patching version labels")
patched, err := h.Client.PatchVersion(ctx, channelID, versionID, client.ResourcePatchRequest{
Labels: map[string]string{
"crud": versionID,
},
})
Expect(err).NotTo(HaveOccurred(), "failed to patch version")
Expect(patched.Generation).To(Equal(int32(2)), "generation should increment after PATCH")

ginkgo.By("verifying patched labels via LIST")
fetched, err := h.Client.ListVersions(ctx, channelID, "labels.crud='"+versionID+"'")
Expect(err).NotTo(HaveOccurred())
Expect(fetched.Items).To(HaveLen(1), "should have 1 version")
Expect(fetched.Items[0].Id).To(HaveValue(Equal(versionID)))
})

ginkgo.It("should delete version", func(ctx context.Context) {
ginkgo.By("deleting version")
deleted, err := h.Client.DeleteVersion(ctx, channelID, versionID)
Expand Down
110 changes: 0 additions & 110 deletions e2e/version/filtering.go

This file was deleted.

100 changes: 0 additions & 100 deletions e2e/version/uniqueness.go

This file was deleted.