Skip to content

[DX-3489] de-deuplicate http trigger regression logic#21582

Merged
Tofel merged 1 commit intodevelopfrom
dx-3489-fix-http-trigger-regression-test
Mar 18, 2026
Merged

[DX-3489] de-deuplicate http trigger regression logic#21582
Tofel merged 1 commit intodevelopfrom
dx-3489-fix-http-trigger-regression-test

Conversation

@Tofel
Copy link
Copy Markdown
Contributor

@Tofel Tofel commented Mar 18, 2026

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 18, 2026

✅ No conflicts with other open PRs targeting develop

mchain0
mchain0 previously approved these changes Mar 18, 2026
@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
4.44% Technical Debt Ratio on New Code (required ≤ 4%)

See analysis details on SonarQube

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: LOW

This PR reduces duplication in the CRE HTTP trigger regression tests by centralizing test-case identifiers into shared constants and by moving per-test authorized-key selection into the test table/config.

Changes:

  • Introduces TestCase* constants in http/config and updates call sites to use them instead of raw strings.
  • Adds keyToUse to the negative test table and wires it into the workflow config, removing inline “pick key by testcase” logic.
  • Updates the HTTP regression workflow to consistently use wfCfg.AuthorizedKey for relevant negative cases.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
system-tests/tests/regression/cre/v2_http_trigger_regression_test.go Refactors negative test setup to use constants + per-case keyToUse; adds mustDKGKey() helper.
system-tests/tests/regression/cre/http/main.go Switches to shared constants and reads public key from wfCfg.AuthorizedKey for negative cases.
system-tests/tests/regression/cre/http/config/config.go Adds exported constants for HTTP regression test cases.

Targeted review areas (scrupulous human review):

  • mustDKGKey() + its package-level invocation from httpNegativeTests (init-time behavior and failure mode).
  • Verify the expected error substrings in v2_http_trigger_regression_test.go still match the actual failure strings emitted by the engine/gateway for each testcase.

Reviewer recommendations (per CODEOWNERS):

  • @smartcontractkit/foundations, @smartcontractkit/core (repo root CODEOWNERS; no more specific owner entry for system-tests/)

You can also share your feedback on Copilot code review. Take the survey.

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Mar 18, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@Tofel Tofel closed this Mar 18, 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.

4 participants