fix app upgrade without rollout and rollout plan will create multiple version resources (#1315)

* fix app upgrade without rollout and rollout plan will create multiple version resources

* add and enhance tests

* fix test
This commit is contained in:
Jianbo Sun
2021-03-26 22:20:55 +08:00
committed by GitHub
parent 8e8ec58b97
commit 1c89435515
18 changed files with 308 additions and 21 deletions
@@ -119,8 +119,8 @@ func TestMakeHTTPRequest(t *testing.T) {
}
gotReply, gotCode, gotErr := makeHTTPRequest(ctx, "http://"+tt.url, tt.method, tt.payload)
if gotCode != tt.want.statusCode {
t.Errorf("\n%s\nr.Reconcile(...): want code `%d`, got code:`%d`\n", testName, tt.want.statusCode,
gotCode)
t.Errorf("\n%s\nr.Reconcile(...): want code `%d`, got code:`%d` got err: %v \n", testName, tt.want.statusCode,
gotCode, gotErr)
}
if gotCode == -1 {
// we don't know exactly what error we should get when the network call failed