Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Print pod logs for failed scenarios #107

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

Sgitario
Copy link
Contributor

@Sgitario Sgitario commented Nov 2, 2020

Changes:

  • Allow to configure the command to specify the output (whether a file or the console)
  • Update OpenShiftTestExtension to run a list of actions when a scenario fails
  • Add two actions to be run after a scenario failure: CopyLogsOnOpenShiftFailureActionImpl and PrintStatusOnOpenShiftFailureActionImpl.

import java.util.Arrays;
import java.util.List;

import static org.fusesource.jansi.Ansi.ansi;
import java.util.function.BiConsumer;
Copy link
Contributor Author

@Sgitario Sgitario Nov 2, 2020

Choose a reason for hiding this comment

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

I used the same formatter than Quarkus ... should I revert this and use another? Don't want to create unnecessary changes everywhere.
If there is no a decision made, I think we should follow the Quarkus formatter and enforce that these tests follow the rules. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

There's an import sort Maven plugin configured in this project, mvn compile should apply I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't mean only about sort import, but general formatter rules. This is the formatter I think we should follow: https://github.com/quarkusio/quarkus/tree/master/independent-projects/ide-config/src/main/resources

Copy link
Member

Choose a reason for hiding this comment

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

yup, formater inclusion is on our todo, last time @Ladicek had some objections to Quarkus formatter, so we didn't push hard on it. But as more people will be looking into the project, it might be time to push it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

The Eclipse formatter is crap and more often than not, I have to fight it to leave the code at least a little readable. I hate it with a passion, but feel free to use it on new code :-)

Copy link
Member

Choose a reason for hiding this comment

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

Whole codebase would get (re)formatted, I would go with https://github.com/quarkusio/quarkus/blob/master/build-parent/pom.xml#L459 way not to need to worry about everyone's IDE setup

import java.util.stream.Stream;

import static org.fusesource.jansi.Ansi.ansi;
import static org.junit.platform.commons.util.AnnotationUtils.findAnnotatedFields;

// TODO at this point, this class is close to becoming unreadable, and could use some refactoring
// TODO at this point, this class is close to becoming unreadable, and could use some refactoring.
// Raised https://github.com/quarkus-qe/quarkus-openshift-test-suite/issues/108 for the refactoring.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As stated in the comment, I've raised the #108 issue to do this.

@Sgitario Sgitario requested a review from Ladicek November 3, 2020 05:31
@Ladicek
Copy link
Contributor

Ladicek commented Nov 3, 2020

Just one comment, otherwise LGTM.

@rsvoboda rsvoboda merged commit 8503f32 into quarkus-qe:master Nov 3, 2020
@Sgitario Sgitario deleted the printpodlogs branch November 3, 2020 11:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants