Skip to content

Commit

Permalink
Update test for milestone 2.18 (#4237)
Browse files Browse the repository at this point in the history
For unknown reason, the behaviour of milestone differs such that the PWD
environment variable is not updated to the directory of the process.

Because we are not running with a shell and it's the shell's
resposbility to keep it updated, we'll switch instead to a lookup pipe
to get the pwd and not rely on the env var.

After several hours of digging without success, this should accomplish
what the test intended todo with a dependency on the shell.
  • Loading branch information
cidrblock authored Jun 26, 2024
1 parent 4e5d02b commit d5173cb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
- name: Converge
hosts: localhost
connection: local
tasks:
- name: Assert CWD is the same as playbook_dir
ansible.builtin.assert:
that:
- playbook_dir == lookup('env', 'PWD')
- playbook_dir == pwd
msg: >
Molecule should automatically chdir to scenario directory {{ playbook_dir }}
but we found that it runs from {{ lookup('env', 'PWD') }} instead."
but we found that it runs from {{ pwd }} instead."
vars:
pwd: "{{ lookup('pipe', 'pwd') }}"

0 comments on commit d5173cb

Please sign in to comment.