forked from Mirror/pmbootstrap
chroot: combine user.py and root.py into run.py (MR 2252)
These are small related utility functions, combine them together. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
1d9bbd613e
commit
cf651e56d5
9 changed files with 52 additions and 64 deletions
|
@ -8,8 +8,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
import pmb_test # noqa
|
||||
import pmb.chroot.root
|
||||
import pmb.chroot.user
|
||||
import pmb.chroot.run
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.run_core
|
||||
|
||||
|
@ -47,7 +46,7 @@ def test_proxy_chroot_user(args: PmbArgs, monkeypatch):
|
|||
|
||||
|
||||
def test_proxy_chroot_root(args: PmbArgs, monkeypatch):
|
||||
func = pmb.chroot.root
|
||||
func = pmb.chroot.run
|
||||
monkeypatch.setattr(os, "environ", {"HTTP_PROXY": "testproxy"})
|
||||
ret = func(args, ["sh", "-c", 'echo "$HTTP_PROXY"'], output_return=True)
|
||||
assert ret == "testproxy\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue