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

check aws inv plugin #53435

Open
wants to merge 30 commits into
base: devel
from

Conversation

@jctanner
Copy link
Member

jctanner commented Mar 7, 2019

SUMMARY

Adds a test to assert conformance between the aws inventory plugin and it's very distant cousin the script.

Still waiting on the ability to allow unsafe chars in groups, namely hyphens.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

tests

ADDITIONAL INFORMATION

@jctanner jctanner changed the title Check aws inv plugin [WIP] check aws inv plugin Mar 7, 2019

@jctanner jctanner requested review from mattclay , bcoca , s-hertel and Akasurde Mar 7, 2019

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 7, 2019

The test ansible-test sanity --test pylint [explain] failed with 17 errors:

test/integration/targets/inventory_aws_conformance/inventory_diff.py:49:13: bad-whitespace Exactly one space required after comma         for k,v in ahost_vars.items():              ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:30: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                               ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:32: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                                 ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:34: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                                   ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:63:116: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py:28:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:5:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:8:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:18:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:12:9: bad-whitespace Exactly one space required around assignment DNSDOMAIN="ansible.amazon.com"          ^
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:182:0: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:44:13: bad-whitespace Exactly one space required after comma         for k,v in kwargs.items():              ^
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:54:37: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:59:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 50 errors:

test/integration/targets/inventory_aws_conformance/inventory_diff.py:49:14: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:31: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:33: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:35: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:63:117: W291 trailing whitespace
test/integration/targets/inventory_aws_conformance/inventory_diff.py:67:1: E303 too many blank lines (3)
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py:8:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:27:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:12:10: E225 missing whitespace around operator
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:29:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:33:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:39:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:56:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:60:7: E121 continuation line under-indented for hanging indent
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:86:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:87:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:88:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:98:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:99:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:101:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:103:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:104:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:106:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:108:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:109:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:111:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:132:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:133:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:158:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:162:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:164:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:165:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:166:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:182:1: W293 blank line contains whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:190:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:16:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:30:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:44:14: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:47:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:54:38: W291 trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:59:1: W293 blank line contains whitespace

The test ansible-test sanity --test shellcheck [explain] failed with 15 errors:

test/integration/targets/inventory_aws_conformance/ec2.sh:26:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:27:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/ec2.sh:29:4: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:1: SC2093 Remove "exec " if script should continue after this command.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:6: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:7:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:28:19: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:152:8: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:154:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:156:52: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:156:97: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:157:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:163:21: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:163:44: SC2086 Double quote to prevent globbing and word splitting.

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot ansibot added the WIP label Mar 7, 2019

@Akasurde

This comment has been minimized.

Copy link
Member

Akasurde commented Mar 7, 2019

Depends upon #53446

@AlanCoding

This comment has been minimized.

Copy link
Member

AlanCoding commented Mar 7, 2019

Ping @kdelee because he has been doing work specifically to get some data for making test assertions with the output from the ec2 inventory plugin.

@s-hertel s-hertel referenced this pull request Mar 7, 2019

Merged

Overridable safety #53458

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 8, 2019

The test ansible-test sanity --test pylint [explain] failed with 17 errors:

test/integration/targets/inventory_aws_conformance/inventory_diff.py:49:13: bad-whitespace Exactly one space required after comma         for k,v in ahost_vars.items():              ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:30: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                               ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:32: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                                 ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:34: bad-whitespace Exactly one space required after comma             print('assert var',k,v,k in bdata['_meta']['hostvars'][ahost], bdata['_meta']['hostvars'][ahost].get(k))                                   ^
test/integration/targets/inventory_aws_conformance/inventory_diff.py:63:116: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py:28:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:5:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:8:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:18:4: no-method-argument Method has no argument
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:12:9: bad-whitespace Exactly one space required around assignment DNSDOMAIN="ansible.amazon.com"          ^
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:182:0: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:44:13: bad-whitespace Exactly one space required after comma         for k,v in kwargs.items():              ^
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:54:37: trailing-whitespace Trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:59:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 50 errors:

test/integration/targets/inventory_aws_conformance/inventory_diff.py:49:14: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:31: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:33: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:61:35: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/inventory_diff.py:63:117: W291 trailing whitespace
test/integration/targets/inventory_aws_conformance/inventory_diff.py:67:1: E303 too many blank lines (3)
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py:8:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py:27:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:12:10: E225 missing whitespace around operator
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:14:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:29:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:33:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:39:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:56:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:60:7: E121 continuation line under-indented for hanging indent
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:86:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:87:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:88:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:98:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:99:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:101:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:103:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:104:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:106:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:108:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:109:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:111:5: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:132:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:133:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:158:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:162:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:164:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:165:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:166:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:182:1: W293 blank line contains whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py:190:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:16:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:30:5: E301 expected 1 blank line, found 0
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:44:14: E231 missing whitespace after ','
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:47:9: E265 block comment should start with '# '
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:54:38: W291 trailing whitespace
test/integration/targets/inventory_aws_conformance/lib/boto/session.py:59:1: W293 blank line contains whitespace

The test ansible-test sanity --test shellcheck [explain] failed with 15 errors:

