Skip to content

Commit 6a82f88

Browse files
Rambatinolukasmalkmus
authored andcommitted
fix(monitors): assert that second delay is 10 seconds in tests
1 parent c1a63c4 commit 6a82f88

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

axiom/monitors_integration_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (s *MonitorsTestSuite) SetupTest() {
6666
Operator: axiom.BelowOrEqual,
6767
Range: time.Minute * 5,
6868
Threshold: 1,
69-
SecondDelay: 10,
69+
SecondDelay: 10 * time.Second,
7070
NotifyEveryRun: true,
7171
SkipResolved: false,
7272
TriggerFromNRuns: 3,
@@ -75,6 +75,7 @@ func (s *MonitorsTestSuite) SetupTest() {
7575
})
7676
s.Require().NoError(err)
7777
s.Require().NotNil(s.monitor)
78+
s.Equal(10*time.Second, s.monitor.SecondDelay)
7879
}
7980

8081
func (s *MonitorsTestSuite) TearDownTest() {

axiom/monitors_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,12 @@ func TestMonitorsService_Update(t *testing.T) {
213213
Operator: Above,
214214
Range: time.Minute,
215215
Threshold: 1,
216-
SecondDelay: 10,
216+
SecondDelay: 10 * time.Second,
217217
}})
218218
require.NoError(t, err)
219219

220220
assert.Equal(t, exp, res)
221+
assert.Equal(t, 10*time.Second, res.SecondDelay)
221222
}
222223

223224
func TestMonitorsService_Delete(t *testing.T) {

0 commit comments

Comments
 (0)