Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Nov 7, 2023
1 parent 4fcc1d9 commit 308f52c
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 4 deletions.
15 changes: 15 additions & 0 deletions test/data/stages/kickstart/b.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,21 @@
"sha256:b37452649da277bc6f1e80f8c2250a16aa877444e1dcbba0d3546eef7d6fcda3",
"sha256:e81e831345997c1dc0c997899368d590f2f254ce2f19409bd373924f7c8d1674",
"sha256:5f75cc1f7b0007d303d9ca5415de60ab359334d0cd179d3002b4faf4fdb73cbe",
"sha256:e110f5c65c6cbb783fef5530dcf411fc307d7c2e8b28e6f9e17e28ad3e2e78c8",
"sha256:3e3b80b4556a8d799593565783394b891daef4ca5eb8924f8c100bb1dcde3531",
"sha256:beabb033ec52c377dd664f7893ae47173fe00db7cc1a01504d7615f9b979720a",
"sha256:580857559e605453c8cd88065416e529cd6a206a34f1823786f6fb8a08fe5e67",
"sha256:094f39d14df176a1f7dab3d43a2b3850da93b38a61791c8750fd0e703de29687",
"sha256:9ce3f0c0904ac22ab5769babebf43e7dcdb488b0ef999b2e9e88a5b5eb424e51",
"sha256:f68c93c0461c149bb17282dededf421cbc1fbfa5ac133b59bd362526f59e0d57",
"sha256:5db8cf84b1338a25c699e2ea897160828a28b7a28c02d6ed2c5487934bc1726a",
"sha256:e9e6c62b6e20d807b61a089b0f8895ce958d33aed2b716ba442d1987be9f2543",
"sha256:0c039aef60adad0b13c73a9ab7b1ac77d737d73f897c9d27e84d471e6600cf75",
"sha256:4a74ae08a713e9b4e74ff27bfaf57374312370402f90e2796e66c504557ae189",
"sha256:6297d7eee103c679a0f1ea411568d3940af3fe8f38e19388a1544df70bda8b3c",
"sha256:49878cf02c3adc05c612665412a921d35603ae5c904ffc35c5aea3d8d5649975",
"sha256:b5d5e7255c85c3aa9d63598ef140de35843ab2485adf1cb9a9130be80aa0297f",
"sha256:c6b167033a2bba3e6a10a3d255e232f2339136a3a77e9e78990d16d356813190",
"sha256:7bc2d61c327d701780f6fee8ab55a4a4fdb4bffea5a97072e7772ae14f5b7bf5",
"sha256:b34c767bab93fb626c993b98e10547779fa5bec98865b9a66b914e45b4b14f6e",
"sha256:8857513982b0c12e02eb0593baa9dc7cf570f2761a6bb4996fc8cf7d98402444",
Expand Down Expand Up @@ -655,23 +663,30 @@
"sha256:e81e831345997c1dc0c997899368d590f2f254ce2f19409bd373924f7c8d1674": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/procps-ng-3.3.17-1.fc34.x86_64.rpm",
"sha256:c2147331efdfe52db58aeba0a7e211fd7729b33827d16fdbf84da74331cf2e32": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/protobuf-c-1.3.3-7.fc34.x86_64.rpm",
"sha256:5f75cc1f7b0007d303d9ca5415de60ab359334d0cd179d3002b4faf4fdb73cbe": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/publicsuffix-list-dafsa-20190417-5.fc34.noarch.rpm",
"sha256:e110f5c65c6cbb783fef5530dcf411fc307d7c2e8b28e6f9e17e28ad3e2e78c8": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/pykickstart-3.32-2.fc34.noarch.rpm",
"sha256:3e3b80b4556a8d799593565783394b891daef4ca5eb8924f8c100bb1dcde3531": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python-pip-wheel-21.0.1-2.fc34.noarch.rpm",
"sha256:beabb033ec52c377dd664f7893ae47173fe00db7cc1a01504d7615f9b979720a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python-setuptools-wheel-53.0.0-1.fc34.noarch.rpm",
"sha256:580857559e605453c8cd88065416e529cd6a206a34f1823786f6fb8a08fe5e67": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python-unversioned-command-3.9.2-1.fc34.noarch.rpm",
"sha256:094f39d14df176a1f7dab3d43a2b3850da93b38a61791c8750fd0e703de29687": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-3.9.2-1.fc34.x86_64.rpm",
"sha256:9ce3f0c0904ac22ab5769babebf43e7dcdb488b0ef999b2e9e88a5b5eb424e51": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-chardet-4.0.0-1.fc34.noarch.rpm",
"sha256:d57f9ab76f65a5d4e6e372a6c742a016019a11b1652f54c75dfaa5a8e5ca4c03": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-dnf-4.6.1-1.fc34.noarch.rpm",
"sha256:59b2e0dcf99b49de75623a68ecb5e67831fd289e532c4eded0bc4914414db4e9": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-gpg-1.15.1-2.fc34.x86_64.rpm",
"sha256:f78f0ef8bc6b0d19cf48095ecbd7830cfe1bdd5c5a2c82c64d3cedb6f803a9f4": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-hawkey-0.60.0-1.fc34.x86_64.rpm",
"sha256:f68c93c0461c149bb17282dededf421cbc1fbfa5ac133b59bd362526f59e0d57": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-idna-2.10-3.fc34.noarch.rpm",
"sha256:311bf9bb88ae1d7700471ed4edabfbbab40020e514e61b42e6a4c7cf1c4ecd21": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-iniparse-0.4-43.fc34.noarch.rpm",
"sha256:5db8cf84b1338a25c699e2ea897160828a28b7a28c02d6ed2c5487934bc1726a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-kickstart-3.32-2.fc34.noarch.rpm",
"sha256:b855a1058dbe79fdb8b3e678dffaa18376e8462e72e6fbc4a8211c36f4bf3d7a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-libcomps-0.1.15-6.fc34.x86_64.rpm",
"sha256:d69feaba0fa4979747f760383f6013e17471b744d3ab9b845b4eeda6cc655d1f": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-libdnf-0.60.0-1.fc34.x86_64.rpm",
"sha256:e9e6c62b6e20d807b61a089b0f8895ce958d33aed2b716ba442d1987be9f2543": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-libs-3.9.2-1.fc34.x86_64.rpm",
"sha256:0c039aef60adad0b13c73a9ab7b1ac77d737d73f897c9d27e84d471e6600cf75": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-pip-21.0.1-2.fc34.noarch.rpm",
"sha256:4a74ae08a713e9b4e74ff27bfaf57374312370402f90e2796e66c504557ae189": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-pysocks-1.7.1-8.fc34.noarch.rpm",
"sha256:09a0a4702e0f716caaf6f8e75dc478d3d70bf3fbd074a76fb4d6f8492af7c138": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-pyyaml-5.4.1-2.fc34.x86_64.rpm",
"sha256:6297d7eee103c679a0f1ea411568d3940af3fe8f38e19388a1544df70bda8b3c": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-requests-2.25.1-1.fc34.noarch.rpm",
"sha256:45783e958a60d62115e29b961a4b374340a996784b6fc973d088e3e8020d4e24": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-rpm-4.16.1.3-1.fc34.x86_64.rpm",
"sha256:49878cf02c3adc05c612665412a921d35603ae5c904ffc35c5aea3d8d5649975": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-setuptools-53.0.0-1.fc34.noarch.rpm",
"sha256:b5d5e7255c85c3aa9d63598ef140de35843ab2485adf1cb9a9130be80aa0297f": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-six-1.15.0-5.fc34.noarch.rpm",
"sha256:6f15994d7d8a15dae7ec45cf3448c0d3dc451b215e2eb76e6d8e7112b54aff0b": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-unbound-1.13.1-1.fc34.x86_64.rpm",
"sha256:c6b167033a2bba3e6a10a3d255e232f2339136a3a77e9e78990d16d356813190": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/p/python3-urllib3-1.25.10-4.fc34.noarch.rpm",
"sha256:979da51b083339510f083257054ff31d619d81c1e3fa09b6e4a7c6e30792e96c": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/q/qemu-img-5.2.0-5.fc34.1.x86_64.rpm",
"sha256:7bc2d61c327d701780f6fee8ab55a4a4fdb4bffea5a97072e7772ae14f5b7bf5": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/q/qrencode-libs-4.0.2-7.fc34.x86_64.rpm",
"sha256:b34c767bab93fb626c993b98e10547779fa5bec98865b9a66b914e45b4b14f6e": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/r/readline-8.1-2.fc34.x86_64.rpm",
Expand Down
1 change: 1 addition & 0 deletions test/data/stages/kickstart/b.mpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pipeline:
baseurl: https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/
packages:
- systemd
- pykickstart
- name: org.osbuild.kickstart
options:
path: kickstart/ks.cfg
Expand Down
11 changes: 11 additions & 0 deletions test/data/stages/users/b.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,15 @@
"sha256:ecb6266488947b43138644864dc54c81bc0e10ea55fbde7100e699da45dfeb29",
"sha256:aa59709bb1397e17d4f202baad4a28ae872e40fc50b5bee5b400b2a06095d3cb",
"sha256:a04bd8e79ca9948ef5ec386bf78edd60c367d487f82832902de6dcb7ce2b5ed1",
"sha256:7151baf126a07d4f20f91309433005b3552175a1adc03f907d772db9f374b6bc",
"sha256:6a84fac2aa4beec617e596818b06a5f154f678e666f1c4601c972828e22aa22a",
"sha256:c7a197d965f52ad5aeeb75da7805692f27bbcf54dedd203be4ef665d22106eed",
"sha256:acf4e2b81ed92e2460c1a38e5b0e5134fe810ba6cb92d67a8eda260a744561c0",
"sha256:b2066b1fd7953ad2304448c2f2ea713c3c28cac2b11c8563b1bedf577e874db1",
"sha256:12890c33107909cf3224350c4a6f731bd4936cd6919590be39c75d8a7281cd4b",
"sha256:2e2ee3306a607ffc6ab2bd0e398e7a176f45c55ede9c55462632cbf7d100723a",
"sha256:ac6dbb4d55388f795b15f0339116978bca4fc0231eaa7fa7faaddc77bb9aa74a",
"sha256:df8f70b98e21e38a9b6449436d1ab3663fd1a7602a1be4c4d32bffba3a2831b9",
"sha256:9c1682824c73e440730e50b9e26e1e31d723e5273ef14d2a98d75a8a637db42b",
"sha256:cc3cccc057605b615db0d6dcb147c9cf5b1648a0c78256252d1f640e7ad6bf55",
"sha256:a9d20a6a5e322778fd51cd5f3e8e25a50dffb804b3dd88eddca8dd00c7e97593",
Expand Down Expand Up @@ -407,6 +410,9 @@
"sha256:8c9400c01548aa4d4dcfe464bf266ff2fdd31a14c2b5d2b06000084871b54db7",
"sha256:01008af0d9f6a5b328ff2d5380e3a22f4e2cb31f2e44e4604fbd1f77b25d721c",
"sha256:16e64d3a4be39a86023f08ce4500166640e0bfe4f47b2f04db511a5f4eaf4088",
"sha256:3b6a0d1f8c7119aa0ab88a940d3aad7a3b57f875b1e11ab946c89aee2257d053",
"sha256:77c82bebcfad8d8b62d8037ff2470ba7163f33b867661c19343a82e4205188d2",
"sha256:dc26426d4b1d85e7fbc9827e0b0fa76f3a692fc1cbd3a3a7104d713520c745c8",
"sha256:1eb8ababeb9d9804ee8a3960839c20ce24e280e9bea461239ab20d560744d2f4",
"sha256:98cb29680e00e102bd8e6ba1e8b079291823fd64a0e4adaf7631710e690bd27d",
"sha256:0359a21c768977e0f589ee424690a905ea2f13dd0caf410ac1602d8807f77709",
Expand Down Expand Up @@ -629,6 +635,7 @@
"sha256:ecb6266488947b43138644864dc54c81bc0e10ea55fbde7100e699da45dfeb29": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libbrotli-1.0.9-4.fc34.x86_64.rpm",
"sha256:aa59709bb1397e17d4f202baad4a28ae872e40fc50b5bee5b400b2a06095d3cb": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcap-2.48-2.fc34.x86_64.rpm",
"sha256:a04bd8e79ca9948ef5ec386bf78edd60c367d487f82832902de6dcb7ce2b5ed1": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcap-ng-0.8.2-4.fc34.x86_64.rpm",
"sha256:7151baf126a07d4f20f91309433005b3552175a1adc03f907d772db9f374b6bc": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcbor-0.7.0-3.fc34.x86_64.rpm",
"sha256:6a84fac2aa4beec617e596818b06a5f154f678e666f1c4601c972828e22aa22a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcom_err-1.45.6-5.fc34.x86_64.rpm",
"sha256:6f33601c891b34ae7ff543b10f80d50a79c97387c38806172d1596100a776775": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcomps-0.1.15-6.fc34.x86_64.rpm",
"sha256:c7a197d965f52ad5aeeb75da7805692f27bbcf54dedd203be4ef665d22106eed": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libcurl-7.76.0-1.fc34.x86_64.rpm",
Expand All @@ -639,6 +646,7 @@
"sha256:82c4712b0fc9591482113f7c70ef3977a8ef5cf7e6d28cbfa5efe80b125ecf53": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libevent-2.1.12-3.fc34.x86_64.rpm",
"sha256:2e2ee3306a607ffc6ab2bd0e398e7a176f45c55ede9c55462632cbf7d100723a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libfdisk-2.36.2-1.fc34.x86_64.rpm",
"sha256:ac6dbb4d55388f795b15f0339116978bca4fc0231eaa7fa7faaddc77bb9aa74a": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libffi-3.1-28.fc34.x86_64.rpm",
"sha256:df8f70b98e21e38a9b6449436d1ab3663fd1a7602a1be4c4d32bffba3a2831b9": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libfido2-1.6.0-2.fc34.x86_64.rpm",
"sha256:9c1682824c73e440730e50b9e26e1e31d723e5273ef14d2a98d75a8a637db42b": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libgcc-11.0.1-0.3.fc34.x86_64.rpm",
"sha256:cc3cccc057605b615db0d6dcb147c9cf5b1648a0c78256252d1f640e7ad6bf55": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libgcrypt-1.9.2-2.fc34.x86_64.rpm",
"sha256:a9d20a6a5e322778fd51cd5f3e8e25a50dffb804b3dd88eddca8dd00c7e97593": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/l/libgomp-11.0.1-0.3.fc34.x86_64.rpm",
Expand Down Expand Up @@ -702,6 +710,9 @@
"sha256:01008af0d9f6a5b328ff2d5380e3a22f4e2cb31f2e44e4604fbd1f77b25d721c": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/n/nettle-3.7.2-1.fc34.x86_64.rpm",
"sha256:b918d4670e1e519b18e2f5fc087e129581b496afe0cd987089183dba23a52406": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/n/npth-1.6-6.fc34.x86_64.rpm",
"sha256:16e64d3a4be39a86023f08ce4500166640e0bfe4f47b2f04db511a5f4eaf4088": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openldap-2.4.57-2.fc34.x86_64.rpm",
"sha256:3b6a0d1f8c7119aa0ab88a940d3aad7a3b57f875b1e11ab946c89aee2257d053": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openssh-8.5p1-2.fc34.x86_64.rpm",
"sha256:77c82bebcfad8d8b62d8037ff2470ba7163f33b867661c19343a82e4205188d2": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openssh-clients-8.5p1-2.fc34.x86_64.rpm",
"sha256:dc26426d4b1d85e7fbc9827e0b0fa76f3a692fc1cbd3a3a7104d713520c745c8": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openssh-server-8.5p1-2.fc34.x86_64.rpm",
"sha256:1eb8ababeb9d9804ee8a3960839c20ce24e280e9bea461239ab20d560744d2f4": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openssl-libs-1.1.1k-1.fc34.x86_64.rpm",
"sha256:98cb29680e00e102bd8e6ba1e8b079291823fd64a0e4adaf7631710e690bd27d": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/openssl-pkcs11-0.4.11-2.fc34.x86_64.rpm",
"sha256:0359a21c768977e0f589ee424690a905ea2f13dd0caf410ac1602d8807f77709": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/Packages/o/os-prober-1.77-7.fc34.x86_64.rpm",
Expand Down
2 changes: 2 additions & 0 deletions test/data/stages/users/b.mpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pipeline:
packages:
- pam
- shadow-utils
- openssh-server
- openssh-clients
- name: org.osbuild.users
options:
users:
Expand Down
45 changes: 41 additions & 4 deletions test/run/test_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,47 @@ def test_stage_users(self):
tree = os.path.join(outdir, "tree")
assert os.path.isdir(tree)

