Repository navigation
refactored test/cmd/builds to use wrapper methods - #6034
openshift-bot merged 1 commit into
Conversation
There was a problem hiding this comment.
I don't really understand why this is failing, but this is the error output I get:
FAILURE: oc start-build --from-webhook=https://127.0.0.1:28443/oapi/v1/namespaces/cmd-builds/buildconfigs/ruby-sample-build/webhooks/secret101/generic: the command returned the wrong error code
error: server rejected our request 500
remote: {
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "Internal error occurred: could not generate a build: imageStreamTag \"ruby-20-centos7:latest\" not found",
"reason": "InternalError",
"details": {
"causes": [
{
"message": "could not generate a build: imageStreamTag \"ruby-20-centos7:latest\" not found"
}
]
},
"code": 500
}
There was a problem hiding this comment.
However, just above this, the start-build for the ruby-sample-build works and uses the same image stream.
There was a problem hiding this comment.
does it only fail after the refactor?
There was a problem hiding this comment.
start-build --list-webhooks doesn't start a build. (not even sure why that's a valid command)
so this is the first command that's actually starting a build using that imagestream, i think.
still not clear why your refactor breaks it though.
There was a problem hiding this comment.
There was a problem hiding this comment.
@bparees It was added by @smarterclayton so we could get a webhook using the CLI (for script processing)
i'm not surprised, it's still a very awkward construction.
There was a problem hiding this comment.
Maybe this is not working as expected
https://github.com/openshift/origin/pull/6034/files#diff-ba4d05695f474cd209c5a3c9a22de986L30
maybe. @stevekuznetsov have you tried reverting just the change to that wait?
There was a problem hiding this comment.
There is a better way of waiting on imagesteams using tryuntil. I'll implement that and see if this fixes it.
There was a problem hiding this comment.
That fixed it.
test-cmd.sh runs without a node… how were you envisioning a build would start? |
|
Or do you mean checking a build API object was created? |
|
Yes, the objects - that's what some of the other scripts are doing. |
|
I like the refactor since it appears we'll get useful success/fail messages for each command instead of the current unreadable mess when the script abruptly terminates on a non-zero return code. as for whether these commands all expect success, yes all of these can be assumed to expect success. checking that a build object was actually created is probably overkill, we have other testing for that. Here i think it's safe to assume that if something went wrong, the CLI would return a non-zero error code. |
There was a problem hiding this comment.
Here I found --text again, and again I removed it. I'm not really sure what it is doing here.
|
@bparees Changes other than simple substitutions of the |
b5c2007 to
c4a2f16
Compare
|
[test] this is ready |
|
Evaluated for origin test up to c4a2f16 |
|
@csrwng you mind taking this one? |
|
yup, I can take it |
|
LGTM, pending test output |
|
[merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4144/) (Image: devenv-rhel7_2799) |
|
Evaluated for origin merge up to c4a2f16 |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7419/) |
…md-builds Merged by openshift-bot
/cc @deads2k
@bparees @csrwng PTAL -- please review and ensure that the expectations (success, failure, with/without text) are correct to what you expected from the tests previously.
Also, I think we need better tests in this bucket, but I'm not sure - many just require success, and have no output tests, so they aren't really testing that the build that was supposed to have started actually did, etc. What do you all think?