-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export some data from InputAction to the HTTP API #120
Conversation
rsandell
commented
Nov 22, 2022
•
edited
Loading
edited
- Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- Ensure that the pull request title represents the desired changelog entry
- Please describe what you did
- Link to relevant issues in GitHub or Jira
- Link to relevant pull requests, esp. upstream and downstream changes
- Ensure you have provided tests - that demonstrates feature works or fixes the issue
I haven't found why the tests are failing yet, at least on the surface they seem unrelated but very persistent. |
Oh, different tests are failing on Ci than locally 😱 |
When I fixed one test the other got fixed as well, I still am not sure why, but it works now 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see this!
@@ -611,5 +612,92 @@ public void test_unsafe_ids_generate_formValidation() throws Exception { | |||
assertThat("> should be rejected", d.doCheckId("this-is-also>-not-ok"), JenkinsMatchers.hasKind(Kind.ERROR)); | |||
} | |||
|
|||
@Test | |||
public void test_api_contains_waitingForInput() throws Exception { | |||
//set up dummy security real |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo (also probably gratuitous comment)
QueueTaskFuture<WorkflowRun> q = foo.scheduleBuild2(0); | ||
WorkflowRun b = q.getStartCondition().get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be collapsed using (IIRC) waitForStart
.
HtmlPage p = webClient.getPage(b, inputAction.getUrlName()); | ||
j.submit(p.getFormByName(is.getId()), "proceed"); | ||
|
||
json = webClient.getJSON(b.getUrl() + "api/json?depth=1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use depth
. Use tree
instead.
j.waitForMessage("Input requested", b); | ||
|
||
final JenkinsRule.WebClient webClient = j.createWebClient(); | ||
final JenkinsRule.JSONWebResponse json = webClient.getJSON(b.getUrl() + "api/json?depth=2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto