Skip to content

Commit

Permalink
test forward update
Browse files Browse the repository at this point in the history
  • Loading branch information
avinal committed Jun 14, 2023
1 parent 7cd5dae commit 2983b08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .tekton/pipeline-service-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- name: target_branch
value: "{{ target_branch }}"
- name: results_url
value: "https://github.com/openshift-pipelines/tektoncd-results"
value: "https://github.com/avinal/tektoncd-results"
timeouts:
pipeline: "1h0m0s"
workspaces:
Expand Down
21 changes: 5 additions & 16 deletions .tekton/tasks/tekton-results-upstream-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,14 @@ spec:
mkdir -p ${SA_TOKEN_PATH} ${SSL_CERT_PATH}
kubectl get secrets tekton-results-tls -n tekton-results --template='{{index .data "tls.crt"}}' | base64 -d > ${SSL_CERT_PATH}/tekton-results-cert.pem
kubectl get secrets tekton-results-tls -n tekton-results --template='{{index .data "tls.key"}}' | base64 -d > ${SSL_CERT_PATH}/tekton-results-key.pem
oc annotate ingresses.config/cluster ingress.operator.openshift.io/default-enable-http2=true
kubectl apply -f ./test/e2e/kustomize/rbac.yaml
service_accounts=(all-namespaces-read-access single-namespace-read-access)
for service_account in "${service_accounts[@]}"; do
kubectl create token "$service_account" > "${SA_TOKEN_PATH}"/"$service_account"
done
RESULT_ROUTE=$(kubectl get route tekton-results -n tekton-results --template='{{.spec.host}}')
cat <<EOF > patch-test-config.patch
diff --git a/test/e2e/grpc_client.go b/test/e2e/grpc_client.go
--- a/test/e2e/grpc_client.go
+++ b/test/e2e/grpc_client.go
@@ -36,4 +36,4 @@ const (
certFile = "tekton-results-cert.pem"
- apiServerName = "tekton-results-api-service.tekton-pipelines.svc.cluster.local"
- apiServerAddress = "localhost:50051"
+ apiServerName = "tekton-results-api-service.tekton-results.svc.cluster.local"
+ apiServerAddress = "$RESULT_ROUTE"
defCertFolder = "/tmp/tekton-results/ssl"
EOF
git apply patch-test-config.patch
export API_SERVER_NAME="tekton-results-api-service.tekton-results.svc.cluster.local"
export API_SERVER_ADDR="https://$(kubectl get route tekton-results -n tekton-results --template='{{.spec.host}}'):443"
echo $API_SERVER_ADDR
export CGO_ENABLED=0
go test -v -count=1 --tags=e2e ./test/e2e/...
go test -v -count=1 --tags=e2e $(go list --tags=e2e ./test/e2e/... | grep -v /client)

0 comments on commit 2983b08

Please sign in to comment.