mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
31 lines
1017 B
Go
31 lines
1017 B
Go
package epoch_processing
|
|
|
|
import (
|
|
"context"
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/electra"
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/helpers"
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
|
"github.com/OffchainLabs/prysm/v7/testing/require"
|
|
"github.com/OffchainLabs/prysm/v7/testing/spectest/utils"
|
|
)
|
|
|
|
func RunSyncCommitteeUpdatesTests(t *testing.T, config string) {
|
|
require.NoError(t, utils.SetConfig(t, config))
|
|
|
|
testFolders, testsFolderPath := utils.TestFolders(t, config, "electra", "epoch_processing/sync_committee_updates/pyspec_tests")
|
|
for _, folder := range testFolders {
|
|
t.Run(folder.Name(), func(t *testing.T) {
|
|
helpers.ClearCache()
|
|
folderPath := path.Join(testsFolderPath, folder.Name())
|
|
RunEpochOperationTest(t, folderPath, processSyncCommitteeUpdates)
|
|
})
|
|
}
|
|
}
|
|
|
|
func processSyncCommitteeUpdates(t *testing.T, st state.BeaconState) (state.BeaconState, error) {
|
|
return electra.ProcessSyncCommitteeUpdates(context.Background(), st)
|
|
}
|