diff options
author | Marco Trevisan (Treviño) <[email protected]> | 2023-09-29 20:28:22 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <[email protected]> | 2023-11-30 02:49:29 +0100 |
commit | e6f817312ad26cbf96c9cd7185e3d7c37e8e2430 (patch) | |
tree | 9b72e2955b419a7e661adeba511d8209b18af565 | |
parent | 01f62f11f7aa7a84b89287737822f2458a5adf40 (diff) |
transaction: Skip some tests requiring confdir if not available
-rw-r--r-- | transaction_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
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) |