Skip to content

test: add ssl stream route ginkgo e2e#29

Merged
guoqqqi merged 2 commits intoapi7:mainfrom
guoqqqi:test/e2e-ssl-stream-route-ginkgo
Apr 28, 2026
Merged

test: add ssl stream route ginkgo e2e#29
guoqqqi merged 2 commits intoapi7:mainfrom
guoqqqi:test/e2e-ssl-stream-route-ginkgo

Conversation

@guoqqqi
Copy link
Copy Markdown
Contributor

@guoqqqi guoqqqi commented Apr 28, 2026

Summary

  • add Ginkgo E2E coverage for ssl create/list/export/get/update/delete flows
  • add Ginkgo E2E coverage for stream-route create/list/export/get/update/delete and validation flows
  • assert resource state with CLI reads against the real APISIX Admin API
  • keep existing mock Admin API unit tests untouched

Notes

  • stream-route resource specs skip when the target APISIX environment has stream mode disabled; they execute normally when stream mode is enabled.

Verification

Copilot AI review requested due to automatic review settings April 28, 2026 03:58
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

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

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9bca1e7b-1fce-422d-a287-de51a3a99210

📥 Commits

Reviewing files that changed from the base of the PR and between 98ec7b2 and 17d829f.

📒 Files selected for processing (1)
  • test/e2e/ssl_stream_route_ginkgo_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

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

Adds new Ginkgo E2E specs to exercise the CLI lifecycle for SSL and stream-route resources against a real APISIX Admin API, including validation and not-found behaviors (and conditional skipping for stream mode disabled environments).

Changes:

  • Add ordered Ginkgo E2E coverage for ssl create/list/export/get/update/delete flows (JSON + YAML).
  • Add ordered Ginkgo E2E coverage for stream-route create/list/export/get/update/delete flows plus validation/not-found checks, with skip logic when stream mode is disabled.
  • Introduce small local helpers for teardown (via Admin API), temp file writing, PEM indentation, and stream-mode skip handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +411 to +422
_, stderr, err := runA6WithEnv(env, "stream-route", "get", streamRouteID)
skipIfStreamModeDisabled("", stderr, err)
g.Expect(err).To(HaveOccurred())
g.Expect(strings.ToLower(stderr)).To(ContainSubstring("not found"))

_, stderr, err = runA6WithEnv(env, "stream-route", "update")
g.Expect(err).To(HaveOccurred())
g.Expect(stderr).To(ContainSubstring("required flag"))

_, stderr, err = runA6WithEnv(env, "stream-route", "delete", streamRouteID, "--force")
skipIfStreamModeDisabled("", stderr, err)
g.Expect(err).To(HaveOccurred())
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

In the stream-route not-found checks, the calls to skipIfStreamModeDisabled pass an empty stdout string. For consistency (and to avoid missing the disablement message if it ever appears on stdout), capture and pass the real stdout from runA6WithEnv in these cases too.

Copilot uses AI. Check for mistakes.
@guoqqqi
Copy link
Copy Markdown
Contributor Author

guoqqqi commented Apr 28, 2026

Addressed the Copilot review comment by passing the real stdout into skipIfStreamModeDisabled for the stream-route not-found checks as well.

@guoqqqi guoqqqi merged commit 2d14543 into api7:main Apr 28, 2026
6 checks passed
@guoqqqi guoqqqi deleted the test/e2e-ssl-stream-route-ginkgo branch April 28, 2026 07:34
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