You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2022/02/18 16:02:42 UTC
[kudu] branch master updated: [webserver-test] unify generation of the server's URL
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 7db93eb [webserver-test] unify generation of the server's URL
7db93eb is described below
commit 7db93eba9ad84ddc276256a4d72faa941c182344
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Thu Feb 17 20:59:36 2022 -0800
[webserver-test] unify generation of the server's URL
Change-Id: Ic1e2536b2f548df9f28131368a5a8d1f46cd3053
Reviewed-on: http://gerrit.cloudera.org:8080/18254
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
src/kudu/server/webserver-test.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kudu/server/webserver-test.cc b/src/kudu/server/webserver-test.cc
index 58cf31d..d52bd12 100644
--- a/src/kudu/server/webserver-test.cc
+++ b/src/kudu/server/webserver-test.cc
@@ -111,7 +111,7 @@ class WebserverTest : public KuduTest {
ASSERT_EQ(addrs.size(), 1);
ASSERT_TRUE(addrs[0].IsWildcard());
ASSERT_OK(addr_.ParseString("127.0.0.1", addrs[0].port()));
- url_ = Substitute("http://$0", addr_.ToString());
+ url_ = Substitute(use_ssl() ? "https://$0/" : "http://$0", addr_.ToString());
// For testing purposes, we assume the server has been initialized. Typically this
// is set to true after the rpc server is started in the server startup process.
server_->SetStartupComplete(true);
@@ -414,7 +414,7 @@ TEST_F(SslWebserverTest, TestSSL) {
// We use a self-signed cert, so we need to disable cert verification in curl.
curl_.set_verify_peer(false);
- ASSERT_OK(curl_.FetchURL(Substitute("https://$0/", addr_.ToString()), &buf_));
+ ASSERT_OK(curl_.FetchURL(url_, &buf_));
// Should have expected title.
ASSERT_STR_CONTAINS(buf_.ToString(), "Kudu");
}