Skip to content

Commit

Permalink
use a login shell when using become for bats
Browse files Browse the repository at this point in the history
otherwise the puppet path (/opt/puppetlabs/bin) is not loaded and tests
fail to call puppetserver
  • Loading branch information
evgeni committed Dec 17, 2024
1 parent d0b7ded commit bdfe96a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions roles/bats/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
register: "test_output"
ignore_errors: true
environment: "{{ bats_environment }}"
become_flags: '-H -S -n -i'

- name: "Read results"
shell: "cat {{ bats_output_dir }}/{{ item }}.tap"
Expand Down

0 comments on commit bdfe96a

Please sign in to comment.