Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

E2E tests

E2E tests #28

Workflow file for this run

name: E2E tests
on:
pull_request:
push:
branches:
- master
env:
GO_VERSION: '1.19.3'
KIND_VERSION: 'v0.17.0'
KIND_NODE_VERSION: 'v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61'
KUBECTL_VERSION: 'v1.24.1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
- name: Run e2e tests
run: make test-e2e
basic_flow:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: "${{ env.KIND_VERSION }}"
image: "kindest/node:${{ env.KIND_NODE_VERSION }}"
- name: Checkout code
uses: actions/checkout@v3
- name: Build controller image
run: |
make docker-build IMG='controller:local'
- name: Build e2e fluentd image
run: |
make docker-build-e2e-fluentd IMG='fluentd:local'
- name: Create logging namespace
run: |
kubectl create namespace logging
- name: Start Minio
run: |
kubectl create -f hack/minio.yaml
kubectl wait --namespace logging --for=condition=available deployment/minio-deployment --timeout=120s
minio="$(kubectl get pod --namespace logging -l app=minio -o 'jsonpath={.items[0].metadata.name}')"
kubectl wait --namespace logging --for=condition=Ready pod "${minio}" --timeout=120s
- name: Setup minio cli
run: |
kubectl create -f hack/minio-mc.yaml
kubectl wait --namespace logging --for=condition=available deployment/minio-mc-deployment --timeout=120s
mc_pod="$(kubectl get pod --namespace logging -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
kubectl wait --namespace logging --for=condition=Ready pod "${mc_pod}" --timeout=120s
kubectl exec --namespace logging "${mc_pod}" -- \
mc config host add minio \
'http://minio-service.logging.svc.cluster.local:9000' \
'minio_access_key' \
'minio_secret_key'
- name: Run test
run: |
hack/test.sh