From d2fb845955fadc1ee599703a560dc786a11dc1a6 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 8 Aug 2016 00:31:04 -0700 Subject: [PATCH] Enable more FreeBSD integration tests. (#16991) --- test/integration/roles/test_template/tasks/main.yml | 8 ++++---- test/utils/shippable/remote-integration.sh | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/integration/roles/test_template/tasks/main.yml b/test/integration/roles/test_template/tasks/main.yml index 56d156eb75..17555a47a4 100644 --- a/test/integration/roles/test_template/tasks/main.yml +++ b/test/integration/roles/test_template/tasks/main.yml @@ -73,13 +73,13 @@ # VERIFY dest as a directory does not break file attributes # Note: expanduser is needed to go down the particular codepath that was broken before - name: setup directory for test - file: state=directory dest={{output_dir | expanduser}}/template-dir mode=0755 owner=nobody group=root + file: state=directory dest={{output_dir | expanduser}}/template-dir mode=0755 owner=nobody group={{ ansible_env.GROUP | default('root') }} - name: set file mode when the destination is a directory - template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group=root + template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group={{ ansible_env.GROUP | default('root') }} - name: set file mode when the destination is a directory - template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group=root + template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group={{ ansible_env.GROUP | default('root') }} register: file_result - name: check that the file has the correct attributes @@ -103,7 +103,7 @@ - "dir_attrs.stat.mode == '0755'" - name: Check that template to a dirctory where the directory does not end with a / is allowed - template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir mode=0600 owner=root group=root + template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir mode=0600 owner=root group={{ ansible_env.GROUP | default('root') }} - name: make a symlink to the templated file file: diff --git a/test/utils/shippable/remote-integration.sh b/test/utils/shippable/remote-integration.sh index 8b523f225f..3f7663029a 100644 --- a/test/utils/shippable/remote-integration.sh +++ b/test/utils/shippable/remote-integration.sh @@ -15,7 +15,7 @@ test_flags="${TEST_FLAGS:-}" force_color="${FORCE_COLOR:-1}" # FIXME: these tests fail -skip_tags='test_copy,test_template,test_unarchive,test_command_shell,test_service,test_postgresql,test_mysql_db,test_mysql_user,test_mysql_variables,test_uri,test_get_url' +skip_tags='test_unarchive,test_service,test_postgresql,test_mysql_db,test_mysql_user,test_mysql_variables,test_uri,test_get_url' cd ~/ @@ -56,6 +56,11 @@ if [ ! -f /bin/true ]; then ln -s /usr/bin/true /bin/true fi +# FIXME: tests assume sha1sum is available (some platforms have shasum instead) +if [ ! -f /usr/local/bin/sha1sum ]; then + ln -s /usr/local/bin/shasum /usr/local/bin/sha1sum +fi + # FIXME: async doesn't work with ansible_python_interpreter, see: https://github.com/ansible/ansible/issues/14101 if [ ! -f /usr/bin/python ]; then ln -s /usr/local/bin/python /usr/bin/python