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

Convert auto-generated repo-controller test to use gocheck #1996

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

pavannd1
Copy link
Contributor

@pavannd1 pavannd1 commented Apr 7, 2023

Change Overview

  • The auto-generated tests used BDD-style Go testing framework. This also led to some third-party modules being direct dependencies and causing issues in compilation of the tests.
  • Converted the test to use gocheck like the rest of Kanister and added support for running it in our environment.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
    Test compile before fix:
# github.com/onsi/gomega/internal
/cachevol/mod/github.com/onsi/gomega@v1.27.6/internal/polling_signal_error.go:19:33: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/gomega@v1.27.6/internal/polling_signal_error.go:40:14: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/gomega@v1.27.6/internal/polling_signal_error.go:56:65: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
# github.com/onsi/ginkgo/v2/internal/testingtproxy
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:15:31: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:17:52: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:158:83: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:162:93: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:166:82: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:170:42: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:173:58: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:176:44: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:179:56: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:182:75: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
/cachevol/mod/github.com/onsi/ginkgo/v2@v2.9.2/internal/testingtproxy/testing_t_proxy.go:182:75: too many errors
FAIL	./pkg/controllers/repositoryserver [build failed]

Test compile after fix:

ok  	./pkg/controllers/repositoryserver	0.001s

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Apr 7, 2023
@pavannd1 pavannd1 added kueue cleanup Code cleanup and refactor labels Apr 7, 2023
Copy link
Contributor

@ankitjain235 ankitjain235 left a comment

Choose a reason for hiding this comment

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

LGTM

Kanister automation moved this from In Progress to Reviewer approved Apr 7, 2023
@mergify mergify bot merged commit 94cd184 into master Apr 7, 2023
Kanister automation moved this from Reviewer approved to Done Apr 7, 2023
@mergify mergify bot deleted the use-gocheck-repoctrl-test branch April 7, 2023 03:32
Copy link
Contributor

@julio-lopez julio-lopez left a comment

Choose a reason for hiding this comment

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

🥇Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanup and refactor kueue
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants