Skip to content

One of the examples uses generateName and test script uses kubectl apply #1397

@afrittoli

Description

@afrittoli

Expected Behavior

We should either switch to kubectl create in the test script, or never use generatedName in the examples. kubectl apply fails in no name is specified.

Actual Behavior

Example failure:

I1008 11:21:13.361] =============================================
I1008 11:21:13.362] ==== RUNNING YAML E2E TESTS FOR TASKRUNS ====
I1008 11:21:13.362] =============================================
I1008 11:21:13.362] >> Starting tests for the resource taskrun
I1008 11:21:13.362] >> Creating resources taskrun
I1008 11:21:13.758] error: error when retrieving current configuration of:
I1008 11:21:13.759] Resource: "tekton.dev/v1alpha1, Resource=taskruns", GroupVersionKind: "tekton.dev/v1alpha1, Kind=TaskRun"
I1008 11:21:13.759] Name: "", Namespace: "default"
I1008 11:21:13.759] Object: &{map["apiVersion":"tekton.dev/v1alpha1" "kind":"TaskRun" "metadata":map["annotations":map["kubectl.kubernetes.io/last-applied-configuration":""] "generateName":"build-gcs-targz-" "namespace":"default"] "spec":map["inputs":map["resources":[map["name":"source" "resourceSpec":map["params":[map["name":"location" "value":"gs://build-crd-tests/archive.tar.gz"] map["name":"artifactType" "value":"TarGzArchive"] map["name":"type" "value":"build-gcs"]] "type":"storage"]]]] "taskSpec":map["inputs":map["resources":[map["name":"source" "type":"storage"]]] "steps":[map["command":["cat" "source/file.txt"] "image":"ubuntu"]]]]]}
I1008 11:21:13.760] from server for: "STDIN": resource name may not be empty
I1008 11:21:13.769] 2019/10/08 11:21:13 error executing 'kubectl apply': exit status 1
I1008 11:21:13.772] >> Waiting for tests to finish for taskrun
I1008 11:21:14.151] >> Checking test results for taskrun
I1008 11:21:14.599] >> All YAML tests passed

The failure is not detected because of #1396

Steps to Reproduce the Problem

Additional Info

Metadata

Metadata

Assignees

Labels

area/test-infraIssues or PRs related to the testing infrastructurearea/testingIssues or PRs related to testingpriority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions