Skip to content

SRE-2745 Account for Additional Error Cases#12

Merged
jadabyte256 merged 1 commit into0.3.0-rcfrom
SRE-2745-account-for-additional-error-ca
Nov 5, 2025
Merged

SRE-2745 Account for Additional Error Cases#12
jadabyte256 merged 1 commit into0.3.0-rcfrom
SRE-2745-account-for-additional-error-ca

Conversation

@jadabyte256
Copy link
Contributor

@jadabyte256 jadabyte256 commented Oct 29, 2025

Closes https://snapsheettech.atlassian.net/browse/SRE-2745

What

Adds additional test coverage to the cdktf-diff code.

Why

Reduces the likelihood of unintended side effects due to code changes.

How

Added two new tests to account for:

  • When the stub_output_file option is passed, it creates a file instead of running cdktf commands.
  • Unable to find the workflow run.

Testing

Verify jest tests pass in the NPM Test Coverage / npm_test action or pull this branch down locally and run the entire test suite.

Verify tests exist for the following test case:

  • Unable to find the workflow run.
  • Unable to find how the node version is specified (file?).
  • When the stub_output_file option is passed, it creates a file instead of running cdktf commands.
  • Verify that the command string has changed and doesn’t run cdktf diff.
  • When the skip_synth option is passed, it adds that to the options for the cdktf command.
  • Verify it adds --skip-synth to the command.
  • Unable to find the job ID for the current job
  • Fetching the job ID from GitHub API results in multiple pages, with the desired job ID coming on a later page.
  • When a run of cdktf diff fails.
  • When there are no changes for a plan.
  • If a plan results in pending changes.
  • If we were unable to determine if a diff ran successfully.
  • The output written to file matches the expected format.

@jadabyte256 jadabyte256 changed the base branch from main to 0.3.0-rc October 29, 2025 22:17
@jadabyte256
Copy link
Contributor Author

jadabyte256 commented Oct 30, 2025

The Jira story says:

...make any updates to ensure behavior is correct.

Outline the expected cases for behavior in the appropriate sections of the README

No updates were made to functionality, will leave README as is.

@jadabyte256 jadabyte256 marked this pull request as ready for review October 30, 2025 15:11
@jadabyte256 jadabyte256 requested a review from d10zero October 30, 2025 15:11
Copy link
Contributor

@d10zero d10zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks like most of the tests that were mentioned in the story already existed, and you added the 2 that were missing. Good job 👍

@jadabyte256 jadabyte256 merged commit c6315f8 into 0.3.0-rc Nov 5, 2025
1 check passed
@jadabyte256 jadabyte256 deleted the SRE-2745-account-for-additional-error-ca branch November 5, 2025 19:38
jadabyte256 added a commit that referenced this pull request Mar 3, 2026
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.

3 participants