summaryrefslogtreecommitdiffstats
path: root/vespa-feed-client-cli/src/test
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-05-27 14:23:05 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-05-27 14:28:38 +0200
commit42a887bd4c8235745aae49a7344cf30ce633d2a7 (patch)
tree84e0aba2a86bae94e0ce5a8577bcaa54eec2a816 /vespa-feed-client-cli/src/test
parent92bed65606488fb057a3ec81cd63b07c35843ff2 (diff)
Add parameter for route, timeout and trace level
Diffstat (limited to 'vespa-feed-client-cli/src/test')
-rw-r--r--vespa-feed-client-cli/src/test/java/ai/vespa/feed/client/CliArgumentsTest.java7
-rw-r--r--vespa-feed-client-cli/src/test/resources/help.txt3
2 files changed, 9 insertions, 1 deletions
diff --git a/vespa-feed-client-cli/src/test/java/ai/vespa/feed/client/CliArgumentsTest.java b/vespa-feed-client-cli/src/test/java/ai/vespa/feed/client/CliArgumentsTest.java
index 33ee31ff0dc..9ccccfeba26 100644
--- a/vespa-feed-client-cli/src/test/java/ai/vespa/feed/client/CliArgumentsTest.java
+++ b/vespa-feed-client-cli/src/test/java/ai/vespa/feed/client/CliArgumentsTest.java
@@ -7,6 +7,7 @@ import java.io.IOException;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Paths;
+import java.time.Duration;
import static org.junit.jupiter.api.Assertions.*;
@@ -21,7 +22,8 @@ class CliArgumentsTest {
"--endpoint=https://vespa.ai:4443/", "--file=feed.json", "--connections=10",
"--max-streams-per-connection=128", "--certificate=cert.pem", "--private-key=key.pem",
"--ca-certificates=ca-certs.pem", "--disable-ssl-hostname-verification",
- "--header=\"My-Header: my-value\"", "--header", "Another-Header: another-value", "--benchmark"});
+ "--header=\"My-Header: my-value\"", "--header", "Another-Header: another-value", "--benchmark",
+ "--route=myroute", "--timeout=0.125", "--trace=9"});
assertEquals(URI.create("https://vespa.ai:4443/"), args.endpoint());
assertEquals(Paths.get("feed.json"), args.inputFile());
assertEquals(10, args.connections().getAsInt());
@@ -36,6 +38,9 @@ class CliArgumentsTest {
assertEquals("my-value", args.headers().get("My-Header"));
assertEquals("another-value", args.headers().get("Another-Header"));
assertTrue(args.benchmarkModeEnabled());
+ assertEquals("myroute", args.route().get());
+ assertEquals(Duration.ofMillis(125), args.timeout().get());
+ assertEquals(9, args.traceLevel().getAsInt());
}
@Test
diff --git a/vespa-feed-client-cli/src/test/resources/help.txt b/vespa-feed-client-cli/src/test/resources/help.txt
index 9ad7642d4ec..a52842b32fd 100644
--- a/vespa-feed-client-cli/src/test/resources/help.txt
+++ b/vespa-feed-client-cli/src/test/resources/help.txt
@@ -11,4 +11,7 @@ Vespa feed client
--help
--max-streams-per-connection <arg>
--private-key <arg>
+ --route <arg>
+ --timeout <arg>
+ --trace <arg>
--version