x/auth: cli tests (#6152)
* Add cli tests for auth * Format imports * Fix auth tests * Remove keys in validate sign call * Eliminate defer in tests * Format imports * Test commit
This commit is contained in:
@@ -167,18 +167,6 @@ func (f *Fixtures) CLIConfig(key, value string, flags ...string) {
|
||||
ExecuteWriteCheckErr(f.T, AddFlags(cmd, flags))
|
||||
}
|
||||
|
||||
// TxBroadcast is simcli tx broadcast
|
||||
func (f *Fixtures) TxBroadcast(fileName string, flags ...string) (bool, string, string) {
|
||||
cmd := fmt.Sprintf("%s tx broadcast %v %v", f.SimcliBinary, f.Flags(), fileName)
|
||||
return ExecuteWriteRetStdStreams(f.T, AddFlags(cmd, flags), clientkeys.DefaultKeyPass)
|
||||
}
|
||||
|
||||
// TxEncode is simcli tx encode
|
||||
func (f *Fixtures) TxEncode(fileName string, flags ...string) (bool, string, string) {
|
||||
cmd := fmt.Sprintf("%s tx encode %v %v", f.SimcliBinary, f.Flags(), fileName)
|
||||
return ExecuteWriteRetStdStreams(f.T, AddFlags(cmd, flags), clientkeys.DefaultKeyPass)
|
||||
}
|
||||
|
||||
//utils
|
||||
|
||||
func AddFlags(cmd string, flags []string) string {
|
||||
|
||||
@@ -125,7 +125,7 @@ func TestCLIValidateGenesis(t *testing.T) {
|
||||
|
||||
// start simd server
|
||||
proc := f.SDStart()
|
||||
defer proc.Stop(false)
|
||||
t.Cleanup(func() { proc.Stop(false) })
|
||||
|
||||
f.ValidateGenesis()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user