We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c4cc7a commit bc42787Copy full SHA for bc42787
testinfra/modules/group.py
@@ -37,5 +37,13 @@ def exists(self):
37
def gid(self):
38
return int(self.check_output("getent group %s | cut -d':' -f3", self.name))
39
40
+ @property
41
+ def user_list(self):
42
+ """Return all users that are members of this group."""
43
+ users = self.check_output("getent group %s | cut -d':' -f4", self.name)
44
+ if users:
45
+ return users.split(",")
46
+ return []
47
+
48
def __repr__(self):
49
return "<group {}>".format(self.name)
0 commit comments