# check that the user is correctly created
# check that the user is correctly created (not really needed
# as we just called "adduser")
output = subprocess.check_output([
"chroot", tree, "/usr/bin/id", "-u", "nohome"], text=True)
"chroot", tree,
"/usr/bin/id", "-u", "nohome"], text=True)
self.assertEqual(output, "1337\n")

# TODO: run ssh inside the container and check if
# ssh login actually really works
# XXX: use nspawn here?
# ssh needs /dev/null
subprocess.run(
["mount", "-o", "bind", "/dev", os.path.join(tree, "dev")])
self.addCleanup(
subprocess.run, ["umount", os.path.join(tree, "dev")])

# check that ssh logins work
fake_host_key = os.path.join(tree, "tmp", "ssh_host_ed25519_key")
subprocess.run([
"chroot", tree,
"/usr/bin/ssh-keygen", "-f", fake_host_key,
"-N", "''",
"-t", "ed25519",
], stdout=sys.stdout, stderr=sys.stderr)
sshd = subprocess.Popen(
[
"chroot", tree,
"/usr/sbin/sshd", "-D", "-p", "8022",
"-o" f"HostKey={fake_host_key}",
],
stdout=sys.stdout,
stderr=sys.stderr,
)
self.addCleanup(sshd.kill)

# TODO: detect when port is availabe
import time
time.sleep(1)

output = subprocess.check_output([
"chroot", tree,
"/usr/bin/ssh", "-p", "8022",
#"-i",
"nohome@localhost",
"id", "-u"], text=True)
self.assertEqual(output, "1337\n")

0 comments on commit 308f52c

Please sign in to comment.