Migrate Kusto test utilities and integration helpers off legacy kusto client
- Dominant language
- Go
- Stars
- 28
- Forks
- 17
- Avg merge
- 11h 40m
- Merged PRs (30d)
- 42
Description
## Context
Several test utilities and integration helpers still use the legacy root `github.com/Azure/azure-kusto-go/kusto` client. These are not the main production dependency drivers, but they will keep legacy imports around after production paths migrate.
## Files
- `pkg/testutils/kql_verify.go`
- `pkg/testutils/integration_test.go`
- `pkg/testutils/kustainer/kustainer.go`
## Current legacy usage
- Creates Kusto clients against kustainer/local ADX with `kusto.NewConnectionStringBuilder` and `kusto.New`.
- Executes management commands and queries with `client.Mgmt` / `client.Query`.
- Builds statements with legacy `kusto/kql`.
- Reads results with `NextRowOrError` and `ToStruct`.
## Helper behaviors to preserve
- Verify table existence.
- Verify function existence and retrieve function metadata.
- Verify table row counts.
- Verify table schemas via `getschema`.
- Create volatile databases in kustainer.
- Alter ingestion batching policy.
- Query integration-test health metrics.
## Acceptance criteria
- Test utility packages no longer import `github.com/Azure/azure-kusto-go/kusto...` packages.
- Existing integration helper behavior remains available for tests.
- Kustainer/local endpoint support remains working.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pkg/testutils/kql_verify.go, pkg/testutils/integration_test.go, and pkg/testutils/kustainer/kustainer.go, then trace the replacement Kusto client used by migrated production paths. Run the integration tests and verify that legacy imports are gone while table, function, schema, row-count, kustainer, batching-policy, and health-metric helpers still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100