diff --git a/config/config.yaml b/config/config.yaml index 8a489dd69..da46699ab 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -215,6 +215,11 @@ checks: options: timeout: 5m type: pingpong + withdraw: + options: + target-address: 0xec44cb15b1b033e74d55ac5d0e24d861bde54532 + timeout: 5m + type: withdraw pss: options: address-prefix: 2 diff --git a/config/local.yaml b/config/local.yaml index 12caa42a3..444fd876f 100644 --- a/config/local.yaml +++ b/config/local.yaml @@ -263,6 +263,11 @@ checks: options: timeout: 5m type: pingpong + ci-withdraw: + options: + target-address: 0xec44cb15b1b033e74d55ac5d0e24d861bde54532 + timeout: 5m + type: withdraw ci-pss: options: count: 3 diff --git a/pkg/check/withdraw/withdraw.go b/pkg/check/withdraw/withdraw.go index d2455806d..f7bea71a3 100644 --- a/pkg/check/withdraw/withdraw.go +++ b/pkg/check/withdraw/withdraw.go @@ -1,4 +1,4 @@ -package balances +package withdraw import ( "context" diff --git a/pkg/config/check.go b/pkg/config/check.go index 4b69a1507..219f8f495 100644 --- a/pkg/config/check.go +++ b/pkg/config/check.go @@ -31,6 +31,7 @@ import ( "github.com/ethersphere/beekeeper/pkg/check/settlements" "github.com/ethersphere/beekeeper/pkg/check/smoke" "github.com/ethersphere/beekeeper/pkg/check/soc" + "github.com/ethersphere/beekeeper/pkg/check/withdraw" "github.com/ethersphere/beekeeper/pkg/logging" "github.com/ethersphere/beekeeper/pkg/random" "gopkg.in/yaml.v3" @@ -574,6 +575,24 @@ var Checks = map[string]CheckType{ return nil, fmt.Errorf("applying options: %w", err) } + return opts, nil + }, + }, + "withdraw": { + NewAction: withdraw.NewCheck, + NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) { + checkOpts := new(struct { + TargetAddr *string `yaml:"target-address"` + }) + if err := check.Options.Decode(checkOpts); err != nil { + return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err) + } + opts := smoke.NewDefaultOptions() + + if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil { + return nil, fmt.Errorf("applying options: %w", err) + } + return opts, nil }, },