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
Update tests for 'newer' Windows builds #2348
Conversation
Change in test results:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Please consider my comments.
@@ -179,7 +179,7 @@ def test_sign_in_with_other_credentials_doesnt_overwrite_other_keys | |||
end | |||
|
|||
def test_sign_in_with_bad_credentials | |||
skip 'Always uses $stdin on windows' if Gem.win_platform? | |||
skip 'Always uses $stdin on windows' if Gem.win_platform? && RUBY_VERSION <= '1.9.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this line completely, Because the master branch only supports Ruby2.2+
@@ -190,7 +190,7 @@ def test_sign_in_with_bad_credentials | |||
end | |||
|
|||
def util_sign_in response, host = nil, args = [] | |||
skip 'Always uses $stdin on windows' if Gem.win_platform? | |||
skip 'Always uses $stdin on windows' if Gem.win_platform? && RUBY_VERSION <= '1.9.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as L182.
@@ -472,28 +480,32 @@ def test_extract_tar_gz_symlink_relative_path | |||
end | |||
|
|||
def test_extract_symlink_parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert stylistic changes? We shouldn't mix it and feature changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Respectfully, no. I will remove the above two code lines. To not waste another set of tests, I'll do so when this is resolved.
Given what I've seen in this repo:
-
If I submitted a PR with a new test and the 1st indent within the method def was one space, would I be asked to change it?
-
I've aligned the formatting of one test in a file of 16, among over two thousand test methods in total.
-
I've seen maintainers/members discuss things they admit to never having used, want benchmarks that had so many parameters affecting them as to make them pointless, and discuss engine/platform configurations they have never used anything comparable to. I've also seen them not respond to very specific questions.
I'm just trying to make RubyGems better for myself and also users in general (including new users). I've been writing code since I was a teenager using an acoustic-coupler and a teletype. I started in CompSci before changing to EE/Math. IOW, I'm old enough to say:
Y'all need to quit badgering contributors and let them improve RubyGems
Sorry for the rant...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I will never merge this until you fixed them. It's an elementary request in pull request of GitHub.
See No.4 in http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See No.4
And No.4's first paragraph is: "You may feel the urge to change the formatting of the existing code to fit 'your' style. Please abstain."
I did not do that. I formatted a test method I was already changing to match all the other test methods. My editor's ruby configuration replaces a tab with two spaces. and the non-standard spacing made it a PITA to edit. So I fixed it.
Unfortunately, I will never
Then I guess we're at an impasse...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MSP-Greg If you rebase now everyone should be happy I think! 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Conflict with the rebase, just a bit more work. Thanks, Greg
test/rubygems/test_gem_package.rb
Outdated
begin | ||
File.symlink('code.rb', 'lib/code_sym.rb') | ||
rescue Errno::EACCES | ||
skip "symlink - must be admin with no UAC on Windows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a if Gem.win_platform?
, otherwise this skip could show up on other platforms where this message does not make much sense to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it hits the rescue and it's not windows, what should happen? Nothing, raise the error, or something else?
I only added it because many windows desktops (including mine) will raise the error unless testing is run from an 'admin prompt/console'. Servers are normally configured differently. On Appvyor, the tests do not skip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it should raise
so that the exception propagates back up to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased, and also added similar logic to line 514. And yeah, I screwed up offsetting line 513...
test/rubygems/test_gem_package.rb
Outdated
begin | ||
package.extract_tar_gz tgz_io, @destination | ||
rescue Errno::EACCES | ||
skip "symlink - must be admin with no UAC on Windows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same a previous comment
687ff1e
to
6353c40
Compare
☔ The latest upstream changes (presumably #2350) made this pull request unmergeable. Please resolve the merge conflicts. |
6353c40
to
2e3dbb0
Compare
@bundlerbot r+ |
📌 Commit 2e3dbb0 has been approved by |
Update tests for 'newer' Windows builds # Description: Two test files have 'Windows' skips that are not required for newer versions of Ruby when Windows is run with full admin access (as is the case with Appveyor). Updated the tests, and tested locally as a non-admin, tests then skip. Note: one test (test_extract_symlink_parent) that was updated had a single space indent instead of two. Corrected the indent for the whole test. # Tasks: - [X] Describe the problem / feature - [X] Write tests - [X] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
☀️ Test successful - status-travis |
…wandale Normalize comment indentations # Description: This is a minor follow up to #2350, that fixes another style inconsistency that showed up in #2348. ______________ # Tasks: - [x] Describe the problem / feature - [ ] Write tests - [x] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
…wandale Normalize comment indentations # Description: This is a minor follow up to #2350, that fixes another style inconsistency that showed up in #2348. ______________ # Tasks: - [x] Describe the problem / feature - [ ] Write tests - [x] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
Description:
Two test files have 'Windows' skips that are not required for newer versions of Ruby when Windows is run with full admin access (as is the case with Appveyor).
Updated the tests, and tested locally as a non-admin, tests then skip.
Note: one test (test_extract_symlink_parent) that was updated had a single space indent instead of two. Corrected the indent for the whole test.
Tasks:
I will abide by the code of conduct.