From b8a9c4c3b78aa58e289dd9212f399e3f6af690b0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 3 Feb 2021 13:48:01 +0100 Subject: [PATCH] [users] Be more forgiving in tests - the host system's /etc/group is being read, and that varies between host OS versions; since I was doing today's release on KaOS, the test was failing because of arbitrary differences between the default groups on each Linux flavor. --- src/modules/users/TestGroupInformation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/users/TestGroupInformation.cpp b/src/modules/users/TestGroupInformation.cpp index 21b8d47ce..31ca032c7 100644 --- a/src/modules/users/TestGroupInformation.cpp +++ b/src/modules/users/TestGroupInformation.cpp @@ -64,10 +64,9 @@ GroupTests::testReadGroup() #else QVERIFY( groups.contains( QStringLiteral( "root" ) ) ); #endif - // openSUSE doesn't have "sys" - // QVERIFY( groups.contains( QStringLiteral( "sys" ) ) ); - QVERIFY( groups.contains( QStringLiteral( "nogroup" ) ) ); QVERIFY( groups.contains( QStringLiteral( "tty" ) ) ); + // openSUSE doesn't have "sys", KaOS doesn't have "nogroup" + QVERIFY( groups.contains( QStringLiteral( "sys" ) ) || groups.contains( QStringLiteral( "nogroup" ) ) ); for ( const QString& s : groups ) {