From b61b5f8650bdb3f4b57d997baa20715e115ded28 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 2 Nov 2020 12:27:50 +0100 Subject: [PATCH] [users] Run an expected-to-fail test in creating groups --- src/modules/users/TestGroupInformation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/users/TestGroupInformation.cpp b/src/modules/users/TestGroupInformation.cpp index 5e8bcf9ab..dd4bfe78f 100644 --- a/src/modules/users/TestGroupInformation.cpp +++ b/src/modules/users/TestGroupInformation.cpp @@ -75,8 +75,6 @@ GroupTests::testReadGroup() void GroupTests::testCreateGroup() { - Config g; - // BUILD_AS_TEST is the source-directory path QFile fi( QString( "%1/tests/5-issue-1523.conf" ).arg( BUILD_AS_TEST ) ); QVERIFY( fi.exists() ); @@ -91,6 +89,12 @@ void GroupTests::testCreateGroup() QCOMPARE( c.defaultGroups().count(), 4 ); QVERIFY( c.defaultGroups().contains( QStringLiteral( "adm" ) ) ); + QVERIFY( c.defaultGroups().contains( QStringLiteral( "bar" ) ) ); + + Calamares::JobQueue::instance()->globalStorage()->insert( "rootMountPoint", "/" ); + + SetupGroupsJob j(&c); + QVERIFY( !j.exec() ); // running as regular user this should fail }