kubeshark/docs/TESTING.md

1019 B

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