From 7078e32616d6a7c8a7c7d34c4634f0b04ba1e8b0 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Wed, 27 Jul 2022 16:00:42 +0200 Subject: Convert hosted-zone-api to junit5 --- hosted-zone-api/pom.xml | 19 +++++++++++++++---- .../src/test/java/ai/vespa/cloud/SystemInfoTest.java | 14 +++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'hosted-zone-api') 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 @@ jdisc_core ${project.version} provided + + + junit + junit + + - - - junit - junit + org.junit.jupiter + junit-jupiter-api test + + org.junit.jupiter + junit-jupiter-engine + test + + + 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()); -- cgit v1.2.3