Running Tests for Stefanprodan/Timoni

This guide provides a step-by-step process for running tests for the Stefanprodan/Timoni project.

Prerequisites

Running Tests

The project utilizes make to automate the testing process. Here’s how to run different types of tests:

1. Running Unit Tests:

make test

This command will execute all unit tests within the project.

2. Running Integration Tests:

make envtest

This command will:

  • Build the project using the envtest profile, which includes the necessary dependencies for integration testing.
  • Run the integration tests.

3. Running CUE Tests:

make cue-vet

This command will execute CUE validation tests.

4. Running Code Linting:

make vet

This command runs Go vet to identify potential code issues.

5. Running All Tests:

make all

This command will execute all the tests mentioned above.

Understanding the Makefile

The Makefile defines various targets for running different tasks, including testing:

  • test: Executes unit tests.
  • envtest: Builds the project using the envtest profile and runs integration tests.
  • cue-vet: Executes CUE validation tests.
  • vet: Runs Go vet for code linting.
  • all: Runs all tests.

Note: The Makefile provides more detailed information on other available targets. Run make help to display the full list of available functions.