From 40c6d3875289f33ea3f9a4cd138ac97c8c329085 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 b6c411b1..80a52e5b 100644 --- a/transaction_test.go +++ b/transaction_test.go @@ -237,6 +237,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", @@ -294,6 +297,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") defer maybeEndTransaction(t, tx)