File tree Expand file tree Collapse file tree
java/server/test/org/openqa/selenium/docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828import java .io .UncheckedIOException ;
2929import java .net .URI ;
3030import java .net .URISyntaxException ;
31+ import java .nio .file .Paths ;
3132
3233import static java .net .HttpURLConnection .HTTP_BAD_REQUEST ;
3334import static java .net .HttpURLConnection .HTTP_INTERNAL_ERROR ;
3435import static java .net .HttpURLConnection .HTTP_NOT_FOUND ;
36+ import static java .net .HttpURLConnection .HTTP_OK ;
3537import static org .assertj .core .api .Assertions .assertThat ;
38+ import static org .assertj .core .api .Assumptions .assumeThat ;
3639import static org .openqa .selenium .remote .http .Contents .utf8String ;
3740import static org .openqa .selenium .remote .http .HttpMethod .GET ;
3841
@@ -80,8 +83,10 @@ public void shouldComplainBitterlyIfNoSupportedVersionOfDockerProtocolIsFound()
8083
8184 @ Test
8285 public void foo () throws URISyntaxException {
86+ assumeThat (Paths .get ("/var/run/docker.sock" )).exists ();
87+
8388 HttpClient client = HttpClient .Factory .create ("reactor" ).createClient (ClientConfig .defaultConfig ().baseUri (new URI ("unix:///var/run/docker.sock" )));
8489 HttpResponse res = client .execute (new HttpRequest (GET , "/version" ));
85- System . out . println (res .getStatus ());
90+ assertThat (res .getStatus ()). isEqualTo ( HTTP_OK );
8691 }
8792}
You can’t perform that action at this time.
0 commit comments