Skip to content

Commit

Permalink
test(e2e): define all endpoint types in test config
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Braun <rainbowstack@gmail.com>
  • Loading branch information
bluebrown committed Oct 22, 2023
1 parent 1e1e8b2 commit d413b98
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ e2e-up: bin/kind bin/kubectl bin/kustomize ## Spin up the local e2e setup
bash e2e/up.sh

.PHONY: e2e-down
e2e-down: bin/kind bin/kubectl bin/kustomize ## Tear down the local e22 setup
e2e-down: bin/kind bin/kubectl bin/kustomize ## Tear down the local e2e setup
bash e2e/down.sh


Expand Down
24 changes: 18 additions & 6 deletions e2e/kobold/etc/config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
version: v1

endpoints:
- name: test-endpoint
- name: acr
type: acr
path: /events/acr
- name: distribution
type: distribution
path: /events/distribution
- name: dockerhub
type: dockerhub
path: /events/dockerhub
- name: generic
type: generic
path: /generic
path: /events/generic

repositories:
- name: test-gitea
- name: kobold-test
url: http://gitea.local:3000/kobold/kobold-test.git
username: ${GITEA_USER}
password: ${GITEA_PASS}

subscriptions:
- name: test-sub
- name: e2e
endpointRefs:
- name: test-endpoint
- name: acr
- name: dockerhub
- name: distribution
- name: generic
repositoryRef:
name: test-gitea
name: kobold-test
branch: main
strategy: commit
scopes: []
2 changes: 1 addition & 1 deletion e2e/testdata/events/acr.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST /acr HTTP/1.1
POST /events/acr HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Authorization: test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST /acr HTTP/1.1
POST /events/distribution HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Authorization: test
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/events/dockerhub.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST /dockerhub HTTP/1.1
POST /events/dockerhub HTTP/1.1
Host: localhost:8080
Content-Type: application/json

Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/events/generic.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST /generic HTTP/1.1
POST /events/generic HTTP/1.1
Host: localhost:8080
Content-Type: text/plain

Expand Down

0 comments on commit d413b98

Please sign in to comment.