Files
kubeshark/docs/TESTING.md
M. Mert Yıldıran 0eb7883a47 Rename the project to Kubeshark (#1226)
* Rename `mizu` to `kubeshark`

* Rename `up9inc` to `kubeshark`

* Change the logo, title, motto and the main color

* Replace the favicon

* Update the docs link

* Change the copyright text in C files

* Remove a comment

* Rewrite the `README.md` and update the logo and screenshots used in it

* Add a `TODO`

* Fix the grammar

* Fix the bottom text in the filtering guide

* Change the Docker Hub username of cross-compilation intermediate images

* Add an install script

* Fix `docker/login-action` in the CI

* Delete `build-custom-branch.yml` GitHub workflow

* Update `README.md`

* Remove `install.sh`

* Change the motto back to "Traffic viewer for Kubernetes"
2022-11-19 11:13:15 +03:00

1.5 KiB

Kubeshark: The API Traffic Viewer for Kubernetes

Testing guidelines

Generic guidelines

Unit tests

  • Position the test file inside the folder of the tested package
  • In case of internal func testing
    • Name the test file "<tested_file_name>_internal_test.go"
    • Name the test package same as the package being tested
    • Example - Config
  • In case of exported func testing
    • Name the test file "<tested_file_name>_test.go"
    • Name the test package "<tested_package>_test"
    • Example - Slice Utils
  • Make sure to run test coverage to make sure you covered all the cases and lines in the func

Acceptance tests

  • Position the test file inside the acceptance tests folder
  • Name the file "<tested_command>_test.go"
  • Name the package "acceptanceTests"
  • Do not run as part of the short tests
  • Use/Create generic test utils func in acceptanceTests/testsUtils
  • Don't use sleep inside the tests - active check
  • Running acceptance tests locally
    • Switch to the branch that is being tested
    • Run acceptanceTests/setup.sh
    • Run tests (make acceptance-test)
  • Example - Tap