feat: self-update of master and agents (#15)
This commit is contained in:
@@ -470,14 +470,14 @@ func TestBusyIsNotAFailure(t *testing.T) {
|
||||
|
||||
func TestRefusedIsNotAFailure(t *testing.T) {
|
||||
e := newEnv(t, compose(1, model.ModeAuto, slusk+":1.4.2"))
|
||||
e.jobs.errFor[1] = &model.NotUpdatableError{Reason: model.ReasonSelf}
|
||||
e.jobs.errFor[1] = &model.NotUpdatableError{Reason: model.ReasonContainer}
|
||||
|
||||
rec := e.post(`{"image":"` + slusk + `","tag":"2"}`)
|
||||
|
||||
assert.Equal(t, 200, rec.Code)
|
||||
r := decode(t, rec).Results[0]
|
||||
assert.Equal(t, statusRefused, r.Status)
|
||||
assert.Equal(t, model.ReasonSelf, r.Error)
|
||||
assert.Equal(t, model.ReasonContainer, r.Error)
|
||||
assert.Zero(t, r.JobID)
|
||||
assert.NotEmpty(t, e.store.avail)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user