Skip to content

Commit

Permalink
fix: config
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol committed Mar 10, 2024
1 parent c82b49b commit ae6a1bb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ checks:
options:
timeout: 5m
type: pingpong
withdraw:
options:
target-address: 0xec44cb15b1b033e74d55ac5d0e24d861bde54532
timeout: 5m
type: withdraw
pss:
options:
address-prefix: 2
Expand Down
5 changes: 5 additions & 0 deletions config/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/check/withdraw/withdraw.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package balances
package withdraw

import (
"context"
Expand Down
19 changes: 19 additions & 0 deletions pkg/config/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 := withdraw.NewDefaultOptions()

if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil {
return nil, fmt.Errorf("applying options: %w", err)
}

return opts, nil
},
},
Expand Down

0 comments on commit ae6a1bb

Please sign in to comment.