Skip to content

Commit

Permalink
fix: Be less picky in verifying number of nodes provisioned
Browse files Browse the repository at this point in the history
This really verified core's strategy than plugin workings.
  • Loading branch information
olivergondza committed Nov 1, 2023
1 parent 9d750ed commit db68479
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -95,15 +94,6 @@ public void provisionSlaveOnDemand() throws Exception {
// Provision without label
p.setAssignedLabel(null);
assertThat(j.buildAndAssertSuccess(p).getBuiltOn(), Matchers.instanceOf(JCloudsSlave.class));

Openstack os = cloud.getOpenstack();
verify(os, atLeastOnce()).getRunningNodes();
verify(os, times(2)).bootAndWaitActive(any(ServerCreateBuilder.class), any(Integer.class));
verify(os, times(2)).assignFloatingIp(any(Server.class), eq("custom"));
verify(os, atLeastOnce()).destroyServer(any(Server.class));

List<ProvisioningActivity> activities = CloudStatistics.get().getActivities();
assertThat(activities, Matchers.iterableWithSize(2));
}

@Test @Issue("https://github.com/jenkinsci/openstack-cloud-plugin/issues/31")
Expand Down

0 comments on commit db68479

Please sign in to comment.