Skip to content

Commit

Permalink
test(pruner/full | pruner/light): Const tests
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed May 6, 2024
1 parent f2db59a commit 92cd68a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pruner/full/window_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package full

import (
"testing"
"time"

"github.com/stretchr/testify/assert"
)

// TestFullWindowConst exists to ensure that any changes to the sampling window
// are deliberate.
func TestFullWindowConst(t *testing.T) {
assert.Equal(t, time.Duration(Window), (30*24*time.Hour)+time.Hour)
}
14 changes: 14 additions & 0 deletions pruner/light/window_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package light

import (
"testing"
"time"

"github.com/stretchr/testify/assert"
)

// TestLightWindowConst exists to ensure that any changes to the sampling window
// are deliberate.
func TestLightWindowConst(t *testing.T) {
assert.Equal(t, time.Duration(Window), 30*24*time.Hour)
}

0 comments on commit 92cd68a

Please sign in to comment.