fix test despite original comments

Original comments were incorrect, and the test was checking for the
absence of state
This commit is contained in:
James Bardin 2017-01-30 17:55:49 -05:00
parent 39ca4fa2f8
commit b8bd4846db
1 changed files with 6 additions and 6 deletions

View File

@ -2520,14 +2520,14 @@ func TestMetaBackend_planBackendEmptyDir(t *testing.T) {
t.Fatalf("bad: %#v", state)
}
// Verify the default path
if isEmptyState(DefaultStateFilename) {
t.Fatal("state is empty")
// Verify the default path doesn't exist
if !isEmptyState(DefaultStateFilename) {
t.Fatal("state is not empty")
}
// Verify a backup exists
if isEmptyState(DefaultStateFilename + DefaultBackupExtension) {
t.Fatal("backup is empty")
// Verify a backup doesn't exist
if !isEmptyState(DefaultStateFilename + DefaultBackupExtension) {
t.Fatal("backup is not empty")
}
// Verify we have no configured backend/legacy