mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-07 22:54:17 -05:00
29 lines
861 B
Go
29 lines
861 B
Go
package params_test
|
|
|
|
import (
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/OffchainLabs/prysm/v7/config/params"
|
|
"github.com/OffchainLabs/prysm/v7/testing/require"
|
|
"github.com/bazelbuild/rules_go/go/tools/bazel"
|
|
)
|
|
|
|
func TestSepoliaConfigMatchesUpstreamYaml(t *testing.T) {
|
|
presetFPs := presetsFilePath(t, "mainnet")
|
|
mn, err := params.ByName(params.MainnetName)
|
|
require.NoError(t, err)
|
|
cfg := mn.Copy()
|
|
for _, fp := range presetFPs {
|
|
cfg, err = params.UnmarshalConfigFile(fp, cfg)
|
|
require.NoError(t, err)
|
|
}
|
|
fPath, err := bazel.Runfile("external/sepolia_testnet")
|
|
require.NoError(t, err)
|
|
configFP := path.Join(fPath, "metadata", "config.yaml")
|
|
pcfg, err := params.UnmarshalConfigFile(configFP, nil)
|
|
require.NoError(t, err)
|
|
fields := fieldsFromYamls(t, append(presetFPs, configFP))
|
|
assertYamlFieldsMatch(t, "sepolia", fields, pcfg, params.SepoliaConfig())
|
|
}
|