Skip to content

Commit

Permalink
Remove yaml tests
Browse files Browse the repository at this point in the history
Prior to this commit, some of our examples tests were duplicated as yaml tests.
The main difference between the two tests was that in examples tests, the yaml
was applied via `kubectl create`, and in the yaml tests, the yaml was applied
via `ko create`. However, the yaml tests no longer include PipelineRuns that
use images built by Tekton, so they are redundant with the examples tests.

This commit removes yaml tests, speeding up e2e test execution.
  • Loading branch information
lbernick authored and tekton-robot committed Jul 4, 2023
1 parent 3a6b715 commit 20f19fc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 274 deletions.
19 changes: 0 additions & 19 deletions test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ limitations under the License.
package test

import (
"bytes"
"context"
"errors"
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -99,14 +97,6 @@ func substituteEnv(input []byte, namespace string) ([]byte, error) {
return output, nil
}

// koCreate wraps the ko binary and invokes `ko create` for input within
// namespace
func koCreate(input []byte, namespace string) ([]byte, error) {
cmd := exec.Command("ko", "create", "--platform", "linux/"+getTestArch(), "-f", "-", "--", "--namespace", namespace)
cmd.Stdin = bytes.NewReader(input)
return cmd.CombinedOutput()
}

// deleteClusterTask removes a single clustertask by name using provided
// clientset. Test state is used for logging. deleteClusterTask does not wait
// for the clustertask to be deleted, so it is still possible to have name
Expand Down Expand Up @@ -235,15 +225,6 @@ func TestExamples(t *testing.T) {
testYamls(t, "../examples", kubectlCreate, pf)
}

func TestYamls(t *testing.T) {
pf, err := getPathFilter(t)
if err != nil {
t.Fatal(err.Error())
return
}
testYamls(t, "./yamls", koCreate, pf)
}

func testYamls(t *testing.T, baseDir string, createFunc createFunc, filter pathFilter) {
t.Parallel()
for _, path := range getExamplePaths(t, baseDir, filter) {
Expand Down
103 changes: 0 additions & 103 deletions test/yamls/v1beta1/beta/pipelineruns/pipelinerun-with-final-tasks.yaml

This file was deleted.

152 changes: 0 additions & 152 deletions test/yamls/v1beta1/beta/pipelineruns/pipelinerun.yaml

This file was deleted.

0 comments on commit 20f19fc

Please sign in to comment.