Commit Graph

17 Commits (2be2ae366ea3779d247c9c4f0294fa43f3d1ef84)

Author SHA1 Message Date
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 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
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
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 Clay d5542afd97 Properly enforce shebang on collections. 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
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
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 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 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
Matt Clay c3a6737004 Add BOM check to shebang sanity test.
Includes fixes for docsite files with a UTF-8 BOM.
6 years ago
Matt Clay 31a5b874a1 Use runtime instead of datetime for test output. 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
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