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
put() empty remote_path arg ignores use of with cd(): #370
Conversation
|
Jeff Forcier (bitprophet) posted: Specifically, what needs to happen is the application of (also: updated the ticket subject to be more accurate.) on 2011-06-29 at 03:53pm EDT |
|
Btw, pretty sure |
Thanks to IRC user tazle for the input.
Re fabric#21. Next up: * Make execute() actually implement what is stated in the docs * Quite possibly update that to wrap everything in Task, then move interesting bits into Task.run or w/e * Probably add more examples to the docs?
New tests not needed at this time, host/role/exclude all tested against get_hosts() already. Re fabric#21
Specifically: * Replace side-effect-using `interpret_host_string` with `to_dict`/`from_dict` (for use with `settings`) * Cleanly set up an env dict for use when calling the actual task * Update tests appropriately Re fabric#21
My misunderstanding: @with_fakes does not call clear_expectations, only clear_calls. Dumb IMO. May replace with my own decorator.
CLI could also have referred to the global flags.
Otherwise mocks, and any user classes defining just __call__, blow up.
Does not actually put in the ssh config options yet. But passes all existing tests, so good checkpoint.
Includes backpedal on host-specific ssh_config settings overriding env vars. Not feasible with current SSHConfig, and was conceptually messy anyways.
Includes a bunch of tightly related changes to network.py, and tests.
Also dropping connection/timeout stuff for now, can add that later.
…overiting the first test_nested_alias().
Renamed second test_nested_alias() to test_nested_aliases()
|
I just merged the upstream master into this branch, it should be ready to be merged into master. Is there a showstopper? If so, please report, I'm willing to correct any flaws! |
|
I think this does need a bit more tweaking, e.g. I started writing a test for this, and noticed that a call of In other words, my fears were right, it's not as simple as just adding the extra checks to So there definitely need to be some tweaks somewhere, and we should be careful to check a lot of possible combinations:
Ideally we want to test all potential combos there, but for now I think we can get away with just adding a handful of the more common ones. It should be possible to expand the test suite ( If you think tackling all this is feasible, by all means give it a shot, otherwise I'll try sometime. |
|
It seems like put+cd+~ combo doesn't work as well: |
Description
When using put() in this way:
the empty string in put's second arg is supposed to resolve to the current working directory on the remote end. However, in this case it resolves to the user's home directory.
I believe the lines where this is determined are 397-400 in operations.py:
Originally submitted by Matt DeBoard (mdeboard) on 2011-06-29 at 03:32pm EDT