test: add coverage for preflight, k8s, gateway (#26)#30
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Closes #26.