Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit ad16465

Browse files
committed
test: added scaffolding for testing events
Signed-off-by: Mateusz Urbanek <[email protected]>
1 parent 7eaa72c commit ad16465

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go

+23
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
8+
"k8s.io/apimachinery/pkg/runtime"
89
"k8s.io/client-go/kubernetes/fake"
910
"k8s.io/client-go/tools/record"
1011

@@ -79,6 +80,28 @@ func TestAddBRIdempotency(t *testing.T) {
7980
runCreateBucketIdempotency(t, "addWithMultipleBR")
8081
}
8182

83+
// Test recording events
84+
func TestRecordEvents(t *testing.T) {
85+
t.Parallel()
86+
87+
for _, tc := range []struct {
88+
name string
89+
expectedEvent struct {
90+
subject runtime.Object
91+
reason string
92+
message string
93+
}
94+
}{} {
95+
tc := tc
96+
97+
t.Run(tc.name, func(t *testing.T) {
98+
t.Parallel()
99+
100+
// TODO: actual test
101+
})
102+
}
103+
}
104+
82105
func runCreateBucket(t *testing.T, name string) {
83106
ctx, cancel := context.WithCancel(context.Background())
84107
defer cancel()

0 commit comments

Comments
 (0)