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

🌱 e2e: TestAuditLogs remove duplicate audit-log-path #2610

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

hardys
Copy link

@hardys hardys commented Jan 12, 2023

Summary

This decouples scratch directory creation from the PrivateKcpServer fixture, so that we can log to the regular artifactDir location (which means the log data will show up in saved CI job artifacts), and avoid the duplicate flag and associated test cleanup.

Related issue(s)

Follows on from #2591 to ensure audit log output shows up in the saved CI artifacts for all tests.

@hardys
Copy link
Author

hardys commented Jan 12, 2023

/cc @ncdc @stevekuznetsov ref this discussion

Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

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

Comment applies elsewhere - I'm not clear on what the benefit is of pulling the dirs up if they are not used at the higher scope?

test/e2e/homeworkspaces/home_workspaces_test.go Outdated Show resolved Hide resolved
If we define the artifactDir in the test we can read the
audit log from that directory instead of passing a duplicate option
with a different path
@hardys
Copy link
Author

hardys commented Jan 12, 2023

/retitle 🌱 e2e: TestAuditLogs remove duplicate audit-log-path

@openshift-ci openshift-ci bot changed the title 🌱 e2e PrivateKcpServer decouple scratchdir creation 🌱 e2e: TestAuditLogs remove duplicate audit-log-path Jan 12, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stevekuznetsov

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2023

t.Cleanup(func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming we lost this since we defer cleanup to the scratch-dir cleanup routines?

Copy link
Author

Choose a reason for hiding this comment

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

Yes since the audit-log ends up in the regular artifactDir which is created via testing.TempDir it'll be cleaned with the other test output unless ARTIFACT_DIR is specified.

@openshift-merge-robot openshift-merge-robot merged commit ca7e1c5 into kcp-dev:main Jan 12, 2023
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

3 participants