Skip to content
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

Add integration test targets for core supported modules #24217

Merged
merged 46 commits into from
May 10, 2017
Merged

Add integration test targets for core supported modules #24217

merged 46 commits into from
May 10, 2017

Conversation

jctanner
Copy link
Contributor

@jctanner jctanner commented May 2, 2017

SUMMARY

Adds a few new integration test targets for core supported modules

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

integration test targets

ANSIBLE VERSION

N/A

ADDITIONAL INFORMATION

N/A

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 feature_pull_request needs_triage Needs a first human triage before being processed. labels May 2, 2017
@ansibot
Copy link
Contributor

ansibot commented May 2, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 2, 2017
@ansibot
Copy link
Contributor

ansibot commented May 2, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 2, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 2, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/blockinfile
test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 2, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/blockinfile
test/integration/targets/find
test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@gundalow gundalow self-requested a review May 3, 2017 10:28
@gundalow gundalow removed the needs_triage Needs a first human triage before being processed. label May 3, 2017
@ansibot
Copy link
Contributor

ansibot commented May 3, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/blockinfile
test/integration/targets/find
test/integration/targets/iso_extract
test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following error:

test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 3, 2017

The test ansible-test sanity --test integration-aliases failed with the following error:

Command "test/sanity/code-smell/integration-aliases.py" returned exit status 1.
>>> Standard Output
The following integration target directories are missing `aliases` files:

test/integration/targets/apt_key
test/integration/targets/at
test/integration/targets/blockinfile
test/integration/targets/find
test/integration/targets/iso_extract
test/integration/targets/raw

If these tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in `test/integration/roles/` instead of `test/integration/targets/`.
In that case, do not add an `aliases` file. Instead, just relocate the tests.

However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.

If these tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:

posix/ci/group1
windows/ci/group2

The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant `group1` entry is fine in most cases. Groups can be changed later to redistribute tests.

Aliases can also be used to express test requirements:

needs/privileged
needs/root
needs/ssh

Other aliases are used to skip tests under certain conditions:

skip/freebsd
skip/osx
skip/python3

Take a look at existing `aliases` files to see what aliases are available and how they're used.

The test ansible-test sanity --test yamllint failed with the following errors:

test/integration/targets/apt_key/tasks/main.yml:30:1: too many blank lines (2 > 0) (empty-lines)
test/integration/targets/at/tasks/main.yml:62:1: too many blank lines (1 > 0) (empty-lines)
test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 3, 2017

The test ansible-test sanity --test yamllint failed with the following errors:

test/integration/targets/apt_key/tasks/main.yml:30:1: too many blank lines (2 > 0) (empty-lines)
test/integration/targets/at/tasks/main.yml:62:1: too many blank lines (1 > 0) (empty-lines)
test/integration/targets/raw/tasks/main.yml:83:1: too many blank lines (1 > 0) (empty-lines)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 4, 2017

The test ansible-test sanity --test shellcheck failed with the following errors:

test/integration/targets/group/files/grouplist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
test/integration/targets/user/files/userlist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 4, 2017

The test ansible-test sanity --test shellcheck failed with the following errors:

test/integration/targets/group/files/grouplist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
test/integration/targets/user/files/userlist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 4, 2017

The test ansible-test sanity --test shellcheck failed with the following errors:

test/integration/targets/group/files/grouplist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
test/integration/targets/user/files/userlist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 4, 2017

The test ansible-test sanity --test shellcheck failed with the following errors:

test/integration/targets/group/files/grouplist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
test/integration/targets/user/files/userlist.sh:19:9: SC2002 Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label May 4, 2017
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 4, 2017
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 4, 2017
Copy link
Contributor

@gundalow gundalow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this.

Some general comments

  1. To test for idempotency it may be worth running state: present and state: absent twice and ensuring changed is false.

# register: group_names
# when: 'ansible_distribution == "MacOSX"'

DISTRO=$1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DISTRO="$1"
To deal with distros with spaces in, such as: openSUSE Leap


DISTRO=$1

if [[ $DISTRO == "MacOSX" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$DISTRO"

@ansibot
Copy link
Contributor

ansibot commented May 9, 2017

The test ansible-test sanity --test shellcheck failed with the following errors:

test/integration/targets/group/files/grouplist.sh:14:8: SC2124 Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
test/integration/targets/user/files/userlist.sh:14:8: SC2124 Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 9, 2017
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 9, 2017
@jctanner jctanner merged commit e9c2546 into ansible:devel May 10, 2017
KKoukiou pushed a commit to KKoukiou/ansible that referenced this pull request May 22, 2017
A preliminary set of test targets for "core" supported module that had no independent tests. These will also help us ensure python3 compatibility for those modules and prevent future regressions.
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 feature This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants