Skip to content

Commit

Permalink
fix failing unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Rashmi Gottipati <[email protected]>
  • Loading branch information
rashmigottipati committed Jun 7, 2024
1 parent 5047394 commit 4e5c8dc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/operators/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,16 @@ func TestUpdateStrategyUnmarshal(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
s := TestStruct{}
err := json.Unmarshal(tt.in, &s)
require.Equal(t, tt.out.UpdateStrategy.RawInterval, s.UpdateStrategy.RawInterval)
require.Equal(t, tt.out.UpdateStrategy.Interval, s.UpdateStrategy.Interval)
require.Equal(t, tt.out.UpdateStrategy.ParsingError, s.UpdateStrategy.ParsingError)
if s.UpdateStrategy.RegistryPoll != nil {
require.Equal(t, tt.out.UpdateStrategy.RawInterval, s.UpdateStrategy.RawInterval)
}
if s.UpdateStrategy.RegistryPoll != nil && s.UpdateStrategy.Interval != nil {
require.Equal(t, tt.out.UpdateStrategy.Interval, s.UpdateStrategy.Interval)
}

if s.UpdateStrategy.RegistryPoll != nil {
require.Equal(t, tt.out.UpdateStrategy.ParsingError, s.UpdateStrategy.ParsingError)
}
require.Equal(t, tt.err, err)
})
}
Expand Down

0 comments on commit 4e5c8dc

Please sign in to comment.