parent
80c129a961
commit
8e76a02a56
|
@ -1113,6 +1113,12 @@ func TestApply_disableBackup(t *testing.T) {
|
|||
if err == nil || !os.IsNotExist(err) {
|
||||
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 {
|
||||
|
|
|
@ -154,9 +154,11 @@ func State(opts *StateOpts) (*StateResult, error) {
|
|||
backupPath = opts.BackupPath
|
||||
}
|
||||
|
||||
result.State = &state.BackupState{
|
||||
Real: result.State,
|
||||
Path: backupPath,
|
||||
if backupPath != "-" {
|
||||
result.State = &state.BackupState{
|
||||
Real: result.State,
|
||||
Path: backupPath,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue