diff --git a/library/firefox_addon b/library/firefox_addon index 57f14a3..6078940 100644 --- a/library/firefox_addon +++ b/library/firefox_addon @@ -23,7 +23,7 @@ ensure_profile() { [[ $? -eq 0 ]] || fail "couldn't determine profile path" "$_stdout" [[ $_stdout =~ Success:\ created\ profile\ \'(.+)\'\ at\ \'(.+)\' ]] || fail "couldn't determine profile path" local _profile_path=${BASH_REMATCH[2]} - result "$_result_name" ${profile_path%/*} + result "$_result_name" ${_profile_path%/*} } url_slug() { diff --git a/tests/container-test.bats b/tests/container-test.bats index c8035aa..810bd39 100644 --- a/tests/container-test.bats +++ b/tests/container-test.bats @@ -16,7 +16,9 @@ docker_exec_d() { } docker_exec_sh() { - docker exec $DOCKER_CONTAINER_NAME sh -c '$@' > /dev/null + # workaround for https://github.com/sstephenson/bats/issues/89 + local IFS=' ' + docker exec $DOCKER_CONTAINER_NAME sh -c "$*" > /dev/null } ansible_exec_module() { @@ -69,7 +71,7 @@ setup() { [[ $output =~ changed.*true ]] run ansible_exec_module firefox_addon "url=$addon_url state=absent display=:1" [[ $output =~ changed.*true ]] - docker_exec_sh test ! -e "/usr/lib64/firefox/browser/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" + docker_exec_sh test ! -e "~/.mozilla/firefox/*.default/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" } @test "Module exec with state present twice and check idempotent" {