MCPcopy Create free account
hub / github.com/archlinux/archinstall / test_encrypted_creds_with_arg

Function test_encrypted_creds_with_arg

tests/test_args.py:334–361  ·  view source on GitHub ↗
(
	monkeypatch: MonkeyPatch,
	encrypted_creds_fixture: Path,
)

Source from the content-addressed store, hash-verified

332
333
334def test_encrypted_creds_with_arg(
335 monkeypatch: MonkeyPatch,
336 encrypted_creds_fixture: Path,
337) -> None:
338 monkeypatch.setattr(
339 'sys.argv',
340 [
341 'archinstall',
342 '--creds',
343 str(encrypted_creds_fixture),
344 '--creds-decryption-key',
345 'master',
346 ],
347 )
348
349 handler = ArchConfigHandler()
350 arch_config = handler.config
351
352 assert arch_config.auth_config is not None
353 assert arch_config.auth_config.root_enc_password == Password(enc_password='$y$j9T$FWCInXmSsS.8KV4i7O50H.$Hb6/g.Sw1ry888iXgkVgc93YNuVk/Rw94knDKdPVQw7')
354 assert arch_config.auth_config.users == [
355 User(
356 username='t',
357 password=Password(enc_password='$y$j9T$3KxMigAEnjtzbjalhLewE.$gmuoQtc9RNY/PmO/GxHHYvkZNO86Eeftg1Oc7L.QSO/'),
358 sudo=True,
359 groups=[],
360 ),
361 ]
362
363
364def test_encrypted_creds_with_env_var(

Callers

nothing calls this directly

Calls 3

ArchConfigHandlerClass · 0.90
PasswordClass · 0.90
UserClass · 0.90

Tested by

no test coverage detected