URL: https://github.com/SSSD/sssd/pull/546
Author: fidencio
 Title: #546: TESTS: Re-add tests for `kdestroy -A`
Action: opened

PR body:
"""
This reverts commit 89726be5a05493b7af312f0be9ac5ecb6f1822e1 and also do
a few modifications on it in order to ensure we don't have any
regression on https://pagure.io/SSSD/sssd/issue/3413

As this patch depends on a krb5 patch applied to the distros we run our 
internal CI on, I've opened a bug report providing patches for Fedora[0] and 
Debian[1].

[0]: https://bugzilla.redhat.com/show_bug.cgi?id=1561917
[1]: https://salsa.debian.org/debian/krb5/merge_requests/1
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/546/head:pr546
git checkout pr546
From 2aa613a5922e47e9e21880a3646e427d2f05aaa5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fiden...@redhat.com>
Date: Tue, 27 Mar 2018 17:55:08 +0200
Subject: [PATCH] TESTS: Re-add tests for `kdestroy -A`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 89726be5a05493b7af312f0be9ac5ecb6f1822e1 and also do
a few modifications on it in order to ensure we don't have any
regression on https://pagure.io/SSSD/sssd/issue/3413

Related:
https://pagure.io/SSSD/sssd/issue/3413

Signed-off-by: Fabiano FidĂȘncio <fiden...@redhat.com>
---
 src/tests/intg/test_kcm.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/tests/intg/test_kcm.py b/src/tests/intg/test_kcm.py
index 5bacc6f91..b3252bd36 100644
--- a/src/tests/intg/test_kcm.py
+++ b/src/tests/intg/test_kcm.py
@@ -303,6 +303,21 @@ def collection_init_list_destroy(testenv):
     assert cc_coll['bob@KCMTEST'] == ['krbtgt/KCMTEST@KCMTEST']
     assert 'carol@KCMTEST' not in cc_coll
 
+    # Let's kinit a 3rd principal
+    out, _, _ = testenv.k5util.kinit("carol", "carolpw")
+    assert out == 0
+    cc_coll = testenv.k5util.list_all_princs()
+    assert len(cc_coll) == 3
+    assert cc_coll['alice@KCMTEST'] == ['krbtgt/KCMTEST@KCMTEST']
+    assert cc_coll['bob@KCMTEST'] == ['krbtgt/KCMTEST@KCMTEST']
+    assert cc_coll['carol@KCMTEST'] == ['krbtgt/KCMTEST@KCMTEST']
+
+    # Let's ensure `kdestroy -A` works with more than 2 principals
+    # https://pagure.io/SSSD/sssd/issue/3413
+    out = testenv.k5util.kdestroy(all_ccaches=True)
+    assert out == 0
+    assert testenv.k5util.num_princs() == 0
+
 
 def test_kcm_mem_collection_init_list_destroy(setup_for_kcm_mem):
     testenv = setup_for_kcm_mem
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to