[users] Explain why the second setting-hostname test succeeds.

This commit is contained in:
Adriaan de Groot 2022-03-21 14:12:18 +01:00
parent 9b651b4f00
commit 88d392f612

View File

@ -128,7 +128,11 @@ UsersTests::testHostnamed()
QVERIFY( setSystemdHostname( QStringLiteral( "tubophone.calamares.io" ) ) );
if ( !m_originalHostName.isEmpty() )
{
QEXPECT_FAIL( "", "Hostname changes are access-controlled (restore)", Continue );
// If the previous test succeeded (to change the hostname to something bogus)
// then this one should, also; or, if the previous one failed, then this
// changes to whatever-the-hostname-is, and systemd dbus seems to call that
// a success, as well (since nothing changes). So no failure-expectation here.
// QEXPECT_FAIL( "", "Hostname changes are access-controlled (restore)", Continue );
QVERIFY( setSystemdHostname( m_originalHostName ) );
}
}