-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
test environment: update aruba/cucumber deps to latest stable #30
Conversation
@@ -73,13 +73,13 @@ | |||
system("git commit -m.") | |||
end | |||
end | |||
FileUtils.cp_r MOCK, current_dir | |||
FileUtils.cp_r MOCK, expand_path(".") |
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.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
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.
This is a silly and outdated rule, Hound, but I don't care enough to change your settings right now.
@@ -62,7 +62,7 @@ | |||
# want to rerun the same git init every iteration, rather we just copy a fresh | |||
# copy of the mocked directory! | |||
Given(/^I am in the mocked git repository with commited subdirectory and file$/) do | |||
MOCK ||= File.join(current_dir, "..", "mock", "gitsubdir") #needs to be outside of aruba clobber dir | |||
MOCK ||= File.join(expand_path(".."), "mock", "gitsubdir") #needs to be outside of aruba clobber dir |
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.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
Missing space after #.
Line is too long. [102/80]
In the past, overriding dirs for the entire test suite was unreliable, so we only did it for the few tests that absolutely needed to take place outside of a git repository. the way we did this in the past seems to have broken, but changing it globally now seems to actually work, so deprecate the entire notion of `@outside-repo` tagged tests, and move the Aruba working directory into `/tmp`, so now all tests should be outside of a git tree unless it’s one we created ourselves with the tests.
Keeping future Windows compatibilty in mind!
@@ -0,0 +1,15 @@ | |||
Aruba.configure do |config| |
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.
Missing frozen string literal comment.
Some of the output is based on expecting the aruba tmpdir is in a particular path, we should strive to remove as much of that as possible…
step %Q(the stdout from "#{cmd}" should contain "#{filepath}") | ||
end | ||
|
||
|
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.
Extra blank line detected.
# | ||
Then(/^the stdout from "([^"]*)" should contain the absolute path of "([^"]*)"$/) do |cmd, f| | ||
filepath = expand_path(f) | ||
step %Q(the stdout from "#{cmd}" should contain "#{filepath}") |
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.
Use % instead of %Q.
end | ||
|
||
# | ||
# Handle unknown absolute paths in output | ||
# | ||
Then(/^the stdout from "([^"]*)" should contain the absolute path of "([^"]*)"$/) do |cmd, f| |
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.
Line is too long. [93/80]
YOUR RULES ARE ALMOST NEVER WORTHWHILE FOR OUR FEATURE INTEGRATION Rather, only check the Go code please
on travis this appears to not notice the before step anymore, so since we are hard-mocking this all, take a brute force approach to initial creation.
some change in recent version of aruba’s matchers for cucumber has a poor regex that makes it impossible to use a quotation mark in a test case… just remove for now, since that can probably be migrated back into a unit test later anyhow.
Closer, down to only one failing test... |
I've narrowed this final test down and it appears to be caused by a regression in Aruba. I'm going to update the step with some inline documentation that shows what is happening (and possible hacky workarounds), then file an issue with Aruba and see if anyone has thoughts. |
this is to aide in filing an upstream issue with the aruba project
Issue filed upstream as cucumber/aruba#432. Fingers crossed for a better solution. |
Urgh, wish I'd spotted this PR 2 hours ago. I also started work on upgrading cucumber & aruba & fixing tests. WDYT to this approach to working around cucumber/aruba#432 ? |
I'm not certain... I believe shells often have subtle differences in how they handle certain things when they detect they are being run in "interactive mode." As a sidenote, a few years ago I also got about 60-70% progress into writing an entire working replacement for Aruba for the Go-native "godog" cucumber framework. It had a lot of other niceties such as being able to run all the tests in isolated environments that can be run entirely concurrently, making the tests go very fast. One day I'd still like to pick that up again, but haven't had time and it's not relevant to any of the other OSS projects I've been working on nor my day job... (the repo is currently private but let me know if you're interested in it.) |
It is still running the shell interactively (jdelStrother@e1691b6#diff-98ae2f02b44c253b557b5dd380b1f41f84c353c580b15443c0f25c3e3d1b4c58R109) - the main change is automatically adding an "exit" and the end of the list of commands, followed by waiting for the shell to actually exit.
Sounds interesting, but like you think I might be too time constrained to actually do much with it 😕 |
FWIW I rebased this branch & added a I tried to update Aruba to the latest version, but versions >= 1 no longer allow you to set the root directory, which is frustrating. Not sure what the best way around that is. |
while Aruba is still not shipping 1.0 (see #15), making me a bit nervous about the state of the project, it's been long enough that I want to try to get the tests running on latest stable anyhow, so we're in a cleaner state to be prepared, and to work towards starting to get CI working in Windows environments as well.