From db6847915cbdf19c489bfc5e21d5c85b2a1c55da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Gond=C5=BEa?= Date: Wed, 1 Nov 2023 08:28:17 +0100 Subject: [PATCH] fix: Be less picky in verifying number of nodes provisioned This really verified core's strategy than plugin workings. --- .../plugins/openstack/compute/ProvisioningTest.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plugin/src/test/java/jenkins/plugins/openstack/compute/ProvisioningTest.java b/plugin/src/test/java/jenkins/plugins/openstack/compute/ProvisioningTest.java index 10b44b58..7e6f4be6 100644 --- a/plugin/src/test/java/jenkins/plugins/openstack/compute/ProvisioningTest.java +++ b/plugin/src/test/java/jenkins/plugins/openstack/compute/ProvisioningTest.java @@ -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; @@ -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 activities = CloudStatistics.get().getActivities(); - assertThat(activities, Matchers.iterableWithSize(2)); } @Test @Issue("https://github.com/jenkinsci/openstack-cloud-plugin/issues/31")