security-itest: fix assertion for el6 On el6, the error message when no Kerberos credentials are available is a little bit different. This just fixes the assertion.
Change-Id: I2a118580ed67f3ead60980740b6bdbc8dfcb0f3e Reviewed-on: http://gerrit.cloudera.org:8080/6157 Reviewed-by: Todd Lipcon <[email protected]> Tested-by: Todd Lipcon <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/0c3f82db Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/0c3f82db Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/0c3f82db Branch: refs/heads/master Commit: 0c3f82db1f8602f8a9047dbf5493b3d4eb9d9524 Parents: 085f1e0 Author: Todd Lipcon <[email protected]> Authored: Sun Feb 26 13:24:55 2017 -0800 Committer: Todd Lipcon <[email protected]> Committed: Sun Feb 26 22:36:07 2017 +0000 ---------------------------------------------------------------------- src/kudu/integration-tests/security-itest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/0c3f82db/src/kudu/integration-tests/security-itest.cc ---------------------------------------------------------------------- diff --git a/src/kudu/integration-tests/security-itest.cc b/src/kudu/integration-tests/security-itest.cc index a3268ef..71b0d28 100644 --- a/src/kudu/integration-tests/security-itest.cc +++ b/src/kudu/integration-tests/security-itest.cc @@ -146,10 +146,13 @@ TEST_F(SecurityITest, TestNoKerberosCredentials) { client::sp::shared_ptr<KuduClient> client; Status s = cluster_->CreateClient(nullptr, &client); + // The error message differs on el6 from newer krb5 implementations, + // so we'll check for either one. ASSERT_STR_MATCHES(s.ToString(), "Not authorized: Could not connect to the cluster: " "Client connection negotiation failed: client connection " - "to .*: No Kerberos credentials available"); + "to .*: (No Kerberos credentials available|" + "Credentials cache file.*not found)"); } // Test cluster access by a user who is not authorized as a client.
