Add Bucket e2e tests
This commit is contained in:
parent
2ca47fb4ba
commit
7abb7ccf60
|
|
@ -29,6 +29,8 @@ jobs:
|
||||||
uses: fluxcd/pkg/actions/kustomize@master
|
uses: fluxcd/pkg/actions/kustomize@master
|
||||||
- name: Setup Kubebuilder
|
- name: Setup Kubebuilder
|
||||||
uses: fluxcd/pkg/actions/kubebuilder@master
|
uses: fluxcd/pkg/actions/kubebuilder@master
|
||||||
|
- name: Setup Helm
|
||||||
|
uses: fluxcd/pkg/actions/helm@master
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make test
|
run: make test
|
||||||
env:
|
env:
|
||||||
|
|
@ -64,6 +66,27 @@ jobs:
|
||||||
kubectl -n source-system wait helmchart/mariadb --for=condition=ready --timeout=5m
|
kubectl -n source-system wait helmchart/mariadb --for=condition=ready --timeout=5m
|
||||||
kubectl -n source-system wait helmchart/mariadb-git --for=condition=ready --timeout=5m
|
kubectl -n source-system wait helmchart/mariadb-git --for=condition=ready --timeout=5m
|
||||||
kubectl -n source-system delete -f ./config/testdata/helmchart-valuesfile
|
kubectl -n source-system delete -f ./config/testdata/helmchart-valuesfile
|
||||||
|
- name: Setup Minio
|
||||||
|
run: |
|
||||||
|
kubectl create ns minio
|
||||||
|
helm repo add minio https://helm.min.io/
|
||||||
|
helm upgrade --wait -i minio minio/minio \
|
||||||
|
--namespace minio \
|
||||||
|
--set accessKey=myaccesskey \
|
||||||
|
--set secretKey=mysecretkey \
|
||||||
|
--set resources.requests.memory=128Mi \
|
||||||
|
--set persistence.enable=false
|
||||||
|
kubectl -n minio port-forward svc/minio 9000:9000 &>/dev/null &
|
||||||
|
sleep 2
|
||||||
|
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||||
|
chmod +x mc
|
||||||
|
./mc alias set minio http://localhost:9000 myaccesskey mysecretkey --api S3v4
|
||||||
|
./mc mb minio/podinfo
|
||||||
|
./mc cp --recursive ./config/testdata/minio/manifests minio/podinfo
|
||||||
|
- name: Run S3 tests
|
||||||
|
run: |
|
||||||
|
kubectl -n source-system apply -f ./config/testdata/minio/source.yaml
|
||||||
|
kubectl -n source-system wait bucket/podinfo --for=condition=ready --timeout=1m
|
||||||
- name: Debug failure
|
- name: Debug failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -72,3 +95,4 @@ jobs:
|
||||||
kubectl -n source-system get helmcharts -oyaml
|
kubectl -n source-system get helmcharts -oyaml
|
||||||
kubectl -n source-system get all
|
kubectl -n source-system get all
|
||||||
kubectl -n source-system logs deploy/source-controller
|
kubectl -n source-system logs deploy/source-controller
|
||||||
|
kubectl -n minio get all
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,4 @@ roleRef:
|
||||||
subjects:
|
subjects:
|
||||||
- apiGroup: rbac.authorization.k8s.io
|
- apiGroup: rbac.authorization.k8s.io
|
||||||
kind: User
|
kind: User
|
||||||
name: gotk:web-team:reconciler
|
name: gotk:minio-test:reconciler
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ apiVersion: source.toolkit.fluxcd.io/v1alpha1
|
||||||
kind: Bucket
|
kind: Bucket
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
namespace: gitops-system
|
|
||||||
spec:
|
spec:
|
||||||
interval: 1m
|
interval: 1m
|
||||||
provider: generic
|
provider: generic
|
||||||
|
|
@ -17,7 +16,6 @@ apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: minio-credentials
|
name: minio-credentials
|
||||||
namespace: gitops-system
|
|
||||||
data:
|
data:
|
||||||
accesskey: bXlhY2Nlc3NrZXk=
|
accesskey: bXlhY2Nlc3NrZXk=
|
||||||
secretkey: bXlzZWNyZXRrZXk=
|
secretkey: bXlzZWNyZXRrZXk=
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue