Skip to content

Commit

Permalink
Delete unused testdata directory, useless test, unused test methods (k…
Browse files Browse the repository at this point in the history
…native#467)

* Remove unused testdata directory, useless test, unused test methods

* update deps

* remove dataAs et al

* update deps
  • Loading branch information
imjasonh authored and knative-prow-robot committed Nov 10, 2018
1 parent e97a217 commit 95f246e
Show file tree
Hide file tree
Showing 55 changed files with 0 additions and 10,495 deletions.
9 changes: 0 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 0 additions & 24 deletions pkg/apis/build/v1alpha1/build_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,16 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/knative/pkg/apis"

"github.com/knative/build/pkg/buildtest"
"github.com/knative/pkg/apis/duck"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
)

const bazelYAML = "testdata/cloudbuilders/bazel/cloudbuild.yaml"

func TestBuildImplementsConditions(t *testing.T) {
if err := duck.VerifyType(&Build{}, &duckv1alpha1.Conditions{}); err != nil {
t.Errorf("Expect Build to implement duck verify type: err %#v", err)
}
}

func TestParsing(t *testing.T) {
var bs BuildSpec
if err := buildtest.DataAs(bazelYAML, &bs); err != nil {
t.Fatalf("Unexpected error in buildtest.DataAs(%q, BuildSpec): %v", bazelYAML, err)
}

// Some basic checks on the body.
if bs.Source != nil {
t.Errorf("want no Source; got %v", bs.Source)
}
if len(bs.Steps) != 5 {
t.Errorf("Wrong len(bs.Steps); wanted 5, got %d", len(bs.Steps))
}
for _, step := range bs.Steps {
if len(step.Args) == 0 {
t.Error("want len(args) != 0, got 0")
}
}
}

func TestBuildConditions(t *testing.T) {
b := &Build{}
foo := &duckv1alpha1.Condition{
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/build/v1alpha1/testdata/cloudbuilders/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

39 changes: 0 additions & 39 deletions pkg/apis/build/v1alpha1/testdata/cloudbuilders/git/cloudbuild.yaml

This file was deleted.

Loading

0 comments on commit 95f246e

Please sign in to comment.