Fix tests by calling initFlags for each test case to reset state.

This commit is contained in:
Preetha Appan 2017-10-11 15:57:49 -05:00 committed by Frank Schröder
parent 75ecc6a86e
commit 5473dbc5a4
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ func TestKVDeleteCommand_Validation(t *testing.T) {
}
for name, tc := range cases {
c.initFlags()
// Ensure our buffer is always clear
if ui.ErrorWriter != nil {
ui.ErrorWriter.Reset()

View File

@ -54,6 +54,7 @@ func TestKVPutCommand_Validation(t *testing.T) {
}
for name, tc := range cases {
c.initFlags()
// Ensure our buffer is always clear
if ui.ErrorWriter != nil {
ui.ErrorWriter.Reset()