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:
SaReN
2020-05-05 21:16:37 -04:00
committed by GitHub
parent 7cf1efddbe
commit c211488b0b
7 changed files with 356 additions and 21 deletions
-12
View File
@@ -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 {
+1 -1
View File
@@ -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()