Add e2e tests

pull/100/head
Darren Shepherd 6 years ago
parent 10f1553564
commit d6c5f6b995

@ -0,0 +1,6 @@
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y curl
RUN curl -sfL https://github.com/heptio/sonobuoy/releases/download/v0.13.0/sonobuoy_0.13.0_linux_amd64.tar.gz | tar xvzf - -C /usr/bin
COPY run-test.sh /usr/bin
CMD ["/usr/bin/run-test.sh"]

@ -0,0 +1,31 @@
version: '3'
services:
server:
image: rancher/k3s:v0.1.0-rc8
command: server
environment:
- K3S_CLUSTER_SECRET=somethingtotallyrandom
volumes:
- config:/etc/rancher/k3s
tmpfs:
- /run
- /var/run
privileged: true
node:
image: rancher/k3s:v0.1.0-rc8
tmpfs:
- /run
- /var/run
privileged: true
environment:
- K3S_URL=https://server:6443
- K3S_CLUSTER_SECRET=somethingtotallyrandom
sonobuoy:
build: .
volumes:
- config:/etc/rancher/k3s
volumes:
config: {}

@ -0,0 +1,16 @@
#!/bin/bash
set -e -x
while [ ! -e /etc/rancher/k3s/k3s.yaml ]; do
echo waiting for config
sleep 1
done
mkdir -p /root/.kube
sed 's/localhost/server/g' /etc/rancher/k3s/k3s.yaml > /root/.kube/config
export KUBECONFIG=/root/.kube/config
cat /etc/rancher/k3s/k3s.yaml
cat $KUBECONFIG
sonobuoy run
sleep 15
sonobuoy logs -f
Loading…
Cancel
Save