Skip to content

Commit 89a5de7

Browse files
authored
Merge pull request #2 from ethpandaops/test-scheduler
Split test definitions from test executions & rework UI (structural work to allow dynamic test invocation)
2 parents 354342b + e256b2e commit 89a5de7

File tree

30 files changed

+1413
-967
lines changed

30 files changed

+1413
-967
lines changed

cmd/root.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var rootCmd = &cobra.Command{
3131
logr.SetLevel(logrus.DebugLevel)
3232
}
3333

34-
coord := coordinator.NewCoordinator(config, logr, metricsPort, lameDuckSeconds)
34+
coord := coordinator.NewCoordinator(config, logr, metricsPort)
3535

3636
if err := coord.Run(cmd.Context()); err != nil {
3737
log.Fatal(err)
@@ -41,11 +41,10 @@ var rootCmd = &cobra.Command{
4141
}
4242

4343
var (
44-
cfgFile string
45-
logFormat string
46-
verbose bool
47-
metricsPort int
48-
lameDuckSeconds int
44+
cfgFile string
45+
logFormat string
46+
verbose bool
47+
metricsPort int
4948
)
5049

5150
// Execute adds all child commands to the root command and sets flags appropriately.
@@ -65,5 +64,4 @@ func init() {
6564
rootCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Verbose output")
6665

6766
rootCmd.Flags().IntVarP(&metricsPort, "metrics-port", "", 9090, "Port to serve Prometheus metrics on")
68-
rootCmd.Flags().IntVarP(&lameDuckSeconds, "lame-duck-seconds", "", 30, "Lame duck period in seconds (wait for this long after completion before terminating")
6967
}

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0
88
github.com/ethereum/go-ethereum v1.13.8
99
github.com/ethpandaops/ethwallclock v0.3.0
10+
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
1011
github.com/gorilla/mux v1.8.1
1112
github.com/herumi/bls-eth-go-binary v1.31.0
1213
github.com/holiman/uint256 v1.2.4

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
113113
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
114114
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
115115
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
116+
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 h1:f0n1xnMSmBLzVfsMMvriDyA75NB/oBgILX2GcHXIQzY=
117+
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA=
116118
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
117119
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
118120
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=

pkg/coordinator/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/ethpandaops/assertoor/pkg/coordinator/clients"
77
"github.com/ethpandaops/assertoor/pkg/coordinator/names"
8-
"github.com/ethpandaops/assertoor/pkg/coordinator/test"
8+
"github.com/ethpandaops/assertoor/pkg/coordinator/types"
99
web_types "github.com/ethpandaops/assertoor/pkg/coordinator/web/types"
1010
"gopkg.in/yaml.v3"
1111
)
@@ -24,10 +24,10 @@ type Config struct {
2424
GlobalVars map[string]interface{} `yaml:"globalVars" json:"globalVars"`
2525

2626
// List of Test configurations.
27-
Tests []*test.Config `yaml:"tests" json:"tests"`
27+
Tests []*types.TestConfig `yaml:"tests" json:"tests"`
2828

2929
// List of yaml files with test configurations
30-
ExternalTests []*test.ExternalConfig `yaml:"externalTests" json:"externalTests"`
30+
ExternalTests []*types.ExternalTestConfig `yaml:"externalTests" json:"externalTests"`
3131
}
3232

3333
// DefaultConfig represents a sane-default configuration.
@@ -41,8 +41,8 @@ func DefaultConfig() *Config {
4141
},
4242
},
4343
GlobalVars: make(map[string]interface{}),
44-
Tests: []*test.Config{},
45-
ExternalTests: []*test.ExternalConfig{},
44+
Tests: []*types.TestConfig{},
45+
ExternalTests: []*types.ExternalTestConfig{},
4646
}
4747
}
4848

0 commit comments

Comments
 (0)