Skip to content
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

Add option to dump container logs on failure #189

Open
npepinpe opened this issue Sep 7, 2021 · 0 comments
Open

Add option to dump container logs on failure #189

npepinpe opened this issue Sep 7, 2021 · 0 comments
Assignees
Labels
good first issue Good for newcomers type/feature New user facing features

Comments

@npepinpe
Copy link
Collaborator

npepinpe commented Sep 7, 2021

Is your feature request related to a problem? Please describe.

A common debugging task when a test fails is to check the container logs, especially when running cluster tests where it's not feasible to just use a debugger. This is tedious to do manually in every test, and should be easy to have a small extension which does just that.

Describe the solution you'd like

Add a flag on all ZeebeNodes, e.g. withPrintLogsOnFailure(boolean), and implement TestLifecycleAware. On failure, if true, then dump all the container logs before it is removed.

Describe alternatives you've considered

Each user manually implements this in their own project, or using AfterEach callback in every suite.

Additional context

See https://github.com/camunda-cloud/zeebe/blob/86f1c1cd447ed94a0c4c0b2907334bb4903ac40c/test-util/src/main/java/io/camunda/zeebe/test/util/testcontainers/ContainerLogsDumper.java

@npepinpe npepinpe added the type/feature New user facing features label Sep 7, 2021
@npepinpe npepinpe self-assigned this Sep 7, 2021
@npepinpe npepinpe changed the title Add Junit 5 extension to automatically dump container logs on failure Add option to dump container logs on failure Sep 26, 2022
@xomiamoore xomiamoore moved this from 1️⃣ Good First Issue to 🔁 In Progress in Contribute to the Camunda Community Hub Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type/feature New user facing features
Projects
Status: 🔁 In Progress
Development

No branches or pull requests

1 participant