mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
fecbec2342
* part1 * go tidy * Merge branch 'go-tidy' into apply-testutils-assertions-to-beaconchain-db * updated beacon-chain/db/kv tests * Merge branch 'master' into apply-testutils-assertions-to-beaconchain-db * Merge refs/heads/master into apply-testutils-assertions-to-beaconchain-db * Merge refs/heads/master into apply-testutils-assertions-to-beaconchain-db
29 lines
762 B
Go
29 lines
762 B
Go
package kv
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
|
)
|
|
|
|
func TestVerifySlotsPerArchivePoint(t *testing.T) {
|
|
db := setupDB(t)
|
|
|
|
// This should set default to 2048.
|
|
require.NoError(t, db.verifySlotsPerArchivePoint())
|
|
|
|
// This should not fail with default 2048.
|
|
require.NoError(t, db.verifySlotsPerArchivePoint())
|
|
|
|
params.SetupTestConfigCleanup(t)
|
|
config := params.BeaconConfig()
|
|
config.SlotsPerArchivedPoint = 256
|
|
params.OverrideBeaconConfig(config)
|
|
|
|
// This should fail.
|
|
msg := "could not update --slots-per-archive-point after it has been set"
|
|
assert.ErrorContains(t, msg, db.verifySlotsPerArchivePoint())
|
|
}
|