Skip to content

test: add debug command ginkgo e2e#31

Merged
guoqqqi merged 1 commit intoapi7:mainfrom
guoqqqi:test/e2e-debug-ginkgo
Apr 28, 2026
Merged

test: add debug command ginkgo e2e#31
guoqqqi merged 1 commit intoapi7:mainfrom
guoqqqi:test/e2e-debug-ginkgo

Conversation

@guoqqqi
Copy link
Copy Markdown
Contributor

@guoqqqi guoqqqi commented Apr 28, 2026

Summary

  • add Ginkgo E2E coverage for debug logs using Docker/APISIX container logs when available
  • add debug trace not-found coverage without validating real proxy traffic
  • keep existing mock Admin API unit tests untouched per current migration boundary

Verification

Copilot AI review requested due to automatic review settings April 28, 2026 04:28
@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 54 minutes and 51 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: e6bc2940-b2cf-4d74-9642-e7a0be82d36b

📥 Commits

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

📒 Files selected for processing (1)
  • test/e2e/debug_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 Ginkgo-based E2E coverage for the a6 debug logs and a6 debug trace commands, focusing on Docker-container log retrieval when available and not-found handling without generating real proxy traffic.

Changes:

  • Introduces new Ginkgo E2E specs for debug logs (explicit container + auto-detect + missing container error).
  • Adds a Ginkgo E2E spec for debug trace not-found behavior.
  • Adds a local helper (skipIfDockerLogsUnavailable) to skip Docker-dependent specs when Docker logs cannot be accessed.

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

Comment on lines +33 to +35
if err != nil && strings.Contains(stderr, "no APISIX container found") {
Skip("no auto-detectable APISIX container is running")
}
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.

The Skip("no auto-detectable APISIX container is running") branch is redundant/unreachable because skipIfDockerLogsUnavailable already skips on the same condition (no apisix container found). Consider removing this if block, or move the no APISIX container found handling before calling skipIfDockerLogsUnavailable if you want a more specific skip message here.

Suggested change
if err != nil && strings.Contains(stderr, "no APISIX container found") {
Skip("no auto-detectable APISIX container is running")
}

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +79
combined := strings.ToLower(stdout + stderr)
if strings.Contains(combined, "cannot connect to the docker daemon") ||
strings.Contains(combined, "permission denied") ||
strings.Contains(combined, "no such container") ||
strings.Contains(combined, "no apisix container found") {
Skip("Docker logs are unavailable in this environment: " + strings.TrimSpace(stdout+stderr))
}
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.

skipIfDockerLogsUnavailable doesn't currently skip when Docker isn't installed (the CLI returns "docker binary not found in PATH"), which can cause these tests to fail in environments without Docker. It may also be worth handling the CLI's "multiple APISIX containers found" auto-detect error as a skip condition for the auto-detect test to avoid flakiness when multiple containers are running.

Copilot uses AI. Check for mistakes.
@guoqqqi guoqqqi merged commit fa3e016 into api7:main Apr 28, 2026
10 checks passed
@guoqqqi guoqqqi deleted the test/e2e-debug-ginkgo branch April 28, 2026 07:41
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