@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class TodoBrowserIT { @Drone WebDriver webDriver; @Test public void shouldShowWelcomePageMessage(@InitialPage HomePage homePage) { homePage.assertOnWelcomePage(); } }
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class HelloWorldIT {
@Category(RequiresOpenshift.class) @RequiresOpenshift public class ResourceGeneratorBuilderIT {
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class HelloPodDeploymentOpenShiftITCase { @ArquillianResource private URL base; @Deployment(testable = false) public static WebArchive deploy() { return ShrinkWrap.create(WebArchive.class) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); } @Test public void shouldBeAbleToInjectURL() throws Exception { Assert.assertNotNull(base); } }
@Category(RequiresOpenshift.class) @RunWith(ArquillianConditionalRunner.class) @RequiresOpenshift public class HelloOpenShiftRestAssuredIT { @ArquillianResource RequestSpecBuilder requestSpecBuilder; @Test public void testGreetingEndpoint() { given(requestSpecBuilder.build()) .when().get() .then() .statusCode(200) .body(containsString("Hello OpenShift!")); } } // end::openshift_restassured_example[]
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class RouteInOtherNamespaceIT { @RouteURL(value = "docker-registry", namespace = "default") private URL routeURL; @Test public void injectedIntoClassShouldNotBeNull() { assertThat(routeURL).isNotNull(); } @Test public void injectedIntoMethodShouldNotBeNull( @RouteURL(value = "docker-registry", namespace = "default") URL routeURL) { assertThat(routeURL).isNotNull(); } }
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class HelloWorldOpenShiftAssistantIT {
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class OpenshiftIT { @AwaitRoute @RouteURL("${app.name}") private URL baseURL; @Before public void setup() throws Exception { RestAssured.baseURI = baseURL.toString(); } @Test public void testGreetingEndpoint() { when() .get() .then() .statusCode(200) .body(containsString("Greetings from Spring Boot!")); } }
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class OpenShiftAssistantOperationalMethodsIT {
@RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class HelloPodOpenShiftITCase {
@RunWith(ArquillianConditionalRunner.class) @Category(RequiresOpenshift.class) @RequiresOpenshift @Ignore("This test assumes that you have a cluster installed with Istio and BookInfo application deployed. We could make a full test preparing all this, but it will take lot of time, not error safe and test execution would take like 10 minutes") public class ReviewsIstioSourceOnMethodIT extends AbstractReviewsTest { @RouteURL("productpage") @AwaitRoute private URL url; @ArquillianResource private IstioAssistant istioAssistant; @IstioResource("classpath:route-rule-reviews-test-v${serviceVersion:2}.yaml") @Test public void alex_should_use_reviews_v2_version() throws Exception { Thread.sleep(10000); //wait until the rule get's applied alex_should_use_reviews_v2_version(url, istioAssistant); } }
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) @OpenShiftResource("classpath:hello-route.yaml")
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) @Template(url = "classpath:hello-openshift.yaml",
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) @Templates(templates = { @Template(url = "classpath:hello-openshift-templates.yaml", parameters = @TemplateParameter(name = "RESPONSE", value = "Hello from Arquillian Templates")) }) public class HelloWorldTemplatesIT { @RouteURL("hello-openshift-templates-route") @AwaitRoute private URL helloOpenshiftTemplates; @Test public void should_create_resources_from_templates() throws IOException { assertThat(helloOpenshiftTemplates).isNotNull(); OkHttpClient okHttpClient = new OkHttpClient(); Request request = new Request.Builder().get().url(helloOpenshiftTemplates).build(); Response response = okHttpClient.newCall(request).execute(); assertThat(response).isNotNull(); assertThat(response.code()).isEqualTo(200); assertThat(response.body().string()).isEqualTo("Hello from Arquillian Templates\n"); } }
@RunWith(ArquillianConditionalRunner.class) @Category(RequiresOpenshift.class) @RequiresOpenshift @IstioResource("classpath:route-rule-reviews-test-v${serviceVersion:2}.yaml") @Ignore("This test assumes that you have a cluster installed with Istio and BookInfo application deployed. We could make a full test preparing all this, but it will take lot of time, not error safe and test execution would take like 10 minutes") public class ReviewsIT extends AbstractReviewsTest { @RouteURL("productpage") @AwaitRoute private URL url; // tag::istio_assistant[] @ArquillianResource private IstioAssistant istioAssistant; // end::istio_assistant[] @Test public void should_get_v1_if_not_logged() { should_get_v1_if_not_logged(url); } @Test public void alex_should_use_reviews_v2_version() throws IOException { alex_should_use_reviews_v2_version(url, istioAssistant); } }
@Category(RequiresOpenshift.class) @RequiresOpenshift @RunWith(ArquillianConditionalRunner.class) public class HelloWorldIT {
@RunWith(ArquillianConditionalRunner.class) @Category(RequiresOpenshift.class) @RequiresOpenshift @IstioResource("classpath:route-rule-reviews-test-v${serviceVersion:2}-legacy.yaml") @Ignore("This test assumes that you have a cluster installed with Istio and BookInfo application deployed. We could make a full test preparing all this, but it will take lot of time, not error safe and test execution would take like 10 minutes")