summaryrefslogtreecommitdiffstats
path: root/config-lib/src/test/java/com
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-04-08 22:26:37 +0200
committerjonmv <venstad@gmail.com>2022-04-08 22:26:37 +0200
commit1c27950698237c7ebe0f8ea7ed5848889d6b4759 (patch)
tree6748bfa41fac16ad9b22d0afba4d150b44414542 /config-lib/src/test/java/com
parentc5c330f63efb47dad355860db70bf3a89a737970 (diff)
Revert "Merge pull request #22068 from vespa-engine/jonmv/unify-hostname-classes"
This reverts commit 8aa4c83df5ce7843c040afa41706fcc7c3afd030, reversing changes made to f95ad44fae879da9db19f73eabe62c53baeb0c36.
Diffstat (limited to 'config-lib/src/test/java/com')
-rw-r--r--config-lib/src/test/java/com/yahoo/config/FileNodeTest.java5
-rw-r--r--config-lib/src/test/java/com/yahoo/config/PathNodeTest.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java b/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java
index 42e4978091d..1ad9f722eca 100644
--- a/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java
+++ b/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java
@@ -23,8 +23,9 @@ public class FileNodeTest {
assertEquals("foo.txt", n.value().value());
assertEquals("\"foo.txt\"", n.toString());
- assertEquals("path may not start with '..', but got: foo/../../boo",
- assertThrows(IllegalArgumentException.class, () -> new FileNode("foo/../../boo")).getMessage());
+ assertThrows("path may not start with '..', but got: foo/../../boo",
+ IllegalArgumentException.class,
+ () -> new FileNode("foo/../../boo"));
}
}
diff --git a/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java b/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java
index 016c53b42e3..2240f647726 100644
--- a/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java
+++ b/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java
@@ -22,8 +22,9 @@ public class PathNodeTest {
n = new PathNode(new FileReference("foo.txt"));
assertEquals(new File("foo.txt").toPath(), n.value());
- assertEquals("path may not start with '..', but got: foo/../../boo",
- assertThrows(IllegalArgumentException.class, () -> new PathNode(new FileReference("foo/../../boo"))).getMessage());
+ assertThrows("path may not start with '..', but got: foo/../../boo",
+ IllegalArgumentException.class,
+ () -> new PathNode(new FileReference("foo/../../boo")));
}
}