From e6f817312ad26cbf96c9cd7185e3d7c37e8e2430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 29 Sep 2023 20:28:22 +0200 Subject: [PATCH] transaction: Skip some tests requiring confdir if not available --- transaction_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/transaction_test.go b/transaction_test.go index b5b807e..d358b0e 100644 --- a/transaction_test.go +++ b/transaction_test.go @@ -258,6 +258,9 @@ func TestPAM_ConfDir(t *testing.T) { } func TestPAM_ConfDir_FailNoServiceOrUnsupported(t *testing.T) { + if !CheckPamHasStartConfdir() { + t.Skip("this requires PAM with Conf dir support") + } u, _ := user.Current() c := Credentials{ Password: "secret", @@ -316,6 +319,9 @@ func TestPAM_ConfDir_InfoMessage(t *testing.T) { } func TestPAM_ConfDir_Deny(t *testing.T) { + if !CheckPamHasStartConfdir() { + t.Skip("this requires PAM with Conf dir support") + } u, _ := user.Current() tx, err := StartConfDir("deny-service", u.Username, Credentials{}, "test-services") ensureTransactionEnds(t, tx)