acc: cover cmd alerts/clusters/secrets/storage-credentials locally - #6236
Merged
Conversation
Add local acceptance tests for the input validation in `clusters create` and `alerts-legacy create`, and for the `clusters list` output, then drop the integration tests that covered them. The validation errors are raised before any request is made, so these run locally only. `clusters list` renders against the testserver's canned cluster list, which covers the whole list command. Co-authored-by: Isaac
Add local acceptance tests for `secrets put-secret` (both --string-value and --bytes-value, read back with get-secret and checked on the wire) and for `storage-credentials list`, then drop the integration tests. The runtime read-back the integration tests did via dbutils.secrets.get and getBytes is observable locally: the testserver stores the secret and base64-encodes it on GET like the real API does, and the recorded request shows the CLI base64-encoding --bytes-value before sending it. Two testserver gaps this needed: - SecretsPut ignored bytes_value, so byte secrets read back empty. - storage-credentials had no handler at all. Co-authored-by: Isaac
Git Bash re-encodes non-UTF-8 argv bytes as UTF-8, so the payload the CLI sent differed on Windows. Control bytes are non-printable and survive the shell unchanged everywhere; they also match the value the deleted integration test used. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: a35fc5c
9 interesting tests: 4 RECOVERED, 4 SKIP, 1 flaky
Top 14 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Aug 11, 2026
Collaborator
Integration test reportCommit: 9bd32f8
81 interesting tests: 43 flaky, 30 FAIL, 5 RECOVERED, 2 SKIP, 1 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
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.
Move the remaining
cmd/{alerts,clusters,secrets,storage_credentials}integration tests to local acceptance tests. All four directories are now gone.Previous PRs in this series: #6113, #6140, #6223
Why
None of these needed a workspace:
clusters create/alerts-legacy createreject their input before issuing any request.clusters listandstorage-credentials listonly render a list response.put-secretbase64-encodes--bytes-valueclient-side; the value is then observable throughget-secretand in the recorded request.The integration tests read the secret back by running
dbutils.secrets.get/getByteson a real cluster. That is observable locally: the testserver stores the secret and base64-encodes it on GET like the real API does, soget-secretreturnsAQL+/w==for the bytes\x01\x02\xfe\xff, andprint_requests.pyshows the CLI sentbytes_value: "AQL+/w==".Verified per-test that acceptance did not reach these blocks before and does now:
Testserver changes
Two gaps this surfaced, fixed in
libs/testserverrather than stubbed per-test:SecretsPutonly readstring_value, so a secret written with--bytes-valueread back empty.storage-credentialshad no handler at all.Full acceptance suite passes.
Dropped assertion
TestClustersListalso regex-matched a real cluster id (0000-000000-xxxxxxxx) in the output. That asserts the test workspace has a cluster rather than what the CLI renders, and the fake ids (4321,9876) are relied on bybundle/variables/env_overridesandvariable_overrides_in_target, so they are left alone.