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 0dcf181 commit 3764930
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 3764930

Please sign in to comment.