parent
80c129a961
commit
8e76a02a56
|
@ -1113,6 +1113,12 @@ func TestApply_disableBackup(t *testing.T) {
|
||||||
if err == nil || !os.IsNotExist(err) {
|
if err == nil || !os.IsNotExist(err) {
|
||||||
t.Fatalf("backup should not exist")
|
t.Fatalf("backup should not exist")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure there is no literal "-"
|
||||||
|
_, err = os.Stat("-")
|
||||||
|
if err == nil || !os.IsNotExist(err) {
|
||||||
|
t.Fatalf("backup should not exist")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testHttpServer(t *testing.T) net.Listener {
|
func testHttpServer(t *testing.T) net.Listener {
|
||||||
|
|
|
@ -154,9 +154,11 @@ func State(opts *StateOpts) (*StateResult, error) {
|
||||||
backupPath = opts.BackupPath
|
backupPath = opts.BackupPath
|
||||||
}
|
}
|
||||||
|
|
||||||
result.State = &state.BackupState{
|
if backupPath != "-" {
|
||||||
Real: result.State,
|
result.State = &state.BackupState{
|
||||||
Path: backupPath,
|
Real: result.State,
|
||||||
|
Path: backupPath,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue