Skip to content

Commit 5dddb56

Browse files
authored
Merge pull request #1 from josunect/increase_test_coverage
Increase test coverage
2 parents ccdc2e8 + 95be1e6 commit 5dddb56

2 files changed

Lines changed: 325 additions & 61 deletions

File tree

pkg/kiali/tests/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Contract tests ensure that:
1616

1717
## Prerequisites
1818

19-
- A running Kiali instance (with bookinfo demo app deployed)
19+
- A running Kiali instance
2020
- Go 1.24 or later
2121

2222
## Configuration
@@ -31,6 +31,9 @@ Tests are configured via environment variables:
3131

3232
- `KIALI_TOKEN` - Bearer token for authentication (if required)
3333
- `TEST_NAMESPACE` - Namespace to use for tests (default: `bookinfo`)
34+
- `TEST_SERVICE` - Service name used by metrics and tracing tests (default: `productpage`)
35+
- `TEST_WORKLOAD` - Workload name used by logs and pod performance tests (default: `productpage-v1`)
36+
- `TEST_TRACE_ID` - Optional known trace ID for `get_trace_details`; useful when the test environment does not guarantee fresh traces for `TEST_SERVICE`
3437

3538
## Running Tests
3639

@@ -53,6 +56,7 @@ Tests are organized using the `testify/suite` pattern:
5356

5457
- **ContractTestSuite** - Main test suite that POSTs to each `/api/chat/mcp/<tool>` endpoint
5558
- Each test method validates a specific MCP tool endpoint using the constants from `pkg/toolsets/kiali/tools/endpoints.go`
59+
- Resource-specific tests are driven by `TEST_NAMESPACE`, `TEST_SERVICE`, `TEST_WORKLOAD`, and optionally `TEST_TRACE_ID` so CI can target its own fixture data
5660

5761
### Endpoint Coverage
5862

0 commit comments

Comments
 (0)