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

Failing Unit Tests on Windows #331

Open
NeverOddOrEven opened this issue Aug 4, 2017 · 3 comments
Open

Failing Unit Tests on Windows #331

NeverOddOrEven opened this issue Aug 4, 2017 · 3 comments

Comments

@NeverOddOrEven
Copy link

NeverOddOrEven commented Aug 4, 2017

Running com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorDescriptorTest
Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.366 sec <<< FAILURE! - in com.smartcodeltd.jenkinsci.plugin.assetbundler.PathToAssetTest
combines_base_resource_url_given_by_jenkins_and_a_path_to_the_asset(com.smartcodeltd.jenkinsci.plugin.assetbundler.PathToAssetTest) Time elapsed: 0.057 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "/opt/jenkins/plugins/build-monitor-plugin/less/index.less"
but: was "C:\opt\jenkins\plugins\build-monitor-plugin\less\index.less"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at com.smartcodeltd.jenkinsci.plugin.assetbundler.PathToAssetTest.combines_base_resource_url_given_by_jenkins_and_a_path_to_the_asset(PathToAssetTest.java:21)

works_with_unc_paths_on_windows(com.smartcodeltd.jenkinsci.plugin.assetbundler.PathToAssetTest) Time elapsed: 0.012 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "/server/jenkins/plugins/build-monitor-plugin/less/index.less"
but: was "\server\jenkins\plugins\build-monitor-plugin\less\index.less"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at com.smartcodeltd.jenkinsci.plugin.assetbundler.PathToAssetTest.works_with_unc_paths_on_windows(PathToAssetTest.java:30)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@NeverOddOrEven
Copy link
Author

@jan-molak could use some input on this one. Are the assertions correct implicating a bug, or are the assertions not valid for Windows?

I am running these tests on Windows 8.1 if that helps.

@jan-molak
Copy link
Member

Looks like the assertions should be updated to work on Windows

@suratdas
Copy link

Fixed as part of pull request #309

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

No branches or pull requests

3 participants