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

Fix tests for windows #123

Closed
wants to merge 11 commits into from
Closed

Conversation

BHare1985
Copy link

This allows all tests but 'correctly caches remote files' to pass.

It does this by just converting most path testing to windows convention. Also it converts CRLF to just LF so there is uniformity there.

I believe there is an issue with caching and windows, the locations of cache files don't seem to be what they should be. First error occurs with:

     + expected - actual

      {
        "Datasource": {
     -    "file": "C:\\projects\\Windshaft\\node_modules\\grainstore\\node_modules\\millstone\\test\\data\\absolute.json"
     +    "file": "C:\\projects\\Windshaft\\node_modules\\grainstore\\node_modules\\millstone\\test\\cache\\layers\\absolute-json.json"
          "layer_by_index": 0
          "type": "ogr"
        }

and proceeds with numerous mislocations that I think are bug related.

It's worth noting on line 188 that windows should return \r\n but is returning a \n.

Also, I get:

 2) util "after each" hook:
    ENOTEMPTY, directory not empty 'C:\projects\Windshaft\node_modules\grainstore\node_modules\millstone\test\copypath'
     at Error (native)
     at Object.fs.rmdirSync (fs.js:711:18)

Looking at the code suggests that copypath SHOULD be empty, but for some reason isn't on windows.

This pull request was suggested and can be discussed here:
#122

@BHare1985
Copy link
Author

In package.json I have "zipfile": "git://github.com/BHare1985/node-zipfile.git" This should be changed. The latest commit fixes zipfile for windows, but that is not released yet AFAIK.

@tmcw
Copy link
Contributor

tmcw commented Nov 7, 2016

Closing as stale.

@tmcw tmcw closed this Nov 7, 2016
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