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

Do not write artifacts to current dir in tests #749

Merged

Conversation

bcrochet
Copy link
Contributor

A lot of the tests would create artifacts folders in the directory
under test. They would also create preflight.log in those same
locations. This makes sure that that does not occur.

It also removes the side effect from the artifacts.Path() call.
That call would create the artifacts dir, and that's just very
unexpected. Instead, this moves the dir creation side effect into
the artifacts.WriteFile() call, which is much more an expected
behaviour.

Signed-off-by: Brad P. Crochet brad@redhat.com

@openshift-ci openshift-ci bot requested review from acornett21 and komish July 29, 2022 15:26
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2022
@coveralls
Copy link

coveralls commented Jul 29, 2022

Coverage Status

Coverage decreased (-0.03%) to 84.309% when pulling d75ca0f on bcrochet:fix-artifacts-in-tests into 3140737 on redhat-openshift-ecosystem:main.

cmd/check_container_test.go Outdated Show resolved Hide resolved
cmd/check_operator_test.go Outdated Show resolved Hide resolved
cmd/suite_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

Approving because most of my comments are nitty.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2022
A lot of the tests would create artifacts folders in the directory
under test. They would also create preflight.log in those same
locations. This makes sure that that does not occur.

It also removes the side effect from the artifacts.Path() call.
That call would create the artifacts dir, and that's just very
unexpected. Instead, this moves the dir creation side effect into
the artifacts.WriteFile() call, which is much more an expected
behaviour.

Signed-off-by: Brad P. Crochet <brad@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 1, 2022
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 1, 2022
@openshift-ci
Copy link

openshift-ci bot commented Aug 2, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: acornett21, bcrochet, komish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [acornett21,bcrochet,komish]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@acornett21 acornett21 merged commit 1052865 into redhat-openshift-ecosystem:main Aug 2, 2022
@bcrochet bcrochet deleted the fix-artifacts-in-tests branch June 6, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants