Skip to content

Commit

Permalink
transaction: Skip some tests requiring confdir if not available
Browse files Browse the repository at this point in the history
  • Loading branch information
3v1n0 committed Oct 12, 2023
1 parent e74c093 commit 7d56fc2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,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",
Expand Down Expand Up @@ -288,6 +291,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)
Expand Down

0 comments on commit 7d56fc2

Please sign in to comment.