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

Improve the readability of post-installation test results #6291

Merged
merged 1 commit into from
May 7, 2024

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented May 6, 2024

  • Test results will be displayed in green, red, and yellow to indicate success, failure, and skipped, respectively.
  • Show the total number of success, failure, and skipped tests in the end.
  • Return error if any test fails. Otherwise, it would be hard for automation tools to detect whether the check succeeds or not.

Example of success:

Screen Shot 2024-05-06 at 21 24 32 PM

Example of failure:

Screen Shot 2024-05-06 at 21 33 11 PM

@tnqn tnqn requested review from antoninbas and luolanzone May 6, 2024 14:03
@tnqn
Copy link
Member Author

tnqn commented May 6, 2024

cc @kanha-gupta

go.mod Outdated
@@ -22,6 +22,7 @@ require (
github.com/containernetworking/plugins v1.1.1
github.com/coreos/go-iptables v0.7.0
github.com/davecgh/go-spew v1.1.1
github.com/fatih/color v1.15.0
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use the latest version directly (v1.16.0)?

Copy link
Member Author

Choose a reason for hiding this comment

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

done, thanks for reminding

go.mod Outdated
@@ -41,6 +42,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/onsi/ginkgo/v2 v2.17.2
github.com/onsi/gomega v1.33.1
github.com/pkg/errors v0.9.1
Copy link
Contributor

Choose a reason for hiding this comment

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

This package is deprecated, but I assume this comes from one of our dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed, not sure how it was added by accident.

if testContext.echoOtherNodePod == nil {
return fmt.Errorf("Skipping Inter-Node test because multiple Nodes are not available")
return fmt.Errorf("Inter-Node test requires multiple Nodes"), true
Copy link
Contributor

Choose a reason for hiding this comment

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

An alternative would be to define a custom error type for skipped tests, but I don't have a strong preference

Copy link
Member Author

Choose a reason for hiding this comment

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

done

* Test results will be displayed in green, red, and yellow to indicate
  success, failure, and skipped, respectively.
* Show the total number of success, failure, and skipped tests in the
  end.
* Return error if any test fails. Otherwise, it would be hard for
  automation tools to detect whether the check succeeds or not.

Signed-off-by: Quan Tian <[email protected]>
@tnqn tnqn force-pushed the improve-post-installation branch from 58c26a6 to 5b2a1f5 Compare May 7, 2024 07:00
@antoninbas
Copy link
Contributor

/skip-all

@antoninbas antoninbas merged commit 9125f28 into antrea-io:main May 7, 2024
51 of 54 checks passed
@tnqn tnqn deleted the improve-post-installation branch May 8, 2024 03:23
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.

3 participants