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

Draft: integration tests #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guilherme-puida
Copy link
Contributor

Original MR: https://salsa.debian.org/debian/wcurl/-/merge_requests/10


I'm looking for some feedback here :^)

@bagder
Copy link
Member

bagder commented Aug 14, 2024

Can you explain in words how we would add new tests to this suite and what it aims at testing?

@guilherme-puida
Copy link
Contributor Author

how we would add new tests to this suite

By adding new test_ methods to the TestWcurl class. This is kind of messy right now, since the TestWcurl class contains both tests and the infrastructure required to run them (starting the http server, creating temporary directories). My plan is to eventually split those two concerns into different classes, so that the actual tests would be easier to see/maintain.

I also want to add some helper methods to assert that a file was created/execution failed/etc.

what it aims at testing

When we first released wcurl, we had some issues with people using it with older versions of the curl CLI. We didn't think about that, and now we conditionally add options based on the CLI version (1240227 and c914de9). This is impossible to catch with the unit tests we have right now, since we don't actually execute curl and only look at the generated options. I would feel more comfortable adding or modifying the options we generate if we could test the execution on different/older curl versions.

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