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 Nov 29, 2023
1 parent 91e87cf commit 40c6d38
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 @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 40c6d38

Please sign in to comment.