Skip to content

Get ImportProjectTaskTest closer to real life (Case 205891)#59

Merged
janopae merged 2 commits intomasterfrom
205891-make-test-more-functional
Jan 23, 2026
Merged

Get ImportProjectTaskTest closer to real life (Case 205891)#59
janopae merged 2 commits intomasterfrom
205891-make-test-more-functional

Conversation

@janopae
Copy link
Member

@janopae janopae commented Jan 23, 2026

Until now, the test tests almost nothing:

It doesn't verify results and acts rather as a smoke test. But it also mocks away all the dependencies, and only tests the few lines of the import method against empty mocks rather than real services.

This commit shows that it is possible to test way more real-life interaction with even less code. Only PackageVersionFetcher and VcsDriverFactory are mocked now, to prevent real network requests.

For more test result verification, we should use a tool like Foundry.

janopae and others added 2 commits January 23, 2026 18:07
Until now, the test tests almost nothing:

It doesn't verify results and acts rather as a smoke test. But it also mocks away all the dependencies, and only tests the few lines of the `import` method against empty mocks rather than real services.

This commit shows that it is possible to test way more real-life interaction with even less code. Only PackageVersionFetcher and VcsDriverFactory are mocked now, to prevent real network requests.

For more test result verification, we should use a tool like Foundry.
@janopae janopae changed the title Get ImportProjectTaskTest closer to real life Get ImportProjectTaskTest closer to real life (Case 205891) Jan 23, 2026
@janopae janopae merged commit 6c1e399 into master Jan 23, 2026
@janopae janopae deleted the 205891-make-test-more-functional branch January 23, 2026 18:06
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.

1 participant