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

Aruba fails to build proper path when ~ used as path to $HOME #418

Closed
iiezhachenko opened this issue Nov 30, 2016 · 9 comments · Fixed by #692
Closed

Aruba fails to build proper path when ~ used as path to $HOME #418

iiezhachenko opened this issue Nov 30, 2016 · 9 comments · Fixed by #692
Assignees
Milestone

Comments

@iiezhachenko
Copy link

Log:

When I cd to "~"
/home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/unix/fork_exec_process.rb:26:in chdir': No such file or directory @ dir_chdir - /home/ubuntu/cloudflare-cli /tmp/aruba/~ (Errno::ENOENT) from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/unix/fork_exec_process.rb:26:in block in launch_process'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/unix/fork_exec_process.rb:20:in fork' from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/unix/fork_exec_process.rb:20:in launch_process'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/abstract_process.rb:82:in start' from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/processes/spawn_process.rb:82:in block in start'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/platforms/local_environment.rb:22:in call' from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/platforms/unix_platform.rb:78:in with_environment'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/processes/spawn_process.rb:81:in start' from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/command.rb:67:in start'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/api/command.rb:213:in run' from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/api/command.rb:271:in run_simple'
from /home/ubuntu/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/aruba-0.14.2/lib/aruba/cucumber/command.rb:15:in `block in <top (required)>...'

Code

When I cd to "~"
And I run cloudflare-cli dns dump
Then the exit status should be 0

@maxmeyer
Copy link
Member

Sorry for the late reply. Can you please try to mock the home directory first?

@maxmeyer maxmeyer added this to the 1.0.0-alpha.3 milestone Jul 31, 2017
@stale
Copy link

stale bot commented Nov 9, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Nov 9, 2017
@mvz mvz self-assigned this Nov 10, 2017
@stale stale bot removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Nov 10, 2017
@mvz
Copy link
Contributor

mvz commented Nov 10, 2017

The code that changes directories looks odd. I'll take a look.

@mvz
Copy link
Contributor

mvz commented Nov 10, 2017

The cd code assumes only relative paths are used. This seems very limiting.

@maxmeyer
Copy link
Member

maxmeyer commented Nov 13, 2017

Mmmh... Using ~ should work, but using absolute paths, does not make much sense, as cd is more a push/pop-stack if I remember correctly.

The code that changes directories looks odd.

@mvz You're right. I'm not sure why I built it that way, but I think I might be related to the expansion of ~.

@stale
Copy link

stale bot commented Jan 12, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Jan 12, 2018
@mvz mvz removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Jan 13, 2018
@mvz mvz modified the milestones: 1.0.0-alpha.3, 0.14.4 Feb 4, 2018
@mvz
Copy link
Contributor

mvz commented Mar 4, 2018

On the 0.14.x series, you will need to tag the scenario with @mocked-home-directory. This will set $HOME to the Aruba working directory. You can then remove the line When I cd to "~" entirely.

For 1.0.0, I'm planning to make this way of using cd work and also always have the home directory mocked to improve test isolation.

@mvz mvz modified the milestones: 0.14.4, 1.0.0 Mar 4, 2018
@stale
Copy link

stale bot commented May 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label May 3, 2018
@xtrasimplicity
Copy link
Member

Bump.

@stale stale bot removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label May 3, 2018
@mvz mvz modified the milestones: 1.0.0, 1.1.0 Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants