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

Unit tests not compatible with Windows #463

Closed
1 task done
SimonMarquis opened this issue Nov 28, 2021 · 0 comments · Fixed by #464
Closed
1 task done

Unit tests not compatible with Windows #463

SimonMarquis opened this issue Nov 28, 2021 · 0 comments · Fixed by #464

Comments

@SimonMarquis
Copy link
Contributor

🐛 Describe the bug

Unit test of project plugins are not compatible with Windows.
Execution failed for task ':refreshVersions:test'.

💣 Steps to reproduce

Execute this command on Windows machine from the plugins project:
.\gradlew clean check

📱 Tech info

This unit test fails:
de.fayard.refreshVersions.MigrationTest: Search for files that may contain dependency notations
With the following stacktrace:

org.opentest4j.AssertionFailedError: Element differ at index: [0, 2, 3, 4, 5, 6, 8, 9]
expected:<["app/feature/build.gradle.kts", "build.gradle", "buildSrc/src/main/kotlin/Dependencies.kt", "buildSrc/src/main/kotlin/Deps.kt", "buildSrc/src/main/kotlin/Libs.kt", "buildSrc/src/main/kotlin/Versions.kt", "buildSrc/src/main/kotlin/my/package/Deps.kt", "deps.gradle", "gradle/dependencies.gradle", "gradle/libraries.gradle", "libraries.groovy", "libs.gradle"]> but was:<["app\feature\build.gradle.kts", "build.gradle", "buildSrc\src\main\kotlin\Dependencies.kt", "buildSrc\src\main\kotlin\Deps.kt", "buildSrc\src\main\kotlin\Libs.kt", "buildSrc\src\main\kotlin\Versions.kt", "buildSrc\src\main\kotlin\my\package\Deps.kt", "deps.gradle", "gradle\dependencies.gradle", "gradle\libraries.gradle", "libraries.groovy", "libs.gradle"]>

The test compares file paths that are not platform independent:
https://github.com/jmfayard/refreshVersions/blob/873210a27849ad252af8d561d042d8730d23190e/plugins/dependencies/src/test/kotlin/de/fayard/refreshVersions/MigrationTest.kt#L211-L228

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 a pull request may close this issue.

1 participant