package indexer_test
import (
"fmt"
"testing"
indexer "github.com/ethereum-optimism/optimism/indexer"
"github.com/stretchr/testify/require"
)
var validateConfigTests = []struct {
name string
cfg indexer.Config
expErr error
}{
{
name: "bad log level",
cfg: indexer.Config{
LogLevel: "unknown",
},
expErr: fmt.Errorf("unknown level: unknown"),
},
}
// TestValidateConfig asserts the behavior of ValidateConfig by testing expected
// error and success configurations.
func TestValidateConfig(t *testing.T) {
for _, test := range validateConfigTests {
t.Run(test.name, func(t *testing.T) {
err := indexer.ValidateConfig(&test.cfg)
require.Equal(t, err, test.expErr)
})
}
}
-
Matthew Slipper authored
- Adopts Go workspaces for future compatibility with the Bedrock move into the monorepo - Moves Go packages to the root of the repo in order to fix import paths - Rewrites existing Go import paths - Removes Stackman, since it's not needed anymore Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
5d309e6a