Skip to content

Test/add bats suite and ci#5

Merged
finalerock44 merged 3 commits into
mainfrom
test/add-bats-suite-and-ci
Jun 12, 2026
Merged

Test/add bats suite and ci#5
finalerock44 merged 3 commits into
mainfrom
test/add-bats-suite-and-ci

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

No description provided.

The step had no automated tests (bitrise.yml's "test" workflow only echoes).
Add a BATS suite mirroring the Bitbucket pipe's pattern, stubbing `npx`
(cloud/status) and `envman` so it runs offline. step.sh is executed under
`bash` to match Bitrise's `toolkit: bash` (the #!/bin/sh shebang is unused by
Bitrise). A GitHub Actions workflow runs the suite on push/PR, plus an
advisory shellcheck (as bash).

12 tests cover command composition (apiKey + positional args, package/version
selection, device/value flags, boolean flags, env_list/metadata splitting),
the console URL output, and exit-code propagation from the cloud command.

2 tests are skipped to document a real bug the suite surfaced: step.sh greps
COMPACT-JSON patterns ('"status":"..."') against `dcd status --json`, which is
pretty-printed (JSON.stringify(obj, null, 2)). The patterns never match, so
DEVICE_CLOUD_UPLOAD_STATUS / FLOW_RESULTS are emitted empty and
APP_BINARY_ID is omitted. Exit codes are unaffected (driven by the cloud
command's own exit code). Unskip once the parser handles the real output.
@finalerock44 finalerock44 self-assigned this Jun 12, 2026
@finalerock44 finalerock44 merged commit 2a617b8 into main Jun 12, 2026
4 checks passed
@finalerock44 finalerock44 deleted the test/add-bats-suite-and-ci branch June 12, 2026 12:06
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.

1 participant