transaction: Skip some tests requiring confdir if not available
This commit is contained in:
@@ -258,6 +258,9 @@ func TestPAM_ConfDir(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPAM_ConfDir_FailNoServiceOrUnsupported(t *testing.T) {
|
func TestPAM_ConfDir_FailNoServiceOrUnsupported(t *testing.T) {
|
||||||
|
if !CheckPamHasStartConfdir() {
|
||||||
|
t.Skip("this requires PAM with Conf dir support")
|
||||||
|
}
|
||||||
u, _ := user.Current()
|
u, _ := user.Current()
|
||||||
c := Credentials{
|
c := Credentials{
|
||||||
Password: "secret",
|
Password: "secret",
|
||||||
@@ -316,6 +319,9 @@ func TestPAM_ConfDir_InfoMessage(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPAM_ConfDir_Deny(t *testing.T) {
|
func TestPAM_ConfDir_Deny(t *testing.T) {
|
||||||
|
if !CheckPamHasStartConfdir() {
|
||||||
|
t.Skip("this requires PAM with Conf dir support")
|
||||||
|
}
|
||||||
u, _ := user.Current()
|
u, _ := user.Current()
|
||||||
tx, err := StartConfDir("deny-service", u.Username, Credentials{}, "test-services")
|
tx, err := StartConfDir("deny-service", u.Username, Credentials{}, "test-services")
|
||||||
ensureTransactionEnds(t, tx)
|
ensureTransactionEnds(t, tx)
|
||||||
|
|||||||
Reference in New Issue
Block a user