cloudstack/utils
gabrascher 4be5c2e56c Test fails in Widows as the file separator "/" is different from "\"
File separator in windows is different from linux (the expected in the
test); thus, the test
*com.cloud.utils.SwiftUtilTest.testSplitSwiftPath()* will fail in
windows. The problem is that the input of the test is
*"container/object"* but the tested method uses the *File.separator*
(that depends from the OS), in the windows the tested method
(*com.cloud.utils.SwiftUtil.splitSwiftPath(String)*) looks for a "\" in
windows systems, resulting in an empty string and consequently a failure
in the test.

Some solutions:
- the simple way is to create a string `String input = "container" +
File.separator + "object";`, thus independent of the OS, the test will
succeed.
- a tricky solution is to mock the final static variable
*File.separator* and return "/".

I picked the easy way.
2016-04-21 17:55:59 -03:00
..
bindir fixing utils license header 2012-06-06 23:06:02 -04:00
conf CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path 2015-05-06 15:22:04 +02:00
src Test fails in Widows as the file separator "/" is different from "\" 2016-04-21 17:55:59 -03:00
pom.xml Updating pom.xml version numbers for release 4.9.0-SNAPSHOT 2016-01-26 15:12:20 +01:00