Skip to content

Commit

Permalink
Test mounting an nfs share
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Feb 14, 2024
1 parent 0f8360f commit ab58cce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions test/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ if command -v ping >/dev/null 2>&1; then
ping -c 1 -M "do" -s 1472 "$(head -1 /etc/resolv.conf | awk '{print $2}')"
fi

# test mounting nfs shares
# if this share goes away, just delete this test, no one will miss it
case $(id -u) in
0)
mkdir -p /mnt/nfs
mount -t nfs nfs.product-os.io:/ /mnt/nfs -o fsc
;;
*)
;;
esac

if command -v curl >/dev/null 2>&1; then
curl -fsSL https://raw.githubusercontent.com/dylanaraps/neofetch/7.1.0/neofetch | bash
fi
Expand Down
4 changes: 2 additions & 2 deletions test/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ubuntu | debian)

# install packages required by healthchecks
apt-get update
apt-get install -y ca-certificates cpu-checker curl gnupg iproute2 iptables iputils-ping kmod util-linux
apt-get install -y ca-certificates cpu-checker curl gnupg iproute2 iptables iputils-ping kmod util-linux nfs-common

# Add Docker's official GPG key
install -m 0755 -d /etc/apt/keyrings
Expand Down Expand Up @@ -53,7 +53,7 @@ ubuntu | debian)
;;
alpine)
# install packages required by healthchecks
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping kmod lsblk util-linux
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping kmod lsblk util-linux nfs-common

# create nonroot user for healthchecks
adduser --disabled-password --gecos "" nonroot
Expand Down

0 comments on commit ab58cce

Please sign in to comment.