Skip to content

Commit

Permalink
Fix bad rebase
Browse files Browse the repository at this point in the history
Apparently I can't git...
  • Loading branch information
sethvargo committed Oct 24, 2017
1 parent 50caac0 commit be7c31f
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 403 deletions.
2 changes: 1 addition & 1 deletion command/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,6 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo
}
}

ui.Output(columnOutput(out, nil))
ui.Output(tableOutput(out, nil))
return 0
}
20 changes: 11 additions & 9 deletions command/operator_unseal_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package command

import (
"fmt"
"io/ioutil"
"strings"
"testing"
Expand Down Expand Up @@ -68,7 +67,7 @@ func TestOperatorUnsealCommand_Run(t *testing.T) {
if exp := 0; code != exp {
t.Errorf("expected %d to be %d", code, exp)
}
expected := "Unseal Progress: 0"
expected := "0/3"
combined := ui.OutputWriter.String() + ui.ErrorWriter.String()
if !strings.Contains(combined, expected) {
t.Errorf("expected %q to contain %q", combined, expected)
Expand All @@ -86,7 +85,7 @@ func TestOperatorUnsealCommand_Run(t *testing.T) {
t.Fatal(err)
}

for i, key := range keys {
for _, key := range keys {
ui, cmd := testOperatorUnsealCommand(t)
cmd.client = client
cmd.testOutput = ioutil.Discard
Expand All @@ -96,14 +95,17 @@ func TestOperatorUnsealCommand_Run(t *testing.T) {
key,
})
if exp := 0; code != exp {
t.Errorf("expected %d to be %d", code, exp)
}
expected := fmt.Sprintf("Unseal Progress: %d", (i+1)%3) // 1, 2, 0
combined := ui.OutputWriter.String() + ui.ErrorWriter.String()
if !strings.Contains(combined, expected) {
t.Errorf("expected %q to contain %q", combined, expected)
t.Errorf("expected %d to be %d: %s", code, exp, ui.ErrorWriter.String())
}
}

status, err := client.Sys().SealStatus()
if err != nil {
t.Fatal(err)
}
if status.Sealed {
t.Error("expected unsealed")
}
})

t.Run("communication_failure", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions command/path_help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func TestPathHelpCommand_Run(t *testing.T) {
2,
},
{
"generic",
"kv",
[]string{"secret/"},
"The generic backend",
"The kv backend",
0,
},
{
Expand Down
Loading

0 comments on commit be7c31f

Please sign in to comment.