forked from TrueCloudLab/frostfs-node
[#1959] neofs-adm: Allow to test all commands with a local dump
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
8648b102db
commit
02bea52f40
3 changed files with 26 additions and 6 deletions
|
@ -126,13 +126,10 @@ func newInitializeContext(cmd *cobra.Command, v *viper.Viper) (*initializeContex
|
|||
|
||||
var c Client
|
||||
if v.GetString(localDumpFlag) != "" {
|
||||
if cmd.Name() != "init" {
|
||||
return nil, errors.New("dump creation is only supported for `init` command")
|
||||
}
|
||||
if v.GetString(endpointFlag) != "" {
|
||||
return nil, fmt.Errorf("`%s` and `%s` flags are mutually exclusive", endpointFlag, localDumpFlag)
|
||||
}
|
||||
c, err = newLocalClient(v, wallets)
|
||||
c, err = newLocalClient(cmd, v, wallets)
|
||||
} else {
|
||||
c, err = getN3Client(v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue