mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-09 08:42:18 -04:00
tests: Add assertion to address review comment
This commit is contained in:
parent
5bd0ac371c
commit
88957f71fb
1 changed files with 6 additions and 1 deletions
|
|
@ -60,6 +60,11 @@ func TestMachineSetEmptyId(t *testing.T) {
|
|||
require.Nil(t, dbTarget)
|
||||
require.Error(t, err)
|
||||
|
||||
// Verify the DataDir still exists (see below test for more detail on why)
|
||||
dir, err := tm.DataDir()
|
||||
require.NoError(t, err)
|
||||
require.DirExists(t, dir.DataDir().String())
|
||||
|
||||
// Also check new id
|
||||
dbTarget, err = tm.Client().GetTarget(tm.ctx,
|
||||
&vagrant_server.GetTargetRequest{
|
||||
|
|
@ -74,7 +79,7 @@ func TestMachineSetEmptyId(t *testing.T) {
|
|||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestMachineSetIdBlankThenSomethingRecreatesDataDir(t *testing.T) {
|
||||
func TestMachineSetIdBlankThenSomethingPreservesDataDir(t *testing.T) {
|
||||
tm, _ := TestMinimalMachine(t)
|
||||
|
||||
// Set empty id, followed by a temp id. This is the same thing that happens
|
||||
|
|
|
|||
Loading…
Reference in a new issue