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 2020/04/22 15:15:17 UTC

[kudu] branch master updated: [webserver-test] fix TestInvalidHeaders on macOS

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 2fdda99  [webserver-test] fix TestInvalidHeaders on macOS
2fdda99 is described below

commit 2fdda9904aab082207e12325424dd52c5ad7c616
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Tue Apr 21 17:19:44 2020 -0700

    [webserver-test] fix TestInvalidHeaders on macOS
    
    Change-Id: I19cfb90ba18bf8b9125ca635f2417f4058c4c5f1
    Reviewed-on: http://gerrit.cloudera.org:8080/15779
    Reviewed-by: Hao Hao <ha...@cloudera.com>
    Reviewed-by: Volodymyr Verovkin <ve...@cloudera.com>
    Tested-by: Alexey Serbin <as...@cloudera.com>
---
 src/kudu/server/webserver-test.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/kudu/server/webserver-test.cc b/src/kudu/server/webserver-test.cc
index a84510e..ddbe079 100644
--- a/src/kudu/server/webserver-test.cc
+++ b/src/kudu/server/webserver-test.cc
@@ -238,7 +238,11 @@ TEST_F(SpnegoWebserverTest, TestInvalidHeaders) {
   EXPECT_STR_CONTAINS(buf_.ToString(), "bad Negotiate header");
   EXPECT_EQ(curl_.FetchURL(url_, &buf_, { "Authorization: Negotiate aaa" }).ToString(),
             "Remote error: HTTP 401");
-  EXPECT_STR_CONTAINS(buf_.ToString(), "Invalid token was supplied");
+  EXPECT_STR_CONTAINS(buf_.ToString(), "Not authorized");
+  // Error messages about an invalid token come from the Kerberos library, and
+  // different versions of the library have different messages.
+  ASSERT_STR_MATCHES(buf_.ToString(),
+                     "(Invalid token was supplied|A token was invalid)");
 }
 
 // Test that if no authorization header at all is provided, the response