summaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-03-14 12:03:42 -0500
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-19 15:01:48 +0100
commitc6b205be77fb2a50772cd31267e09503ecd8b6bc (patch)
tree1e263d436ede974588e3b39af21955806cf19016 /contrib/cirrus
parentac523cbe2b257e13c7b3b823c8de83e44052ffaf (diff)
downloadpodman-c6b205be77fb2a50772cd31267e09503ecd8b6bc.tar.gz
podman-c6b205be77fb2a50772cd31267e09503ecd8b6bc.tar.bz2
podman-c6b205be77fb2a50772cd31267e09503ecd8b6bc.zip
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'contrib/cirrus')
-rw-r--r--contrib/cirrus/lib.sh22
-rwxr-xr-xcontrib/cirrus/rootless_test.sh3
-rwxr-xr-xcontrib/cirrus/setup_environment.sh4
3 files changed, 21 insertions, 8 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 773f4f484..fe5fe7238 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -170,30 +170,36 @@ record_timestamp() {
setup_rootless() {
req_env_var "
ROOTLESS_USER $ROOTLESS_USER
- ROOTLESS_UID $ROOTLESS_UID
- ROOTLESS_GID $ROOTLESS_GID
+ #ROOTLESS_UID $ROOTLESS_UID
+ #ROOTLESS_GID $ROOTLESS_GID
GOSRC $GOSRC
ENVLIB $ENVLIB
"
echo "creating $ROOTLESS_UID:$ROOTLESS_GID $ROOTLESS_USER user"
- groupadd -g $ROOTLESS_GID $ROOTLESS_USER
- useradd -g $ROOTLESS_GID -u $ROOTLESS_UID --no-user-group --create-home $ROOTLESS_USER
- chown -R $ROOTLESS_UID:$ROOTLESS_GID "$GOSRC"
+ #groupadd -g $ROOTLESS_GID $ROOTLESS_USER
+ #useradd -g $ROOTLESS_GID -u $ROOTLESS_UID --no-user-group --create-home $ROOTLESS_USER
+ useradd --create-home $ROOTLESS_USER
+ chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOSRC"
echo "creating ssh keypair for $USER"
ssh-keygen -P "" -f $HOME/.ssh/id_rsa
echo "Allowing ssh key for $ROOTLESS_USER"
(umask 077 && mkdir "/home/$ROOTLESS_USER/.ssh")
- chown -R $ROOTLESS_UID:$ROOTLESS_GID "/home/$ROOTLESS_USER/.ssh"
- install -o $ROOTLESS_UID -g $ROOTLESS_GID -m 0600 \
+ chown -R $ROOTLESS_USER:$ROOTLESS_USER "/home/$ROOTLESS_USER/.ssh"
+ install -o $ROOTLESS_USER -g $ROOTLESS_USER -m 0600 \
"$HOME/.ssh/id_rsa.pub" "/home/$ROOTLESS_USER/.ssh/authorized_keys"
+ # Makes debugging easier
+ cat /root/.ssh/authorized_keys >> "/home/$ROOTLESS_USER/.ssh/authorized_keys"
+
+ echo "Configuring subuid and subgid"
+ echo "${ROOTLESS_USER}:$[ROOTLESS_UID * 100]:65536" | tee -a /etc/subuid >> /etc/subgid
echo "Setting permissions on automation files"
chmod 666 "$TIMESTAMPS_FILEPATH"
echo "Copying $HOME/$ENVLIB"
- install -o $ROOTLESS_UID -g $ROOTLESS_GID -m 0700 \
+ install -o $ROOTLESS_USER -g $ROOTLESS_USER -m 0700 \
"$HOME/$ENVLIB" "/home/$ROOTLESS_USER/$ENVLIB"
echo "Configuring user's go environment variables"
diff --git a/contrib/cirrus/rootless_test.sh b/contrib/cirrus/rootless_test.sh
index 811b7cf2e..d0e2ceb95 100755
--- a/contrib/cirrus/rootless_test.sh
+++ b/contrib/cirrus/rootless_test.sh
@@ -29,6 +29,9 @@ case "${OS_RELEASE_ID}-${OS_RELEASE_VER}" in
fedora-29) ;&
fedora-28)
make
+ make varlink_generate
+ make test-binaries
+ make ginkgo
;;
*) bad_os_id_ver ;;
esac
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 04c19b3af..7ba6965ba 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -79,6 +79,10 @@ then
if run_rootless
then
setup_rootless
+ make install.catatonit
+ go get github.com/onsi/ginkgo/ginkgo
+ go get github.com/onsi/gomega/...
+ dnf -y update runc
else
# Includes some $HOME relative details
go env | while read envline