command: Fix TestMetaBackend_emptyWithExplicitState

This test was incorrectly updated in a previous iteration, with it
creating a modified state to write but then not actually writing it,
writing an empty test state instead.

This made the test fail because a backup state file is created only if
the new state snapshot is different to the old when written.
This commit is contained in:
Martin Atkins 2018-11-12 16:08:33 -08:00
parent da5ae6e382
commit 2293391241
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ func TestMetaBackend_emptyWithExplicitState(t *testing.T) {
// Write some state // Write some state
next := testState() next := testState()
markStateForMatching(next, "bar") // just any change so it shows as different than before markStateForMatching(next, "bar") // just any change so it shows as different than before
s.WriteState(testState()) s.WriteState(next)
if err := s.PersistState(); err != nil { if err := s.PersistState(); err != nil {
t.Fatalf("unexpected error: %s", err) t.Fatalf("unexpected error: %s", err)
} }