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

Temporary files not removed if cypress process is terminated #324

Open
iven opened this issue Jul 28, 2023 · 0 comments
Open

Temporary files not removed if cypress process is terminated #324

iven opened this issue Jul 28, 2023 · 0 comments
Assignees
Labels
Type: bug Something isn't working

Comments

@iven
Copy link

iven commented Jul 28, 2023

Description

I'm using this config:

beforeEach(() => {
    cy.recordHar({ includeBlobs: false })
})

afterEach(function () {
    // @ts-expect-error
    const { state } = this.currentTest
    if (state === 'passed') {
        cy.disposeOfHar()
    } else {
        cy.saveHar()
    }
})

If cypress proccess is terminated by user(via SIGTERM, for example), the har files will exist in /tmp forever, and quickly use all disk space if running on CI machine.

Expected behavior
The temporary files should be removed whenever cypress exits. Or output the temporary file to specified folder, and let user clean that folder by themselves.

@iven iven added the Type: bug Something isn't working label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants