Skip to content

Commit

Permalink
tests: Copy the download cache when available [v2]
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
stgraber committed Sep 20, 2014
1 parent cd37ec2 commit 43d8085
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/lxc-test-unpriv
Expand Up @@ -114,6 +114,12 @@ else
done
fi

# Copy the download template cache if available
run_cmd mkdir -p $HDIR/.cache/lxc
[ -d /var/cache/lxc/download ] && \
cp -R /var/cache/lxc/download $HDIR/.cache/lxc && \
chown -R $TUSER: $HDIR/.cache/lxc

run_cmd lxc-create -t download -n c1 -- -d ubuntu -r trusty -a $ARCH
run_cmd lxc-start -n c1 -d

Expand Down
7 changes: 7 additions & 0 deletions src/tests/lxc-test-usernic.in
Expand Up @@ -109,6 +109,13 @@ fi
mkdir -p /run/user/$(id -u usernic-user)
chown -R usernic-user: /run/user/$(id -u usernic-user) /home/usernic-user

# Copy the download template cache if available
run_cmd "mkdir -p /home/usernic-user/.cache/lxc"
[ -d /var/cache/lxc/download ] && \
cp -R /var/cache/lxc/download /home/usernic-user/.cache/lxc && \
chown -R usernic-user: /home/usernic-user/.cache/lxc


# Create two test bridges
brctl addbr usernic-br0
brctl addbr usernic-br1
Expand Down

0 comments on commit 43d8085

Please sign in to comment.