Commit Graph

6 Commits

Author SHA1 Message Date
James Bardin 1380bbedb2 don't print err in Fatalf when it's nil 2017-01-30 18:02:35 -05:00
James Bardin b8bd4846db fix test despite original comments
Original comments were incorrect, and the test was checking for the
absence of state
2017-01-30 17:55:49 -05:00
James Bardin 39ca4fa2f8 Ensure that backend tests check for data in state
Test should not simply check for the existence of a file for state, but
make sure that file also contains data.
2017-01-30 17:48:39 -05:00
James Bardin 8f7f1917f2 Remove state file data when writing a nil state
The old behavior in this situation was to simply delete the file. Since
we now have a lock on this file we don't want to close or delete it, so
instead truncate the file at offset 0.

Fix a number of related tests
2017-01-30 17:16:57 -05:00
James Bardin eb59b5925e Fix some tests, and make rest fail with good errs
Having the state files always created for locking breaks a lot of tests.
Most can be fixed by simple checking for state within a file, but a few
still might be writing state when they shouldn't.
2017-01-30 17:16:57 -05:00
Mitchell Hashimoto 9654387771
command: meta.Backend is used for initializing the backend
This is a complex function that handles all the potential cases that can
happen with legacy remote state, new configurations, etc.
2017-01-26 14:33:49 -08:00