Skip to content
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

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

rsandell
Copy link
Member

@rsandell rsandell commented Nov 22, 2022

  • 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

@rsandell
Copy link
Member Author

I haven't found why the tests are failing yet, at least on the surface they seem unrelated but very persistent.

@rsandell rsandell requested a review from olamy November 24, 2022 12:52
@rsandell
Copy link
Member Author

Oh, different tests are failing on Ci than locally 😱

@rsandell
Copy link
Member Author

When I fixed one test the other got fixed as well, I still am not sure why, but it works now 🤷

@rsandell rsandell merged commit 6d0a5df into jenkinsci:master Nov 25, 2022
@rsandell rsandell deleted the api branch November 25, 2022 12:09
Copy link
Member

@jglick jglick left a 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
Copy link
Member

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)

Comment on lines +626 to +627
QueueTaskFuture<WorkflowRun> q = foo.scheduleBuild2(0);
WorkflowRun b = q.getStartCondition().get();
Copy link
Member

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");
Copy link
Member

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants