Bug 559 - Remove password file before starting test_adminusers

This commit is contained in:
Mark Riddoch 2014-10-15 12:39:34 +01:00
parent 1954fddafb
commit 1a59e1b188

View File

@ -266,6 +266,14 @@ int
main(int argc, char **argv)
{
int result = 0;
char *home, buf[1024];
/* Unlink any existing password file before running this test */
if ((home = getenv("MAXSCALE_HOME")) == NULL)
home = "/usr/local/skysql";
sprintf(buf, "%s/etc/passwd", home);
if (strcmp(buf, "/etc/passwd") != 0)
unlink(buf);
result += test1();
result += test2();