Skip to content

Commit 3448312

Browse files
authored
Set up custom container registry and git server for image-updater e2e tests. (#1061)
Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
1 parent 205fe73 commit 3448312

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

test/e2e/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ git-container-build: copy-testdata
1010
git-container-push: git-container-build
1111
docker push $(IMAGE_SLUG)
1212

13+
remove-docker-images:
14+
docker rmi $$(docker images | grep $(IMAGE_REPO) | awk '{print $$3}')
15+
1316
copy-testdata:
1417
cp -r testdata containers/git
1518

@@ -21,6 +24,12 @@ install-prereqs:
2124
make git-container-push
2225
kubectl apply -n argocd-image-updater-e2e -f prereqs/repo/install.yaml
2326

27+
delete-prereqs:
28+
kubectl delete -n argocd-image-updater-e2e -f prereqs/repo/install.yaml
29+
kubectl delete -n argocd-image-updater-e2e -f prereqs/registry/registry.yaml
30+
kustomize build prereqs/argocd | kubectl -n argocd-image-updater-e2e delete -f -
31+
make remove-docker-images
32+
2433
.PHONY: git-container-build
2534
.PHONY: git-container-push
2635
.PHONY: copy-testdata

test/e2e/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ This directory contains the end-to-end tests for Argo CD Image Updater. The
44
tests are implemented using [kuttl](https://kuttl.dev) and require some
55
prerequisites.
66

7-
**This is work-in-progress at a very early stage**. The end-to-end tests are
8-
not yet expected to work flawlessly, and they require an opinionated setup to
9-
run. If you are going to use the end-to-end tests, it is expected that you are
10-
prepared to hack on them. Do not ask for support, please.
11-
127
# Components
138

149
The end-to-end tests are comprised of the following components:
@@ -45,3 +40,11 @@ The end-to-end tests are comprised of the following components:
4540

4641
1. Run `make install-prereqs` to install all the pre-requisites on your local
4742
cluster.
43+
44+
## Run the test suite
45+
46+
1. Run `./e2e-test.sh` to run all the tests located in `./suite`.
47+
48+
## Known issues
49+
50+
1. `./suite/004-multiple-images` is failing now.

test/e2e/bin/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BASE_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/.
88
sudo mkdir -p /etc/rancher/k3s
99
sudo mkdir -p /etc/docker
1010

11-
sudo cp ${BASE_DIR}/assets/registries.yaml /etc/rancher/k3s/registry.yaml
11+
sudo cp ${BASE_DIR}/assets/registries.yaml /etc/rancher/k3s/registries.yaml
1212
sudo cp ${BASE_DIR}/assets/registry.crt /etc/rancher/k3s/local.crt
1313
sudo cp ${BASE_DIR}/assets/daemon.json /etc/docker/daemon.json
1414

test/e2e/containers/git/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ main() {
3838

3939
initialize_services() {
4040
# Check permissions on $GIT_PROJECT_ROOT
41-
chown -R git:git $GIT_PROJECT_ROOT
41+
chown -R nginx:git $GIT_PROJECT_ROOT
4242
chmod -R 775 $GIT_PROJECT_ROOT
4343

4444
/usr/bin/spawn-fcgi \

0 commit comments

Comments
 (0)