-
-
Notifications
You must be signed in to change notification settings - Fork 590
chore(grafana): use Run function #3412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary by CodeRabbit
WalkthroughRefactors Grafana LGTM module to use testcontainers.Run with module options (exposed ports, wait strategy with 2-minute deadline), updates error handling, and wraps returned container. Tests expanded to validate reachability of multiple service endpoints (Loki, Tempo, OTLP HTTP/GRPC, Prometheus, Grafana) via TCP dial checks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant T as Test
participant M as GrafanaLGTM Module
participant TC as testcontainers.Run
participant D as Docker Engine
participant C as Container
T->>M: Run(ctx, opts...)
Note over M: Build moduleOpts<br/>- WithExposedPorts(...)\n- WithWaitStrategy(ports, 2m deadline)\n- Append caller opts
M->>TC: Run(ctx, image, moduleOpts...)
TC->>D: Create & start container
rect rgb(240, 248, 255)
note right of TC: Wait until ports ready or deadline
end
D-->>TC: Container handle or error
alt success
TC-->>M: C
M-->>T: GrafanaLGTMContainer(C)
else error
TC-->>M: error
M-->>T: error "run grafana lgtm: ..."
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (2)modules/grafana-lgtm/grafana_test.go (1)
modules/grafana-lgtm/grafana.go (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (6)
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. Comment |
What does this PR do?
Use the Run function in the Grafana LGTM module
Why is it important?
Migrate modules to the new API
Related issues