Skip to content

Commit

Permalink
fix: revert file-retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Sárai committed Jul 19, 2024
1 parent 9f5341c commit 15ca2b4
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions pkg/config/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,25 @@ var Checks = map[string]CheckType{
"file-retrieval": {
NewAction: fileretrieval.NewCheck,
NewOptions: func(checkGlobalConfig CheckGlobalConfig, check Check) (interface{}, error) {
/*
checkOpts := new(struct {
FileName *string `yaml:"file-name"`
FileSize *int64 `yaml:"file-size"`
FilesPerNode *int `yaml:"files-per-node"`
Full *bool `yaml:"full"`
GasPrice *string `yaml:"gas-price"`
PostageAmount *int64 `yaml:"postage-amount"`
PostageLabel *string `yaml:"postage-label"`
Seed *int64 `yaml:"seed"`
UploadNodeCount *int `yaml:"upload-node-count"`
})
if err := check.Options.Decode(checkOpts); err != nil {
return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err)
}
opts := fileretrieval.NewDefaultOptions()
if err := applyCheckConfig(checkGlobalConfig, checkOpts, &opts); err != nil {
return nil, fmt.Errorf("applying options: %w", err)
}
*/
checkOpts := new(struct {
FileName *string `yaml:"file-name"`
FileSize *int64 `yaml:"file-size"`
FilesPerNode *int `yaml:"files-per-node"`
Full *bool `yaml:"full"`
GasPrice *string `yaml:"gas-price"`
PostageAmount *int64 `yaml:"postage-amount"`
PostageLabel *string `yaml:"postage-label"`
Seed *int64 `yaml:"seed"`
UploadNodeCount *int `yaml:"upload-node-count"`
})
if err := check.Options.Decode(checkOpts); err != nil {
return nil, fmt.Errorf("decoding check %s options: %w", check.Type, err)
}
opts := fileretrieval.NewDefaultOptions()
return opts, nil

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 15ca2b4

Please sign in to comment.