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

Add test for zip #65

Merged
merged 3 commits into from
Jul 1, 2024
Merged

Add test for zip #65

merged 3 commits into from
Jul 1, 2024

Conversation

bertold
Copy link
Collaborator

@bertold bertold commented Jun 30, 2024

Update linter config to remove warnings as project is on Go 1.19 (copyloopvar, intrange), and disable linter that forces tests to be in a separate package (testpackage)

PS: sorry for not following on my previous PR. :-(

Update linter config to remove warnings as project is on Go 1.19 (copyloopvar, intrange), and disable linter that forces tests to be in a separate package (testpackage)
Copy link
Contributor

@davidnewhall davidnewhall left a comment

Choose a reason for hiding this comment

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

Hello and thank you for the zip file test! Instead of store an archive file, so you think you could build it in the go app?

Do you mind renaming its package name to xtractr_test? Probably also revert the changes to the golangci.yml file.

zip_test.go Outdated Show resolved Hide resolved
.golangci.yml Outdated Show resolved Hide resolved
zip_test.go Show resolved Hide resolved
zip_test.go Outdated
require.NoError(t, err, "creating temp directory failed")
defer os.RemoveAll(name)

zipTestFile := filepath.Join(name, "archive.zip")
Copy link
Contributor

Choose a reason for hiding this comment

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

You could probably build a zip instead of store one in the repo. The files_test.go file builds a directory structure. Maybe repurpose that code, and then zip the directory it makes? Just an idea.

zip_test.go Outdated Show resolved Hide resolved
@davidnewhall
Copy link
Contributor

I like it. Stare at it until you're happy with it. :)

@davidnewhall davidnewhall merged commit e089f64 into golift:main Jul 1, 2024
8 checks passed
@bertold bertold deleted the bk/zip-testing branch July 5, 2024 21:49
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.

2 participants