Skip to content

Commit

Permalink
SRVKP-6191 new basic test for http resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
jayesh-garg committed Oct 22, 2024
1 parent 6e72a72 commit ef266c3
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
22 changes: 22 additions & 0 deletions specs/pipelines/http-resolvers.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PIPELINES-31
# http resolvers spec

Pre condition:
* Validate Operator should be installed
## Test the functionality of http resolvers: PIPELINES-31-TC01
Tags: e2e, sanity
Component: Resolvers
Level: Integration
Type: Functional
Importance: High

Steps:
* Verify ServiceAccount "pipeline" exist
* Create
|S.NO|resource_dir |
|----|-----------------------------------------------------------------|
|1 |testdata/resolvers/pipelineruns/http-resolver-pipelinerun.yaml |
* Verify pipelinerun
|S.NO|pipeline_run_name |status |check_label_propagation |
|----|-----------------------------------|--------------------------------------|
|1 |http-resolver-pipelinerun |successful |no |
5 changes: 3 additions & 2 deletions tc_spec_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"PIPELINES-25": "specs/pipelines/bundles-resolvers.spec",
"PIPELINES-26": "specs/results/results.spec",
"PIPELINES-27": "specs/chains/chains.spec",
"PIPELINES-28": "specs/operator/manual-approval-gate.spec"
}
"PIPELINES-28": "specs/operator/manual-approval-gate.spec",
"PIPELINES-31": "specs/pipelines/http-resolvers.spec"
}
12 changes: 12 additions & 0 deletions testdata/resolvers/pipelineruns/http-resolver-pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: http-resolver-pipelinerun
spec:
pipelineRef:
name: http-resolver-pipeline
params:
- name: url
value: "https://github.com/tektoncd/catalog"
- name: method
value: "GET"
11 changes: 11 additions & 0 deletions testdata/resolvers/pipelines/http-resolver-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: http-resolver-pipeline
spec:
tasks:
- name: resolve-http
taskRef:
resolver: http
params:
url: https://github.com/tektoncd/catalog
14 changes: 14 additions & 0 deletions testdata/resolvers/tasks/http-resolver-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: http-resolver-task
annotations:
tekton.dev/resolver: "http"
spec:
steps:
- name: http-request
image: curlimages/curl:latest
script: |
#!/bin/sh
echo "Making HTTP Request"
curl -X GET https://github.com/openshift-pipelines/release-tests

0 comments on commit ef266c3

Please sign in to comment.