Skip to content

test: add coverage for preflight, k8s, gateway (#26)#30

Merged
robbycochran merged 2 commits into
mainfrom
rc-fixup2
Jun 5, 2026
Merged

test: add coverage for preflight, k8s, gateway (#26)#30
robbycochran merged 2 commits into
mainfrom
rc-fixup2

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

35 new tests covering previously untested pure-logic code. Total: 116 tests (was 83).

New tests

Preflight (22 tests): LoadProviders, LoadConfig, EnabledProviders, MaskValue, FileMetadata (ADC/GWS/non-JSON), CheckInput (env/file/check kinds), CheckProvider

K8s (8 tests): retry exhaustion, RunKubectlQuiet, GetSecretField (valid/invalid/empty base64), NamespaceExists, DefaultNamespace

Gateway CLI (5 tests): ProviderCreate, InferenceSet, GatewayAdd arg construction, GatewayRemove, ProviderProfileDelete

Test results

Path Result
Go unit tests 80/80
Launcher tests 7/7
Bats (both) 29/29
bash + podman 19/19
Go + podman 19/19

Closes #26.

robbycochran and others added 2 commits June 5, 2026 00:55
22 new preflight tests: LoadProviders (valid/missing/invalid TOML),
LoadConfig (valid/missing, chart version), EnabledProviders (with/
without config), MaskValue (5 cases), FileMetadata (ADC/GWS/non-JSON/
missing), CheckInput (env set/missing/secret, file exists/missing,
check pass/fail), CheckProvider (all pass/some fail).

8 new k8s tests: retry exhaustion (3 attempts then error),
RunKubectlQuiet output discarded, GetSecretField (valid base64/
invalid/empty), NamespaceExists, DefaultNamespace with/without env.

5 new gateway CLI tests: ProviderCreate arg construction (--from-gcloud-adc,
--credential, --config), InferenceSet args, GatewayAdd args (--local),
GatewayRemove, ProviderProfileDelete.

Total: 80 Go harness + 7 launcher + 29 bats = 116 tests.

Validated: all unit tests, bats 29+29, podman 19+19.

Closes #26.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robbycochran robbycochran merged commit 441c57f into main Jun 5, 2026
@robbycochran robbycochran deleted the rc-fixup2 branch June 13, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add coverage for pure-logic packages (preflight, status, k8s edge cases)

1 participant