Skip to content

test(branches): fix live environment-list cases for dev11 (DX-31568) - #196

Merged
cs-raj merged 1 commit into
epic/DX-31560-branch-create-environmentsfrom
claude/test/DX-31568-py-live-branch-envs
Oct 28, 2026
Merged

cs-raj merged 1 commit into
epic/DX-31560-branch-create-environmentsfrom
claude/test/DX-31568-py-live-branch-envs

Conversation

@cs-raj

@cs-raj cs-raj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

QA story DX-31568 · Epic DX-31560. This PR changes test code only.

Why

On dev11, TestBranchEnvironmentList on the epic branch fails or skips for three reasons:

  • generate_valid_uid("branch_env") gives a 16-character uid, and the API rejects it: "should have a maximum length of 15 character(s)".
  • When you fetch a branch that does not exist, the API returns 422 (error_code 905), not 404.
  • Run on its own, the class skips because the stack has no environments.

The SDK itself behaves correctly.

What

  • Uids use a shorter prefix.
  • A rejected create's fetch is compared with the response for a nonexistent branch (TC-16, TC-17).
  • A class fixture creates three environments, so a list of two is a strict subset (TC-13). The fixture deletes them afterwards.
  • Added cases for one name, for no list (TC-15: the read-back has no publish_config) and for a real name in another case.
  • Every created branch is deleted.

Verified

pytest tests/integration/api/test_18_branch.py against dev11: 12 passed.


Generated by Claude Code

The live cases added for publish_config.environments failed on dev11:
generate_valid_uid("branch_env") gives 16 characters (the API caps branch
uids at 15), and a fetch of a branch that does not exist returns 422
(error_code 905), not 404. Use a shorter prefix and compare a rejected
create's fetch with the response for a nonexistent branch (TC-16/TC-17).

Also, per the test cases page: create three class environments so two is
a strict subset (TC-13), add the one-name, no-list (TC-15) and
case-variant cases, and delete every branch and environment created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XifDUYYvn7GfSpLcKarg5S
@cs-raj
cs-raj requested a review from a team as a code owner October 28, 2026 13:27
@snyk-io

snyk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@cs-raj
cs-raj merged commit 68736ad into epic/DX-31560-branch-create-environments Oct 28, 2026
9 checks passed
@cs-raj
cs-raj deleted the claude/test/DX-31568-py-live-branch-envs branch October 28, 2026 14:38
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.

2 participants