Add fake sudo script

Manila tests use sudo all over the place and while the only
configured user in the test image is root, it's easier to
fake the sudo binary than to modify test code to know when
to sudo and when to not.

Also remove 2 mkdir calls that are obviated by the new file
getting copied in those directories.

Change-Id: Ib0cbe05130bc617154bf471e2ecc0a78b2bb8377
This commit is contained in:
Ben Swartzlander 2017-02-15 16:33:47 -05:00
parent 99ba2ffda6
commit dca0bd32e5
2 changed files with 4 additions and 2 deletions

4
common-files/usr/bin/sudo Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
$@

View File

@ -23,14 +23,12 @@ fi
if [ ! -d overlay-client ] ; then if [ ! -d overlay-client ] ; then
mkdir overlay-client mkdir overlay-client
cp -a common-files/* overlay-client cp -a common-files/* overlay-client
mkdir -p overlay-client/usr/bin
cp $JSON_SH overlay-client/usr/bin cp $JSON_SH overlay-client/usr/bin
fi fi
if [ ! -d overlay-server ] ; then if [ ! -d overlay-server ] ; then
mkdir overlay-server mkdir overlay-server
cp -a common-files/* overlay-server cp -a common-files/* overlay-server
cp -a server-files/* overlay-server cp -a server-files/* overlay-server
mkdir -p overlay-server/usr/bin
cp $JSON_SH overlay-server/usr/bin cp $JSON_SH overlay-server/usr/bin
fi fi