Skip to content

Commit

Permalink
fix(monitors): assert that second delay is 10 seconds in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rambatino authored and lukasmalkmus committed Feb 19, 2025
1 parent c1a63c4 commit 6a82f88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion axiom/monitors_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *MonitorsTestSuite) SetupTest() {
Operator: axiom.BelowOrEqual,
Range: time.Minute * 5,
Threshold: 1,
SecondDelay: 10,
SecondDelay: 10 * time.Second,
NotifyEveryRun: true,
SkipResolved: false,
TriggerFromNRuns: 3,
Expand All @@ -75,6 +75,7 @@ func (s *MonitorsTestSuite) SetupTest() {
})
s.Require().NoError(err)
s.Require().NotNil(s.monitor)
s.Equal(10*time.Second, s.monitor.SecondDelay)
}

func (s *MonitorsTestSuite) TearDownTest() {
Expand Down
3 changes: 2 additions & 1 deletion axiom/monitors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@ func TestMonitorsService_Update(t *testing.T) {
Operator: Above,
Range: time.Minute,
Threshold: 1,
SecondDelay: 10,
SecondDelay: 10 * time.Second,
}})
require.NoError(t, err)

assert.Equal(t, exp, res)
assert.Equal(t, 10*time.Second, res.SecondDelay)
}

func TestMonitorsService_Delete(t *testing.T) {
Expand Down

0 comments on commit 6a82f88

Please sign in to comment.