test/integration/targets/inventory_aws_conformance/ec2.sh:26:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:27:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/ec2.sh:29:4: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:1: SC2093 Remove "exec " if script should continue after this command.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:6: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:7:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:28:19: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:140:8: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:142:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:144:52: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:144:97: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:145:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:151:21: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:151:44: SC2086 Double quote to prevent globbing and word splitting.

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 8, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:14:1: E302 expected 2 blank lines, found 1

The test ansible-test sanity --test shellcheck [explain] failed with 15 errors:

test/integration/targets/inventory_aws_conformance/ec2.sh:26:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:27:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/ec2.sh:29:4: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:1: SC2093 Remove "exec " if script should continue after this command.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:6: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:7:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:28:19: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:141:8: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:143:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:145:52: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:145:97: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:146:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:152:21: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:152:44: SC2086 Double quote to prevent globbing and word splitting.

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@s-hertel s-hertel force-pushed the jctanner:CHECK_AWS_INV_PLUGIN branch from ff1cae0 to 978ab34 Mar 13, 2019

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 13, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:5:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:8:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:11:1: E302 expected 2 blank lines, found 1
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py:14:1: E302 expected 2 blank lines, found 1

The test ansible-test sanity --test shellcheck [explain] failed with 15 errors:

test/integration/targets/inventory_aws_conformance/ec2.sh:26:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:27:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/ec2.sh:29:4: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:1: SC2093 Remove "exec " if script should continue after this command.
test/integration/targets/inventory_aws_conformance/ec2.sh:46:6: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:7:12: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:28:19: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:144:8: SC2155 Declare and assign separately to avoid masking return values.
test/integration/targets/inventory_aws_conformance/runme.sh:146:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:148:52: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:148:97: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:149:7: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:155:21: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:155:44: SC2086 Double quote to prevent globbing and word splitting.

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 14, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 14, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:1:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:2:0: useless-import-alias Import alias does not rename original package
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py:3:0: useless-import-alias Import alias does not rename original package

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 14, 2019

The test ansible-test sanity --test symlinks [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/lib/boto3:0:0: symlinks to directories are not allowed
test/integration/targets/inventory_aws_conformance/lib/botocore:0:0: symlinks to directories are not allowed

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 14, 2019

@s-hertel s-hertel force-pushed the jctanner:CHECK_AWS_INV_PLUGIN branch from 2d214e9 to 0e1cc3b Mar 15, 2019

@s-hertel

This comment has been minimized.

Copy link
Contributor

s-hertel commented Mar 15, 2019

Rebased to use a8e328f

@ansibot

This comment was marked as outdated.

Copy link
Contributor

ansibot commented Mar 15, 2019

The test ansible-test sanity --test shellcheck [explain] failed with 2 errors:

test/integration/targets/inventory_aws_conformance/runme.sh:12:44: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_aws_conformance/runme.sh:165:7: SC2086 Double quote to prevent globbing and word splitting.

click here for bot help

@ansibot ansibot removed the support:core label Mar 15, 2019

@s-hertel s-hertel changed the title [WIP] check aws inv plugin check aws inv plugin Mar 19, 2019

@ansibot ansibot removed the WIP label Mar 19, 2019

rm -f "$OUTPUT_DIR/aws_ec2.yml"
rm "$TARGET/lib/boto3"
rm "$TARGET/lib/botocore"
rm -r "${OUTPUT_DIR}/aws-ec2-inventory/"

This comment has been minimized.

@mattclay

mattclay Mar 19, 2019

Member

None of this cleanup should be needed, since both the output and current working directory are automatically cleaned up at the end of the test.

This comment has been minimized.

@mattclay

mattclay Mar 20, 2019

Member

Correction, the temporary directory is deleted and created at the start of each test target.

@AlanCoding

This comment has been minimized.

Copy link
Member

AlanCoding commented Mar 20, 2019

From some conversation we were having at:

ansible/awx#3266 (comment)

I agree with @maxamillion's preference to use bracket notation in all cases possible. I'm happy to roll this out within our implementation of these things, and ideally our implementation would match where you do it.

For example ec2_region: placement.region -> ec2_region: placement["region"], I'm still looking for other good examples where things can be condensed.

Either way, I would like to use whatever the most canonical and durable syntax is.

@s-hertel

This comment has been minimized.

Copy link
Contributor

s-hertel commented Mar 20, 2019

@AlanCoding was that the right link? I don't see dot syntax being questioned (and was even suggested here ansible/awx#3266 (comment)), just the superfluous use of json_query (which I'm not doing). I don't feel like bracket/dot notation is an important nit to pick but I don't particularly care on way or another and in this case it would be the same as bracket notation.

Also, I noticed this comment ansible/awx#3266 (comment) which is not true because I fixed it in #53152.

@AlanCoding

This comment has been minimized.

Copy link
Member

AlanCoding commented Mar 20, 2019

Sorry, here a different link: ansible/awx#3266 (comment)

In this case, 3 syntax patterns were discussed:

  • networkInterfaces | json_query("[0].accessConfigs[0].natIP")
  • networkInterfaces[0]['accessConfigs'][0]['natIP']
  • networkInterfaces[0].accessConfigs[0].natIP

What's your preference?

It was good to see #53152, I left a comment on #51883.

@AlanCoding

This comment has been minimized.

Copy link
Member

AlanCoding commented Mar 21, 2019

Very cool, I agree that security_groups | map(attribute='group_name') is easier to read than security_groups | json_query("[].group_name"). That's a very subtle readability improvement I had not imagined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.