aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-zone-api
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahooinc.com>2022-07-27 16:00:42 +0200
committerBjørn Christian Seime <bjorncs@yahooinc.com>2022-07-27 16:00:42 +0200
commit7078e32616d6a7c8a7c7d34c4634f0b04ba1e8b0 (patch)
tree78609e84b8d584f86d4247e0290d42143dcec943 /hosted-zone-api
parent368b5b8076aceb416b885df7de7796d1da95e04c (diff)
Convert hosted-zone-api to junit5
Diffstat (limited to 'hosted-zone-api')
-rw-r--r--hosted-zone-api/pom.xml19
-rw-r--r--hosted-zone-api/src/test/java/ai/vespa/cloud/SystemInfoTest.java14
2 files changed, 22 insertions, 11 deletions
diff --git a/hosted-zone-api/pom.xml b/hosted-zone-api/pom.xml
index 87012df8479..4227d457c4d 100644
--- a/hosted-zone-api/pom.xml
+++ b/hosted-zone-api/pom.xml
@@ -25,14 +25,25 @@
<artifactId>jdisc_core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
-
- <!-- test -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- test -->
</dependencies>
<build>
<plugins>
diff --git a/hosted-zone-api/src/test/java/ai/vespa/cloud/SystemInfoTest.java b/hosted-zone-api/src/test/java/ai/vespa/cloud/SystemInfoTest.java
index 80b22a185bb..2bae9f0c9e2 100644
--- a/hosted-zone-api/src/test/java/ai/vespa/cloud/SystemInfoTest.java
+++ b/hosted-zone-api/src/test/java/ai/vespa/cloud/SystemInfoTest.java
@@ -1,12 +1,12 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.cloud;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.util.List;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
/**
* @author bratseth
@@ -14,7 +14,7 @@ import static org.junit.Assert.fail;
public class SystemInfoTest {
@Test
- public void testSystemInfo() {
+ void testSystemInfo() {
ApplicationId application = new ApplicationId("tenant1", "application1", "instance1");
Zone zone = new Zone(Environment.dev, "us-west-1");
Cloud cloud = new Cloud("aws");
@@ -30,7 +30,7 @@ public class SystemInfoTest {
}
@Test
- public void testZone() {
+ void testZone() {
Zone zone = Zone.from("dev.us-west-1");
zone = Zone.from(zone.toString());
assertEquals(Environment.dev, zone.environment());
@@ -58,7 +58,7 @@ public class SystemInfoTest {
}
@Test
- public void testCluster() {
+ void testCluster() {
int size = 1;
var indices = List.of(1);
Cluster cluster = new Cluster(size, indices);
@@ -67,7 +67,7 @@ public class SystemInfoTest {
}
@Test
- public void testNode() {
+ void testNode() {
int index = 0;
Node node = new Node(index);
assertEquals(index, node.index());