mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-23 01:28:51 +00:00
Move hostname get/set to separate "module" (directory)
Signed-off-by: Christina Ying Wang <christina@balena.io>
This commit is contained in:
@ -1294,18 +1294,4 @@ describe('patches host config', () => {
|
||||
await actions.patchHostConfig(conf, true);
|
||||
expect(hostConfigPatch).to.have.been.calledWith(conf, true);
|
||||
});
|
||||
|
||||
it('patches hostname as first 7 digits of uuid if hostname parameter is empty string', async () => {
|
||||
const conf = {
|
||||
network: {
|
||||
hostname: '',
|
||||
},
|
||||
};
|
||||
const uuid = await config.get('uuid');
|
||||
await actions.patchHostConfig(conf, true);
|
||||
expect(hostConfigPatch).to.have.been.calledWith(
|
||||
{ network: { hostname: uuid?.slice(0, 7) } },
|
||||
true,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user