summaryrefslogtreecommitdiffstats
path: root/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java')
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java36
1 files changed, 4 insertions, 32 deletions
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java
index 693a919ff12..0b9564fad8c 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImplTest.java
@@ -124,14 +124,6 @@ public class NodeAgentImplTest {
final InOrder inOrder = inOrder(dockerOperations, orchestrator, nodeRepository);
// TODO: Verify this isn't run unless 1st time
inOrder.verify(dockerOperations, times(1)).resumeNode(eq(containerName));
- // TODO: This should not happen when nothing is changed. Now it happens 1st time through.
- inOrder.verify(nodeRepository).updateNodeAttributes(
- hostName,
- new NodeAttributes()
- .withRestartGeneration(restartGeneration)
- .withRebootGeneration(rebootGeneration)
- .withDockerImage(dockerImage)
- .withVespaVersion(vespaVersion));
inOrder.verify(orchestrator).resume(hostName);
}
@@ -319,12 +311,7 @@ public class NodeAgentImplTest {
verify(dockerOperations, never()).removeContainer(any(), any());
verify(orchestrator, never()).resume(any(String.class));
- verify(nodeRepository).updateNodeAttributes(
- hostName, new NodeAttributes()
- .withRestartGeneration(restartGeneration)
- .withRebootGeneration(rebootGeneration)
- .withDockerImage(dockerImage)
- .withVespaVersion(vespaVersion));
+ verify(nodeRepository, never()).updateNodeAttributes(eq(hostName), any());
}
@Test
@@ -352,12 +339,7 @@ public class NodeAgentImplTest {
verify(dockerOperations, never()).createContainer(eq(containerName), eq(nodeSpec));
verify(dockerOperations, never()).startContainer(eq(containerName), eq(nodeSpec));
verify(orchestrator, never()).resume(any(String.class));
- verify(nodeRepository).updateNodeAttributes(
- hostName, new NodeAttributes()
- .withRestartGeneration(restartGeneration)
- .withRebootGeneration(rebootGeneration)
- .withDockerImage(new DockerImage(""))
- .withVespaVersion(""));
+ verify(nodeRepository, never()).updateNodeAttributes(eq(hostName), any());
}
@Test
@@ -386,12 +368,7 @@ public class NodeAgentImplTest {
inOrder.verify(dockerOperations, never()).removeContainer(any(), any());
verify(orchestrator, never()).resume(any(String.class));
- verify(nodeRepository).updateNodeAttributes(
- hostName, new NodeAttributes()
- .withRestartGeneration(restartGeneration)
- .withRebootGeneration(rebootGeneration)
- .withDockerImage(dockerImage)
- .withVespaVersion(vespaVersion));
+ verify(nodeRepository, never()).updateNodeAttributes(eq(hostName), any());
}
@Test
@@ -414,12 +391,7 @@ public class NodeAgentImplTest {
nodeAgent.converge();
- verify(nodeRepository).updateNodeAttributes(
- hostName, new NodeAttributes()
- .withRestartGeneration(restartGeneration)
- .withRebootGeneration(rebootGeneration)
- .withDockerImage(new DockerImage(""))
- .withVespaVersion(""));
+ verify(nodeRepository, never()).updateNodeAttributes(eq(hostName), any());
}
private void nodeRunningContainerIsTakenDownAndCleanedAndRecycled(Node.State nodeState, Optional<Long> wantedRestartGeneration) {