[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.
This commit is contained in:
Adriaan de Groot 2021-02-03 13:48:01 +01:00
parent 2f7790d691
commit b8a9c4c3b7

View File

@ -64,10 +64,9 @@ GroupTests::testReadGroup()
#else #else
QVERIFY( groups.contains( QStringLiteral( "root" ) ) ); QVERIFY( groups.contains( QStringLiteral( "root" ) ) );
#endif #endif
// openSUSE doesn't have "sys"
// QVERIFY( groups.contains( QStringLiteral( "sys" ) ) );
QVERIFY( groups.contains( QStringLiteral( "nogroup" ) ) );
QVERIFY( groups.contains( QStringLiteral( "tty" ) ) ); 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 ) for ( const QString& s : groups )
{ {