client/state: missing deploy status isn't an error

Fixes TestClient_SaveRestoreState
This commit is contained in:
Michael Schurter 2018-12-18 17:44:33 -08:00
parent c84998e996
commit ee23bdafbc
1 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,11 @@ func (s *BoltStateDB) GetDeploymentStatus(allocID string) (*structs.AllocDeploym
return allocBkt.Get(allocDeployStatusKey, &entry)
})
// It's valid for this field to be nil/missing
if boltdd.IsErrNotFound(err) {
return nil, nil
}
if err != nil {
return nil, err
}