Skip to content

test(e2e): federation IaC formats end-to-end test script#88

Closed
cristim wants to merge 1 commit into
feat/multicloud-web-frontendfrom
test/e2e-federation-script
Closed

test(e2e): federation IaC formats end-to-end test script#88
cristim wants to merge 1 commit into
feat/multicloud-web-frontendfrom
test/e2e-federation-script

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented Apr 25, 2026

Summary

Adds scripts/e2e-federation-test.sh — an end-to-end test that exercises every supported federation format × cloud provider combination against a deployed CUDly stack:

  • AWS cross-account: CLI, Terraform, CloudFormation
  • Azure WIF: CLI, Terraform, Bicep, ARM
  • GCP WIF: CLI, Terraform

Each cycle: download bundle → deploy → auto-register → approve → /test → cleanup. Catches federation regressions that unit tests can't, since the credential resolution, bundle generation, and /test path only converge at deploy time.

Why now

Recent federation work (#67 fail-loud guards, #74 Logic App KV migration, the Azure target-source consistency thread) modified the bundle generation and the /test path multiple times. Manual smoke testing across the full format matrix takes ~30 min; this script reduces that to one command.

Safety

  • No secrets in the script. All tokens come from env vars (CUDLY_TOKEN, CUDLY_CSRF) or AWS Secrets Manager at runtime.
  • Defaults (CUDLY_HOST_PROFILE, CUDLY_LAMBDA_NAME, CUDLY_ADMIN_EMAIL, GCP_PROJECT) are env-overridable for non-default deployments.
  • --no-cleanup flag preserves deployed state on failure for inspection.

Out of scope

  • Not wired into CI yet — needs three live cloud accounts (AWS personal, Azure subscription, GCP project) with AD admin / project-owner rights to provision the federation targets. A future PR could shape this into a nightly job once a sandbox target is provisioned.
  • Doesn't test the IAM-policy-only paths (account creation without federation), or the deployment-time apply/destroy cycle for Bicep/ARM.

Test plan

  • Script lints clean: bash -n scripts/e2e-federation-test.sh exits 0
  • No hardcoded secrets — grep -E "AKIA|aws_secret|client_secret|password" scripts/e2e-federation-test.sh returns only env-var references and AWS-Secrets-Manager fetches
  • chmod +x already set
  • Manual run against a deployed dev stack (out of scope for the PR; the script itself isn't being executed by CI)

scripts/e2e-federation-test.sh exercises every supported
federation format × cloud provider combination end-to-end:

  - AWS cross-account: CLI, Terraform, CloudFormation
  - Azure WIF:         CLI, Terraform, Bicep, ARM
  - GCP WIF:           CLI, Terraform

Each cycle: download bundle → deploy → auto-register → approve
→ /test → cleanup. Designed to catch federation regressions that
the unit test suite cannot — the credential resolution, bundle
generation, and cross-account /test path all live in distinct
code paths that only converge at deploy time.

All credentials and tokens come from env vars (CUDLY_TOKEN,
CUDLY_CSRF) or AWS Secrets Manager at runtime. Defaults like
CUDLY_HOST_PROFILE / CUDLY_LAMBDA_NAME / CUDLY_ADMIN_EMAIL are
env-overridable for non-default deployments. No secrets in the
checked-in script.

Filterable via --provider / --format flags, with --no-cleanup
to inspect deployed state on failure.

Not wired into CI yet — runs against a deployed dev stack and
needs three live cloud accounts. Useful for manual pre-merge
verification of federation changes (PRs #67, #74, etc.) and as
the basis for a future eventual nightly job once a sandbox
target is provisioned.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@cristim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15d05559-3603-4c06-817c-5ccbdd6e9153

📥 Commits

Reviewing files that changed from the base of the PR and between 2e33c88 and aaf709f.

📒 Files selected for processing (1)
  • scripts/e2e-federation-test.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/e2e-federation-script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 25, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 27, 2026

Closing — keeping the e2e federation test script local for now. The 846-line script still lives in the main worktree at scripts/e2e-federation-test.sh (untracked, excluded via .git/info/exclude). If we want CI integration later, will revisit.

@cristim cristim closed this Apr 27, 2026
@cristim cristim deleted the test/e2e-federation-script branch April 27, 2026 20:13
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/this-quarter Within the quarter impact/internal Team-internal only effort/l Weeks type/chore Maintenance / non-user-visible status/wontdo Closed as not-planned labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/l Weeks impact/internal Team-internal only priority/p3 Polish / idea / may never ship severity/low Minor harm status/wontdo Closed as not-planned triaged Item has been triaged type/chore Maintenance / non-user-visible urgency/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant