Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
e6ccd90b
Unverified
Commit
e6ccd90b
authored
Feb 06, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Pass http_proxy through sudo environment
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
ef9512b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lxc-test-unpriv
src/tests/lxc-test-unpriv
+5
-1
lxc-test-usernic.in
src/tests/lxc-test-usernic.in
+5
-1
No files found.
src/tests/lxc-test-unpriv
View file @
e6ccd90b
...
@@ -49,7 +49,11 @@ cleanup() {
...
@@ -49,7 +49,11 @@ cleanup() {
}
}
run_cmd
()
{
run_cmd
()
{
sudo
-i
-u
$TUSER
env
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
$TUSER
)
$*
if
[
-n
"
${
http_proxy
:-}
"
]
;
then
sudo
-i
-u
$TUSER
env
http_proxy
=
$http_proxy
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
$TUSER
)
$*
else
sudo
-i
-u
$TUSER
env
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
$TUSER
)
$*
fi
}
}
# create a test user
# create a test user
...
...
src/tests/lxc-test-usernic.in
View file @
e6ccd90b
...
@@ -55,7 +55,11 @@ cleanup() {
...
@@ -55,7 +55,11 @@ cleanup() {
}
}
run_cmd
()
{
run_cmd
()
{
sudo
-i
-u
usernic-user
env
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
usernic-user
)
$*
if
[
-n
"
${
http_proxy
:-}
"
]
;
then
sudo
-i
-u
usernic-user
env
http_proxy
=
$http_proxy
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
usernic-user
)
$*
else
sudo
-i
-u
usernic-user
env
XDG_RUNTIME_DIR
=
/run/user/
$(
id
-u
usernic-user
)
$*
fi
}
}
set
-eu
set
-eu
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment