Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Delete unused testdata directory, useless test, unused test methods#467

Merged
knative-prow-robot merged 4 commits intoknative:masterfrom
imjasonh:testdata
Nov 10, 2018
Merged

Delete unused testdata directory, useless test, unused test methods#467
knative-prow-robot merged 4 commits intoknative:masterfrom
imjasonh:testdata

Conversation

@imjasonh
Copy link
Copy Markdown
Contributor

Proposed Changes

  • Remove TestParsing from build_types_test.go which for-some-reason tested that a GCB build config could be (partially...?) parsed into a Build CRD. It only tested it with one of the testdata YAMLs anyway, and nobody cares about that feature.
  • Remove pkg/apis/build/v1alpha1/testdata/** which was unused except for that test ☝️
  • Remove pkg/buildtest/{data,yaml}.go which were unused except for that test ☝️
  • Remove pkg/buildtest/json.go which was just entirely unused.

After this change, the only thing in pkg/buildtest is wait.go which is only used by pkg/builder/cluster/builder_test.go, which will also be deleted in #464

Release Note

NONE

Copy link
Copy Markdown

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@imjasonh: 0 warnings.

Details

In response to this:

Proposed Changes

  • Remove TestParsing from build_types_test.go which for-some-reason tested that a GCB build config could be (partially...?) parsed into a Build CRD. It only tested it with one of the testdata YAMLs anyway, and nobody cares about that feature.
  • Remove pkg/apis/build/v1alpha1/testdata/** which was unused except for that test ☝️
  • Remove pkg/buildtest/{data,yaml}.go which were unused except for that test ☝️
  • Remove pkg/buildtest/json.go which was just entirely unused.

After this change, the only thing in pkg/buildtest is wait.go which is only used by pkg/builder/cluster/builder_test.go, which will also be deleted in #464

Release Note

NONE

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


// dataAs interprets the YAML contents of the file at the given path as the
// given type.
func dataAs(relpath string, obj interface{}) error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where is this function being used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops, nothing uses it anymore. Originally this PR was to move buildtest.DataAs into this test package, but then I realized we didn't need it at all, so we can just get rid of all of it! 🗑

Copy link
Copy Markdown
Contributor

@shashwathi shashwathi left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ImJasonH, shashwathi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [ImJasonH,shashwathi]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 95f246e into knative:master Nov 10, 2018
mgencur pushed a commit to mgencur/knative-build that referenced this pull request Nov 13, 2018
…native#467)

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

* update deps

* remove dataAs et al

* update deps
vdemeester pushed a commit to vdemeester/knative-build that referenced this pull request Apr 3, 2019
…native#467)

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

* update deps

* remove dataAs et al

* update deps
vdemeester pushed a commit to vdemeester/knative-build that referenced this pull request Apr 3, 2019
…native#467)

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

* update deps

* remove dataAs et al

* update deps
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants