Documentation ¶
Overview ¶
Package localgrouptestutils export users test functionalities used by other packages to change cmdline and group file.
Index ¶
- func AuthdIntegrationTestsEnvWithGpasswdMock(t *testing.T, outputFilePath, groupsFilePath string) []string
- func Mockgpasswd(_ *testing.T)
- func RequireGPasswdOutput(t *testing.T, destCmdsFile, goldenGpasswdPath string)
- func SetGpasswdCmd(gpasswdCmd []string)
- func SetGroupPath(groupPath string)
- func SetupGPasswdMock(t *testing.T, groupsFilePath string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthdIntegrationTestsEnvWithGpasswdMock ¶
func AuthdIntegrationTestsEnvWithGpasswdMock(t *testing.T, outputFilePath, groupsFilePath string) []string
AuthdIntegrationTestsEnvWithGpasswdMock returns the environment to pass to the authd daemon to use the gpasswd mock. In order to enable it, the authd binary must be built with the tag integrationtests. You need to install a TestMockgpasswd (generally calling Mockgpasswd) in your integration tests files.
func RequireGPasswdOutput ¶
RequireGPasswdOutput compare the output of gpasswd with the golden file.
func SetGpasswdCmd ¶
func SetGpasswdCmd(gpasswdCmd []string)
SetGpasswdCmd sets the gpasswdCmd for the defaultOptions. Tests using this can't be run in parallel.
func SetGroupPath ¶
func SetGroupPath(groupPath string)
SetGroupPath sets the groupPath for the defaultOptions. Tests using this can't be run in parallel.
Types ¶
This section is empty.