summaryrefslogtreecommitdiffstats
path: root/config-lib
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-04-08 13:19:54 +0200
committerjonmv <venstad@gmail.com>2022-04-08 13:19:54 +0200
commit0be38d50daebe7187e026b57b38902bc53e408d6 (patch)
tree25f738e19d365cb638c4b0fa6c2a1e625572b484 /config-lib
parentc94ec50b539ff6d0d3273029f1278e8c90274a57 (diff)
Use null rather than "" for no load balancer, as intended(?), and fix some assertions
Diffstat (limited to 'config-lib')
-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, 4 insertions, 6 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 1ad9f722eca..42e4978091d 100644
--- a/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java
+++ b/config-lib/src/test/java/com/yahoo/config/FileNodeTest.java
@@ -23,9 +23,8 @@ public class FileNodeTest {
assertEquals("foo.txt", n.value().value());
assertEquals("\"foo.txt\"", n.toString());
- assertThrows("path may not start with '..', but got: foo/../../boo",
- IllegalArgumentException.class,
- () -> new FileNode("foo/../../boo"));
+ assertEquals("path may not start with '..', but got: foo/../../boo",
+ assertThrows(IllegalArgumentException.class, () -> new FileNode("foo/../../boo")).getMessage());
}
}
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 2240f647726..016c53b42e3 100644
--- a/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java
+++ b/config-lib/src/test/java/com/yahoo/config/PathNodeTest.java
@@ -22,9 +22,8 @@ public class PathNodeTest {
n = new PathNode(new FileReference("foo.txt"));
assertEquals(new File("foo.txt").toPath(), n.value());
- assertThrows("path may not start with '..', but got: foo/../../boo",
- IllegalArgumentException.class,
- () -> new PathNode(new FileReference("foo/../../boo")));
+ assertEquals("path may not start with '..', but got: foo/../../boo",
+ assertThrows(IllegalArgumentException.class, () -> new PathNode(new FileReference("foo/../../boo"))).getMessage());
}
}