Search in sources :

Example 1 with PodsAreDeployed

use of org.jboss.tools.openshift.reddeer.condition.PodsAreDeployed in project jbosstools-openshift by jbosstools.

the class ScalingTest method scaleTo0ShouldWarn.

@Test
public void scaleTo0ShouldWarn() {
    int pods = requiredService.getReplicationController().getCurrentReplicaCount();
    new WaitUntil(new PodsAreDeployed(project, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER, pods), TimePeriod.LONG);
    OpenShiftResource replicationController = project.getOpenShiftResource(Resource.DEPLOYMENT, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER);
    replicationController.select();
    scaleTo(0);
    new DefaultShell(OpenShiftLabel.Shell.STOP_ALL_DEPLOYMENTS).setFocus();
    new YesButton().click();
    assertPodAmountDesiredEqualsCurrent(0, project);
}
Also used : DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) PodsAreDeployed(org.jboss.tools.openshift.reddeer.condition.PodsAreDeployed) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton) OpenShiftResource(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftResource) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 PodsAreDeployed (org.jboss.tools.openshift.reddeer.condition.PodsAreDeployed)1 OpenShiftResource (org.jboss.tools.openshift.reddeer.view.resources.OpenShiftResource)1 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)1 Test (org.junit.Test)1