Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Aug 3, 2017

Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see #23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes #25694

@javanna javanna added review >test Issues or PRs that are addressing/adding tests v5.5.2 v5.6.0 v6.0.0 v6.1.0 v7.0.0 labels Aug 3, 2017
@javanna javanna requested a review from nik9000 August 3, 2017 15:40
@javanna javanna force-pushed the test/raw_only_docs branch from bb7a829 to 42a577b Compare August 3, 2017 16:31
Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see elastic#23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes elastic#25694
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

I might make something like

private void expectMissingBodyError(Matcher<String> responseMatcher, ThrowingRunnable exec) {
        ResponseException responseException = expectThrows(ResponseException.class, exec);
         assertEquals(400, responseException.getResponse().getStatusLine().getStatusCode());
         assertThat(responseException.getMessage(), responseMatcher);
}

@javanna javanna force-pushed the test/raw_only_docs branch from 42a577b to e7c643d Compare August 7, 2017 09:00
@javanna javanna merged commit 14ba369 into elastic:master Aug 7, 2017
javanna added a commit that referenced this pull request Aug 7, 2017
Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see #23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes #25694
javanna added a commit that referenced this pull request Aug 7, 2017
Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see #23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes #25694
javanna added a commit that referenced this pull request Aug 7, 2017
Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see #23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes #25694
javanna added a commit that referenced this pull request Aug 7, 2017
Raw requests are supported only by the java yaml test runner and were introduced to test docs snippets. Some yaml tests ended up using them (see #23497) which causes failures for other language clients. This commit migrates those yaml tests to Java tests that send requests through the Java low-level REST client, and also moves the ability to send raw requests to a special client that's only available when testing docs snippets.

Closes #25694
@lcawl lcawl removed the v6.1.0 label Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>test Issues or PRs that are addressing/adding tests v5.5.2 v5.6.0 v6.0.0-beta2 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants