From 0a4d07dd3666d6ace76404b6c180cbfa6a45484f Mon Sep 17 00:00:00 2001 From: Andrey Z Date: Tue, 6 Jul 2021 18:38:52 +0300 Subject: [PATCH] upd --- tests/testflows/kerberos/kerberos_env/docker-compose.yml | 5 +++++ tests/testflows/kerberos/tests/common.py | 4 ++-- tests/testflows/kerberos/tests/generic.py | 4 +--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/testflows/kerberos/kerberos_env/docker-compose.yml b/tests/testflows/kerberos/kerberos_env/docker-compose.yml index d1a74662a83..e89d18a5299 100644 --- a/tests/testflows/kerberos/kerberos_env/docker-compose.yml +++ b/tests/testflows/kerberos/kerberos_env/docker-compose.yml @@ -73,3 +73,8 @@ services: condition: service_healthy kerberos: condition: service_healthy + +networks: + default: + name: krbnet + driver: bridge diff --git a/tests/testflows/kerberos/tests/common.py b/tests/testflows/kerberos/tests/common.py index 9a1df1bf34d..e19ce2fc60e 100644 --- a/tests/testflows/kerberos/tests/common.py +++ b/tests/testflows/kerberos/tests/common.py @@ -68,8 +68,8 @@ def create_server_principal(self, node): """ try: node.cmd("echo pwd | kinit admin/admin") - node.cmd(f"kadmin -w pwd -q \"add_principal -randkey HTTP/kerberos_env_{node.name}_1.kerberos_env_default\"") - node.cmd(f"kadmin -w pwd -q \"ktadd -k /etc/krb5.keytab HTTP/kerberos_env_{node.name}_1.kerberos_env_default\"") + node.cmd(f"kadmin -w pwd -q \"add_principal -randkey HTTP/kerberos_env_{node.name}_1.krbnet\"") + node.cmd(f"kadmin -w pwd -q \"ktadd -k /etc/krb5.keytab HTTP/kerberos_env_{node.name}_1.krbnet\"") yield finally: node.cmd("kdestroy") diff --git a/tests/testflows/kerberos/tests/generic.py b/tests/testflows/kerberos/tests/generic.py index 3322fce5d66..4368b39d06c 100644 --- a/tests/testflows/kerberos/tests/generic.py +++ b/tests/testflows/kerberos/tests/generic.py @@ -16,7 +16,7 @@ def ping(self): for i in range(3): with When(f"curl ch_{i} kerberos"): - r = ch_nodes[i].command(f"curl kerberos_env_kerberos_1 -c 1") + r = ch_nodes[i].command(f"curl kerberos -c 1") kinit_no_keytab(node=ch_nodes[2]) with Then(f"return code should be 0"): assert r.exitcode == 7, error() @@ -100,10 +100,8 @@ def invalid_server_ticket(self): self.context.krb_server.start() ch_nodes[2].cmd("kdestroy") while True: - time.sleep(1) kinit_no_keytab(node=ch_nodes[2]) create_server_principal(node=ch_nodes[0]) - time.sleep(1) if ch_nodes[2].cmd(test_select_query(node=ch_nodes[0])).output == "kerberos_user": break debug(test_select_query(node=ch_nodes[0]))