( monkeypatch: MonkeyPatch, encrypted_creds_fixture: Path, )
| 332 | |
| 333 | |
| 334 | def 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 | |
| 364 | def test_encrypted_creds_with_env_var( |
nothing calls this directly
no test coverage detected