Skip to content

Commit

Permalink
Add test to cover time.Duration convertion logic
Browse files Browse the repository at this point in the history
Signed-off-by: Feggah <[email protected]>
  • Loading branch information
Feggah committed Oct 10, 2022
1 parent 76b2966 commit 1ea920f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/clients/topic/topic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ func TestIsUpToDate(t *testing.T) {
obs pubsub.Topic
param v1alpha1.TopicParameters
}

upToDateTopic := topic()
upToDateTopic.MessageRetentionDuration = "600.00s"

cases := map[string]struct {
args
result bool
Expand All @@ -138,7 +142,7 @@ func TestIsUpToDate(t *testing.T) {
},
"UpToDate": {
args: args{
obs: *topic(),
obs: *upToDateTopic,
param: *params(),
},
result: true,
Expand Down

0 comments on commit 1ea920f

Please sign in to comment.