Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] SRVKP-6191 new basic test for http resolver #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test it? This will fail because pipeline doesn't exist

* 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipeline doesn't have any params

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not work

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this good for? You are not using HTTP resolver anywhere 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this task is not used at all

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