Commit Graph

217 Commits (319b50f04c93c2247088dadcb9568d5a9ef65d59)

Author SHA1 Message Date
Matt Clay 32fa4b15d1
More sanity test updates for collections. (#59841)
* Move action-plugin-docs ignores into ignore file.

* Update package-data sanity test.

The test now uses the file list provided by ansible-test.
5 years ago
Matt Clay f61b044bf0 Support directories in sanity tests. 5 years ago
Matt Clay e07c4f41d7 Standardize ansible-test sanity test filters. 5 years ago
Matt Clay 5d7cc993dd
Clean up sanity test ignore handling. (#59749)
* Allow sanity tests to easily ignore themselves.

Useful for simple regex based sanity tests that error on their own script due to the regex or error message generated.

* Simplify no-smart-quotes sanity test.

Pruning of unversioned directories is handled by ansible-test.

* Remove directory pruning from boilerplate tests.

Files not passing these tests should be ignored instead.

* Add missing sanity ignore entries.
5 years ago
Matt Clay f274cefa59
Consolidate sanity test ignore entries. (#59665)
* Update empty-init test.
* Update future-import-boilerplate test.
* Update line-endings test.
* Update metaclass-boilerplate test.
* Update no-assert test.
* Update no-basestring test.
* Update no-dict-iteritems test.
* Update no-dict-iterkeys test.
* Update no-dict-itervalues test.
* Update no-get-exception test.
* Update no-main-display test.
* Update no-smart-quotes test.
* Update no-unicode-literals test.
* Update no-unwanted-files test.
* Update replace-urlopen test.
* Update required-and-default-attributes test.
* Update shebang test.
* Update test-constraints test.
* Update use-argspec-type-path test.
* Update use-compat-six test.
5 years ago
Matt Martz 95f4282c42
Verify package data in setup.py installs all files (#59537)
* Add sanity test to ensure all non-py files are installed

* Fix mode and regex

* Fix role skel inventory package_data

* Add docs

* Update package_data for inventory files

* Address pylint concerns

* Another tweak to package_data

* Address review feedback

* Change index to 1

* add to ansible-only.txt
5 years ago
Matt Clay 79eca9c8fb
Initial ansible-test support for collections. (#59197)
* Initial ansible-test support for collections.
* Include cloud config in delegation payload.
* Add missing types import and fix `t` shadowing.
* Fix plugin traceback when config_path not set.
* Fix encoding issues.
* Remove unused imports.
* More encoding fixes.
* Handle delegation outside exception handler.
* Inject ssh keys only if not already in place.
* More defensive approach to getting remote pwd.
* Add missing string format var.
* Correct PowerShell require regex.
* Rename `is_install` and `INSTALL_ROOT`.
5 years ago
Jordan Borean 65049620ee
Generate galaxy.yml based on single source of truth (#59170)
* Generate galaxy.yml based on single source of truth

* Fix up tests and align file names

* Minor Makefile tweak

* Remove link in galaxy.yml file and make it a template file

* Moved collections docs to dev_guide

* change Makefile clean path

* Added readme to example meta file

* review fixes

* Use newer style for doc generation script

* Fix mistake in dev_guide index

* removed uneeded file, fixed links and added preview banner

* Moved banner for sanity test
5 years ago
Matt Clay 6645054329
Code cleanup for test infrastructure. (#59046)
* Remove useless object inheritance in test code.
* Remove unnecessary pass statements from test code.
* Comment on why certain pylint rules are ignored.
* Add more pylint test contexts.
* Fix import order.
* Remove unused variables.
* Remove unnecessary pass statement.
* Fix bad continuations.
* Remove unnecessary elif.
* Allow legitimate broad except statements.
* Allow legitimate protected access.
* Clean up names to make pylint pass.
5 years ago
Toshio Kuratomi dd2755e0b4 Fix pylint warnings for update-bundled 5 years ago
Matt Clay 3f2b766d10 Add future and metaclass boilerplate to test code.
Continue to ignore:

- test/integration/
- test/legacy/
- test/units/
5 years ago
Toshio Kuratomi 33d2728879 Rename python files in hacking/ directory to have .py suffix
ansible-test only passes files which have the .py suffix for sanity
tests on python files.  This change will allow sanity tests to run on
the Python files in hacking/

* Rename test-module to test-module.py
* Symlink test-module for backwards compat since end users may be using
  test-module
* Fix test-module sanity errors that are now triggered
* Rename ansible_profile to ansible-profile.py
* Rename build-ansible
5 years ago
Toshio Kuratomi 146a7f8ff6 Split the metaclass == type and from future boilerplate code.
The metaclass boilerplate is safe to apply en masse.  The future import
boilerplate needs code to be inspected to be sure that there aren't any
py2isms that need to be fixed.  Split these two checks so that we can
fix them independently

Be explicit about which files are grandfathered so we can fix them up one by one
5 years ago
Matt Clay 1e1463401d
Prepare ansible-test for supporting collections. (#58886)
This is a small but incomplete set of the initial changes for supporting testing of collections with ansible-test.
5 years ago
Matt Martz 0e9cfd3ee8
Fix sanity tests that are failing with LC_ALL set (#58604) 5 years ago
Matt Clay d5542afd97 Properly enforce shebang on collections. 5 years ago
Alicia Cozine 118cf3ece6
Cloud dev docs to rst (#56485)
* Moves developer docs for AWS, ovirt, and openstack modules out of lib/ansible/, integrates them with dev_guide, with abadger's fix to make python snippets pass rstcheck
5 years ago
Matt Clay f9b56a5b56 Add sanity test to check for unwanted files. 5 years ago
Toshio Kuratomi 3161a91d7e
Implement a framework for having common code for release scripts (#55893)
* Implement a framework for having common code for release scripts

* Release scripts will go through hacking/build-ansible.  build-ansible is
  a pluggable script which will set a directory that has common code for
  non-enduser scripts.  It will then invoke the plugin which implements
  that subcommand.  Uses straight.plugin for loading each sub-command.

* We're going to add tools which are needed to test ansible (the changelog
  generation, for instance) so we need to include the pieces relevant to
  that in the tarball.

* Add straight.plugin to the sanity test requirements for the same
  reason

* Skip compile test just for build-ansible plugins which won't be run as
  part of sanity tests.
5 years ago
Matt Martz 9f83139dcb
Don't register tests as filters (#55332)
* Don't register tests as filters. Fixes #55319

* Remove tests for deprecated functionality

* Remove no-tests-as-filters sanity tests

* Remove docs too

* Revert "Remove docs too"

This reverts commit 7daf457a74.

* Make no-tests-as-filters doc an orphan
5 years ago
Toshio Kuratomi e5a31e81b6 Add a script to generate a new porting guide
* porting-guide.py is allowed to be Python-3.6+ as it will only be run
  by release engineers
5 years ago
Matt Davis 1dc8436ed9
module_utils fixes in collections (#55118)
* module_utils fixes in collections

* fixed Windows module_utils in collections
* fixed more Python module_utils cases (from X import module)
* "medium style" Ansiballz modules now work properly with collections (ie, non-replacer but also not using basic.py)
* added more tests
* split Windows/POSIX exec

* sanity
5 years ago
Sam Doran 3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
5 years ago
Toshio Kuratomi 5fb416ae34 Add a script to generate twitter and mailing list announcements
Announcements taken from https://github.com/ansible/community/wiki/RelEng:-ReleaseProcess
and then cleaned up:

* Update issue reporting blurb from feedback from acozine and gundalow
* Add a subject and to line for email output
* Ignore long line tests on the jinja templates (as jinja doesn't give
  enough control to get rid of newlines when text wrapping)
* Skip shebang and compile tests for older pythons since this is a
  release engineer-only script.  (ok'd by mattclay)
5 years ago
Matt Clay 39bbadb2fd
Replace no-underscore-variable test with pylint. (#54140)
* Replace no-underscore-variable test with pylint.
* Update orphan handling for sanity test docs.
* Update command for listing tests.
5 years ago
Matt Clay 47f2101e8d Fix no-underscore-variable test. (#54137)
* Ignore lines with comments.
* Detect variables at the start of the line.
5 years ago
Matt Clay 40318b49b2 Check extensions on changelog fragments. 5 years ago
Matt Clay 7c0bc9e4ac Fix no-assert code-smell regex. 5 years ago
Rhys Campbell 7f50f467fe mongodb_replicaset module and test exception (#49690)
* Clean up from previous fork

* Minor doc update

* Fix doc string return type

* Minor doc updates

* Keeping fresh

* Various changes to documentation, cosmetics and code logic

Please test :-)

* Fix typo

* Various small changes as requested

* Remove traceback ref

* try catch changes

* Tidy description

* Correct data type in documentation

* Fix for 4.0
5 years ago
Alex Stephen 6ae04017d8 GCE deprecation warning (#52116)
* GCE deprecation warning

* porting guide typo

* fixing ignores

* moving error code back

* underscore marking on gce

* forgot to change status
5 years ago
Toshio Kuratomi 0ec4e0a842 Disable the update-bundled test during normal operation
This is enabled once per release cycle in a PR so that the release
manager can open bugs for the Ansible team to update the bundled code.
6 years ago
Toshio Kuratomi dfd8b659c0 Have update-bundled check for updates to all bundled code
Add a test for whether we have bundled code inside of ansible that needs to be updated
6 years ago
Matt Clay 06d83bae05 Support `ignore_changes` in code-smell tests. 6 years ago
Brian Coca 96b3ef5553
Doc fragments to plugins (#50172)
* promote doc_fragments into actual plugins

  change tests hardcoded path to doc fragments
  avoid sanity in fragments
  avoid improper testing of doc_fragments
  also change runner paths
 fix botmeta
 updated comment for fragments
 updated docs
6 years ago
Felix Fontein d2c4f57f16 docker_service: rename to docker_compose. (#51035)
* Rename docker_service -> docker_compose.

* Added changelog.

* Update scenario guide.

* Clean up module.
6 years ago
Matt Clay 634533208e Fix integration test shebangs and update tests.
* Integration tests now have their own list of allowed shebangs.
* Use `#!/usr/bin/env bash` instead of `#!/bin/bash`
  since the location is different on various platforms.
6 years ago
Matt Clay 332dc6a93a Fix false positives in no-get-exception test. 6 years ago
Matt Clay 7995f69a44 Improve performance of no-tests-as-filters test. 6 years ago
Matt Martz 6918b4e8f4
Add tests for WANT_JSON and old style modules (#50555)
* Add tests for WANT_JSON and old style modules

* quote source path

* Attempt to further appease tests

* Check for file and not just exists

* omg don't be dumb

* moar fixes

* shellcheck is the worst :)

* Test the custom modules for failure without arg files
6 years ago
Ganesh Nalawade 71113ee291
Fix backup issue in network config modules and network action plugins common code refactor (#50301)
* Fix backup issue in network config modules

*  Fix `get_working_path` not found issue introduced due to
   backup config code refactor (PR #50208)

*  Further refactor config related action plugins to minimize
   duplicate code

*  Remove unwated imports in config action plugins

* Add common network class for action plugin and related code refactor

* Fix review comment
6 years ago
Jordan Borean 7bce6818eb
Added supershipit to botmeta sanity test (#50219) 6 years ago
Dag Wieers 7fb1a71a2c
no-smart-quotes: Skip files by path in code-smell (#45881)
* no-smart-quotes: Skip files by path in code-smell

This is to ensure the generated docs do not trigger code-smell issues on
contributor systems.

* Implement feedback from review
6 years ago
Adrian Likins be65d9cfe5 Skip sanity tests that don't apply to bundled code
* add distro to pep8 skip tests
* Skip no-assert test for distro
* Add bundled distro to the empty-init skip list
6 years ago
Rhys Campbell cdc0011333 mongodb_shard module and test exception (#43673)
* mongodb_shard module and test exception

* Update version_added

* Documentation improvements

* Correct yaml errors

* Correct lines over 160 chars

* Correct replicaset

* Minor documentation changes
6 years ago
John R Barker e7da4975cc
Botmeta validate path macros (#48980)
BOTMETA validation - use path macros

Rather than hard coding the list of path macros, read them directly from
BOTMETA
6 years ago
Matt Martz 9773a1f289
Add a Singleton metaclass, use it with Display (#48935)
* Add a Singleton class, use it with Display

* update six import

* Move remaining failes to display singleton

* Fix rebase issues

* Singleton improvements

* Add code-smell for 'from __main__ import display'. ci_complete

* s/self/cls/g

* Add docs for no-main-display

* Address linting issues

* Add changelog fragment. ci_complete

* Implement reentrant lock for class instantiation in Singleton

* Add Display singleton porting guide
6 years ago
Matt Clay 1a3bf09f8a
Add test to require docs for action plugins. (#48376) 6 years ago
Matt Martz 8765d2a8e8
code-smell test that can find deprecated config items (#46273)
* Start of code-smell test that can find deprecated config items

* Strip deprecated.version from config item

* Don't use os.walk, rely on explictly passed list of files

* Properly disable the test

* Add docs

* Make config an orphan
6 years ago
Toshio Kuratomi bcd6dbcd65 Remove get_exception from the remainder of the modules 6 years ago
Matt Clay c3a6737004 Add BOM check to shebang sanity test.
Includes fixes for docsite files with a UTF-8 BOM.
6 years ago
Alicia Cozine 9764f32513 adds stub API docs in a single file (#46663)
* adds stub API docs in a single file
6 years ago
Felix Fontein a520ca3298 docker_container, docker_image_facts: allow to use image IDs (#46324)
* Allow to specify images by hash for docker_container and docker_image_facts.

* flake8

* More sanity checks.

* Added changelog.

* Added test.

* Make compatible with Python < 3.4.

* Remove out-commented imports.
6 years ago
Matt Clay e2b6047514
Add symlinks sanity test. (#46467)
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.
6 years ago
John R Barker f4f5d941e5
botmeta support: core (#45917)
* botmeta enforce `support: core`
6 years ago
Matt Clay 4085d01617 Reduce noise in docs-build test failures. 6 years ago
Matt Clay ac492476e5
Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.
6 years ago
Matt Clay 2148999048 Improve error handling for docs-build test. 6 years ago
Dag Wieers 24dd87bd0a Fix incorrect use of subprocess.CalledProcessError (#45890) 6 years ago
Matt Clay e7426e3795
Minor cleanup of code-smell tests. (#45658)
* Minor cleanup of code-smell tests.
* Add exception handling for YAML load.
6 years ago
John R Barker 822236810e
BOTMETA Validator + Bulk tidyup, support:(core,community,network) (#44903)
plugins/ is COMMUNITY
Set sensible defaults for directories
support:network for the platforms that we Networking SUPPORTS,
everything else is COMMUNITY
Mark other support:network (ansible-connection, etc)
Infoblox is support:core
contrib/ by definition should be support:community
Remove duplicated labels
Make yamllint happy(ier)
Adds sanity test to ensure BOTMETA.yml is valid
6 years ago
Alicia Cozine 4264be2b18 Remove more docs build errors (#45364)
* orphans testing pages to avoid not-in-toctree errors

* orphans various pages pending reorg

* adds module_utils and special_vars to main TOC

* uses a glob for scenario_guide TOC

* normalize and Sentence-case headings on community pages, typos

* re-orgs community TOC, adds all pages to toctree

* removes scenario guides index page

* adds style guide to community index

* basic update to style guide

* fix typo that created a new error

* removes not-in-toctree from ignore errors list

* leave removing files for future cleanup task
6 years ago
Felix Fontein 0e6234ab04 Adding module which allows to complete certificate chains (#44169)
* Adding certificate_complete_chain module.

* Avoid code smell errors.

* Removing input_chain_src.

* Make sure line ending is there.
6 years ago
Matt Clay 31a5b874a1 Use runtime instead of datetime for test output. 6 years ago
Felix Fontein e7e63ec1e8 Improving syntax highlighting in HTML docs (#42472)
* Adding improved YAML lexer for HTML docs.

* Fixing (some of) the warnings.

* Fixing more warnings.

* Removing ansible- prefix from lexer names.

* Rename extensions -> _extensions.

* Removing superfluous module search path extension.
6 years ago
Egor Zaitsev 249a6aae22 New module: routeros — manage MikroTik RouterOS (#41155)
* Implement initial RouterOS support

* Correct matchers for license prompts

* Documentation updates & mild refactor

* Remove one last Cisco function

* Sanity test fixes

* Move imports to the beginning

* Remove authorize property

* Handle ANSI codes

* Revert to_lines function

* CR fixes

* test(routeros): add unit tests

* Added another test (with ANSI colors and banner in fixture).

* Ignore CRLF line endings in system_package_print file

* fix: review by ganeshrn
6 years ago
Julien Champseix 19dc267e4c Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module

* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Tim Rupp 290df027e3
Adds the ipaddress compat library backport from Python 3.x (#42265)
This library is a backport (to 2.x versions of Python) of the code
that is found in the mainline versions of Python 3.x. It is being
included so that networking vendors, and others, can make use of it
without needing to add a python module dependency to their own modules.

A separate dependency would add to user burden of satisfying those
dependencies before using some Ansible modules.

In a previous core meeting, this was approved. Naming of the directory
it is found in was up for debate, but "compat" was the first directory
to have some sort of concensus.
6 years ago
Ben Berry 32c191ee9c expand user before calling abspath (#40196)
* expand user before calling abspath

* omit expanduser code smell check for volumes
6 years ago
Matt Clay 70c475da6c Implement new changelog generator. 6 years ago
Matt Martz d4930e6692
Add requests.Session like class (#37622)
* Adds requests.Session like class

* py2 syntax fix

* Add a few examples to the Request docstrings

* Add helper methods and docs

* Fix test failures

* Switch tests to test Request instead of open_url, add simple open_url test to validate funcitonality

* Fix filename in replace-urlopen code smell test
6 years ago
Matt Martz 36c8441c6d New module vmware_deploy_ovf (#30309)
* First pass at vmware_deploy_ovf functionality
* Add OVA file support, re-structure code
* Move some useful functions to module_utils.vmware, and perform a little DRY too
* Better handling of errors during spec validation and import
* Properly calculate the lease progress percentage for all vmdk files
* Make warnings and errors a little better
* Add an allow_duplicates argument, that defaults to true, to allow users to have name based idempotency
* Add fail_on_spec_warnings to cause the module to treat warnings as errors
* Support non-vmdk uploads
* Add ova alias for ovf
* Rename vmdk_post_url to device_upload_url so it does not sound to specific to VMDK files
* Safer handling of * hostname in urls
* Add default Content-Type, remove unused headers var
* Add deploymentOptions and propertyMapping functionalities
* Add basic check_mode support
* Add vmware_deploy_ovf to list of use-argspec-type-path ignores
* Update version_added and fix path for use-argspec-type-path
* Add configurable folder
* Doc changes
6 years ago
Matt Clay 8deced3e04
Fix shebangs and file modes and update tests. (#40563)
* Add execute bit sanity test and apply fixes.
* Add shebang test for `lib` dirs and apply fixes.
* Shebang and execute bit cleanup.
6 years ago
Matt Clay a7d7df1450 Make docs-build sanity test disabled by default. 6 years ago
Alicia Cozine c8a9b411bc
Last docs link fixes (#39391)
* should not need <>, but fails without

* adds anchor to keywords page, uses it on plugins pages

* fixes envvar link errors

* harmonize file name and ref name as python_3

* removes undefined-lable from ignore list
6 years ago
Matt Clay 9e8889bb70
Fix more docs errors. (#39051)
* Fix remaining unknown-document docs errors.
* Fix last toc-tree-missing-document docs error.
6 years ago
Matt Clay 7e96421132
Handle warnings in docs-build sanity test. (#39043) 6 years ago
Matt Clay 8a223009ca
Improve handling of integration test aliases. (#38698)
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
6 years ago
Matt Clay 26fa3adeab Add docs-build sanity test. 6 years ago
Matt Martz 6332beef65
Add unit tests for ansible.module_utils.urls (#38059)
* Start of tests for ansible.module_utils.urls

* Start adding file for generic functions throughout urls

* Add tests for maybe_add_ssl_handler

* Remove commented out line

* Improve coverage of maybe_add_ssl_handler, test basic_auth_header

* Start tests for open_url

* pep8 and ignore urlopen in test_url_open.py tests

* Extend auth tests, add test for validate_certs=False

* Finish tests for open_url

* Add tests for fetch_url

* Add fetch_url tests to replace-urlopen ignore

* dummy instead of _

* Add BadStatusLine test

* Reorganize/rename tests

* Add tests for RedirectHandlerFactory

* Add POST test to confirm behavior is to convert to GET

* Update tests to handle recent changes to RedirectHandlerFactory

* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
6 years ago
jhawkesworth ad94d03ba1 Tolerate win line endings on windows module_util load (#37291)
* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback
6 years ago
Matt Clay 05220d693d
Complete updates of remaining code-smell tests. (#37743)
* Add text/binary file support to code smell tests.
* Enhance line-endings code smell test.
* Enhance no-smart-quotes code-smell test.
* Enhance shebang code-smell test.
6 years ago
Matt Clay 8daa80e5bb Move var precedence check to integration tests. 6 years ago
Matt Clay dc71c2197f
More code-smell sanity test updates. (#36830)
* Add test for missing Azure requirements.
* Improve readability.
* Enhance no-unicode-literals code-smell test.
6 years ago
Matt Clay ac1698099d
Overhaul additional sanity tests. (#36803)
* Remove unnecessary sys.exit calls.
* Add files filtering for code-smell tests.
* Enhance test-constraints code-smell test.
* Simplify compile sanity test.
* Pass paths to importer on stdin.
* Pass paths to yamllinter on stdin.
* Add work-around for unicode path filtering.
* Enhance configure-remoting-ps1 code-smell test.
* Enhance integration-aliases code-smell test.
* Enhance azure-requirements code-smell test.
* Enhance no-illegal-filenames code-smell test.
6 years ago
Matt Clay 60a24bbdaa Pass code-smell paths on stdin. 6 years ago
Matt Clay 5b5cba5e50
Update more code-smell tests. (#36570)
* Enhance use-compat-six code-smell test.
* Enhance use-argspec-type-path code-smell test.
* Enhance replace-urlopen code-smell test.
* Enhance boilerplate code-smell test.
* Enhance no-underscore-variable code-smell test.
6 years ago
Matt Clay 891f4f3b2d
Upgrade more code-smell tests. (#36560)
* Enhance no-dict-* code-smell tests.
* Enhance no-basestring code-smell test.
* Enhance no-get-exception code-smell test.
* Enhance empty-init code-smell test.
* Enhance required-and-default-attribute test.
* Remove unused code-smell test.
6 years ago
Matt Clay 2b6ac4561b
Add support for enhanced code-smell tests. (#36332)
* Add support for enhanced code-smell tests:

- Path selection handled by ansible-test.
- Optional path filtering based on extension.
- Optional path filtering based on prefixes.
- Optional lint friendly output.

* Enhance no-assert code-smell test.
* Enhance no-tests-as-filters code-smell test.
6 years ago
Toshio Kuratomi 86242e6871
Enable wildcard import pylint (#35786)
* Wildcard imports should be taken care of.  Enable the pylint check for them
* Remove wildcard import code-smell test as we're now checking via pylint
* Add unused-wildcard-import as ignored in our compat code.

These three files use wildcard imports so that they can export
symbols in a compatible location.  The real code lives elsewhere.
So disable the pylint tests for the relevant sections of code.
7 years ago
Toshio Kuratomi a5b80464df Fix packaging/os modules for wildcard imports and get_exception 7 years ago
Abhijeet Kasurde 1119709b56 Remove get_exception from modules
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Toshio Kuratomi 4a48fdba1d
Update code smell blacklists (#35621)
Update blacklist for get_exception, boilerplate, and no-wildcard.

f5, lenovo, and junos have updated their code.
7 years ago
Matt Clay b9c5147be2
Move import sanity test files into own directory. (#35593) 7 years ago
Jordan Borean 62b87bc925
change .encode to to_bytes (#35522)
ignore backup dir in test integration targets folder
7 years ago
Jordan Borean 4da19f2d6b Added code-smell check to verify filenames are allowed with Windows (#35436) 7 years ago
Matt Clay e0010f15e4 Add pslint sanity test. (#35303)
* Add pslint sanity test.

* Fix `no-smart-quotes` sanity test.

* Add docs for `pslint` sanity test.
7 years ago
Matt Clay cc65636a10 Add PSScriptAnalyzer to default container. 7 years ago
Matt Clay 74ac1c2e4a Test cleanup. 7 years ago
Matt Martz 70b31abf85
Fix tests as filters 5 (#34406)
* Address recent tests as filters in win_iis_webbinding tests

* Make no-tests-as-filters.py so that it is executed
7 years ago