[WIP] unit testing of module ID in internal getPath() call (1.3.x) #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From review of PR #38 for
1.3.1
patch release on1.3.x
branch we discovered a rare issue where the code would use the wrong module ID in case of a URL likehttps://scm.git.service.io/user/my-repo.git
.There was also a question if the changes in PR #38 may lead to a rare issue in case of a URL like
git://scm.git.service.io/user/my-repo.git
.This WIP PR includes unit testing to check the results of the internal
getPath()
call on some URL variations, fails due to some module ID inconsistencies in case of the following URLs (may have missed a few):https://scm.git.service.io/user/my-repo.git
(XXX TODO try these with plainhttp
)git://scm.git.service.io/user/my-repo.git
git+http://scm.git.service.io/user/my-repo.git
git+https://scm.git.service.io/user/my-repo.git
https://scm.service.io/user/my-repo-other-url
wherenpm
indicates that it installedmy-repo@2.0.0
file://my/path/to/my-repo
/my/path/to/my-repo
(XXX TODO test path starting with.
&..
)https://scm.service.io/user/my-repo#old-tag
git://scm.service.io/user/my-repo#old-tag
git+http://scm.service.io/user/my-repo#old-tag
git+https://scm.service.io/user/my-repo#old-tag
git+http://scm.service.io/user/my-repo.git
(solved by changes proposed in PR GH-37 patch release updates for 1.3.1 #38)git+https://scm.service.io/user/my-repo.git
(solved by changes proposed in PR GH-37 patch release updates for 1.3.1 #38)git+http://scm.service.io/user/my-repo.git#old-tag
(solved by changes proposed in PR GH-37 patch release updates for 1.3.1 #38)git+https://scm.service.io/user/my-repo.git#old-tag
(solved by changes proposed in PR GH-37 patch release updates for 1.3.1 #38)https://scm.git.service.io/user/my-repo.git#old-tag
git://scm.git.service.io/user/my-repo.git#old-tag
git+http://scm.git.service.io/user/my-repo.git#old-tag
git+https://scm.git.service.io/user/my-repo.git#old-tag
The exact sameMost of the failures show up on1.3.x
with or without the changes proposed in PR #38.Note that it is not possible to run these exact unit tests on
master
due to some changes in the internal implementation. I think it is necessary to add similar unit tests tomaster
to ensure that this kind of issue is resolved and does not come back in the future.