nginx-gateway-fabric icon indicating copy to clipboard operation
nginx-gateway-fabric copied to clipboard

SPIKE: Investigate replacing ginkgo with go test

Open kate-osborn opened this issue 1 year ago • 0 comments
trafficstars

We write our unit tests using both ginkgo and go test, and we run all the unit tests using the ginkgo binary. We believe that using ginkgo to run both types of tests makes test failures challenging to see and debug. See https://github.com/nginxinc/nginx-gateway-fabric/issues/2584 for more details.

We reached out to ginkgo, and they recommended that we switch to using ginkgo or go test for all our tests. Ginkgo does not support running both types, especially when run in parallel.

Most of our tests are written with go test, but some of our most important and complex tests are written with ginkgo. See change processor tests for an example. Ginkgo was initially developed 10 years ago because go test lacked a rich feature set. Since then, many features have been added to go test that may make ginkgo unnecessary.

This spike is to determine the following:

  • Which ginkgo features is NGF leveraging today?
  • Are these features available in go test? Or can we import an additional testing library that can provide these features?
  • How big of an effort would it be to rewrite our ginkgo tests as go tests?

Note: this spike only applies to our unit tests.

kate-osborn avatar Sep 26 '24 16:09 kate-osborn