mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55:37 -04:00
parent
f1435452ea
commit
094c213baa
2 changed files with 24 additions and 2 deletions
|
@ -21,7 +21,7 @@
|
|||
// Implementation details
|
||||
extern bool setFileHostname( const QString& );
|
||||
extern bool writeFileEtcHosts( const QString& );
|
||||
extern void setSystemdHostname( const QString& );
|
||||
extern bool setSystemdHostname( const QString& );
|
||||
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
|
@ -44,6 +44,7 @@ private Q_SLOTS:
|
|||
|
||||
void testEtcHostname();
|
||||
void testEtcHosts();
|
||||
void testHostnamed();
|
||||
|
||||
void cleanup();
|
||||
|
||||
|
@ -116,6 +117,17 @@ UsersTests::testEtcHosts()
|
|||
QCOMPARE( QFileInfo( m_dir.filePath( "etc/hosts" ) ).size(), 150 + 22 - 2 );
|
||||
}
|
||||
|
||||
void
|
||||
UsersTests::testHostnamed()
|
||||
{
|
||||
// Since the service might not be running (e.g. non-systemd systems,
|
||||
// FreeBSD, docker, ..) we're not going to fail a test here.
|
||||
// There's also the permissions problem to think of.
|
||||
QEXPECT_FAIL( "", "Hostname changes are access-controlled", Continue );
|
||||
QVERIFY( setSystemdHostname( "tubophone.calamares.io" ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UsersTests::cleanup()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue