Commit Graph

37 Commits

Author SHA1 Message Date
Christian M. Adams 06b04007a0 Rename managed_by_tower to managed 2021-06-22 10:49:36 -04:00
Shane McDonald f882ac420d Fix tests 2021-06-09 13:48:23 -04:00
Seth Foster 4bd910493a sanity tests 2021-06-08 14:33:28 -04:00
Seth Foster 44fed1d7c1 pycharm refactor rename files and class, linux rename tower_ controller_ 2021-06-08 14:33:22 -04:00
Jim Ladd 7e1814e234 mock has_unpartitioned_events in collection tests
.. just like we do with the main awx tests
2021-06-04 09:17:08 -07:00
Shane McDonald b73759e380 Fix collection test 2021-03-29 15:03:28 -04:00
Ryan Petrello c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
John Westcott IV feb9bcff4d Adding transaction to mock requests 2020-08-28 12:43:33 -04:00
John Westcott IV 748bdbd2dd Fix python3 Zuul error with awxkit 2020-08-19 14:12:50 -04:00
John Westcott IV 40f6741474 Adding import/export awx kit features
Changed library structure

Origional TowerModule becomes TowerLegacyModule

TowerModule from tower_api becomes TowerAPIModule

A real base TowerModule is created in tower_module.py

A new TowerAWXKitModule is created in tower_awxkit

TowerAWXKitModule and TowerAPIModule are child classes of TowerModule
2020-08-19 14:12:50 -04:00
AlanCoding a7fe5e1dd2 Fix yamllint error and sync version with module_utils 2020-06-19 09:08:58 -04:00
softwarefactory-project-zuul[bot] 496c0c5921 Merge pull request #6733 from john-westcott-iv/tower_schedule
Initial version of tower_schedule

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-05-21 18:34:57 +00:00
Alan Rominger 22cdc129ad Patches from tinkering with tests and default to devel version (#8)
This causes make install_collection to avoid templating the version
  so that it can still be used as-is in development
2020-05-18 08:51:39 -04:00
beeankha 4321c63165 Remove silence_warning (because of autouse), add version/type warning tests to module_utils unit test file 2020-05-15 09:24:44 -04:00
beeankha 8c5d236066 Update unit tests to not pull in version warnings 2020-05-15 09:24:43 -04:00
AlanCoding d825cca9f2 Unit testing of tower_schedule
Move previously integration tests of lookup plugin to unit tests
  delete all integration tests except some basic demo tests

do simple create unit test
2020-05-07 14:42:47 -04:00
AlanCoding fd93964953 Changed status tweaks for API validation and encryption
API validation topic:
 - do not set changed=True if the object did not actually change
 - deals with cases where API manipulates data before saving

Warn if encrypted data prevent accurate changed status

Handle false changed case of tower_user password
  password field not present in data

Test changed=True warning with JT/WFJT survey spec defaults
  case for list data in JSON
2020-04-09 09:58:12 -04:00
AlanCoding 0e8f2307fc Remove tower-cli from Zuul CI for AWX collection 2020-04-07 13:31:06 -04:00
AlanCoding 059e744774 Address errors with login and logout in python2
Addresses scenarios when username and password
  were used and collection obtained token

Fix error sendall() arg 1 must be string or buffer

Improve error handling related to authentication
  clear the query after request and before logout
  put response data in error in both cases
2020-03-30 13:48:14 -04:00
AlanCoding 5e595caf5e Add workflow node identifier
Generate new modules WFJT and WFJT node
Touch up generated syntax, test new modules

Add utility method in awxkit

Fix some issues with non-name identifier in
  AWX collection module_utils

Update workflow docs for workflow node identifier

Test and fix WFJT modules survey_spec
Plug in survey spec for the new module
Handle survey spec idempotency and test

add associations for node connections
Handle node credential prompts as well

Add indexes for new identifier field

Test with unicode dragon in name
2020-03-23 22:00:00 -04:00
AlanCoding 362016c91b Fix test errors running locally with Ansible devel 2020-03-20 19:52:13 -04:00
AlanCoding c5297b0b86 Fix sanity error 2020-03-19 08:42:07 -04:00
softwarefactory-project-zuul[bot] afa3b500d3 Merge pull request #6273 from AlanCoding/failure_verbosity
Print module standard out in test failure scenarios

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 17:50:16 +00:00
AlanCoding c054d7c3d7 Automatically hack sys.path to make running tests easier 2020-03-18 09:40:11 -04:00
AlanCoding a1cdc07944 Print module standard out in test failure scenarios 2020-03-12 12:26:54 -04:00
Alan Rominger 768280c9ba [last PR stuff] + Add warning if configs specified in 2 params (#5)
* Lean on API validation for tower_inventory_source arg errors

used for
 - validating needed credential is given
 - missing source_project for scm sources

* Add warning when config is specified in 2 places

Fix up unit tests, address multiple comments re: backwards compatibility, redundant methods, etc.

Update new_name and variables parameters, update unit tests
2020-02-26 09:26:55 -05:00
Alan Rominger 2e4e687d69 Optional tower cli (#3)
* Allow running tests without tower_cli

* patch up test mutability

* Fix test import error, warning mock

* flake8 error

Update documentation for non-converted modules
2020-02-26 09:26:22 -05:00
John Westcott IV 1c505beba6 Converted tower_group
Splitting out tower_inventory_source from tower_group

Copy/Paste typo fix and README update for breaking backwards compatability

Update credential_type module and unit tests
2020-02-26 09:15:04 -05:00
John Westcott IV f89061da41 Updating tower_org to use the new tower_api format
Pass sanity and unit tests, update tests

Remove placeholder test function, convert tower_host module, fix misc typos
2020-02-26 09:14:01 -05:00
beeankha 7c0ad461a5 Further module conversion changes, unit test changes
Multiple module changes

Added on_change callback

Added head_endpoint

Added additional error returns

Respond with a try an ID message if multiple assets found by name via return_none_on_404 kwarg

Diferentiated between login and logout token errors

Added is_job_done method
2020-02-26 09:14:00 -05:00
AlanCoding b9b6dad0b3 Add test for deprecated vault_credential 2020-01-15 09:44:28 -05:00
AlanCoding 081a0fc04e fix other assorted sanity failures 2019-11-26 09:45:54 -05:00
softwarefactory-project-zuul[bot] fed6a86170 Merge pull request #5194 from AlanCoding/inventory_organization
Add organization parameter to tower_inventory_source (and add test logging)

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2019-11-20 18:23:27 +00:00
AlanCoding 1402a2c8a5 Run and fix all sanity tests 2019-11-14 14:45:16 -05:00
AlanCoding 24eae09ed9 Make tower_inventory_source org optional, add tests 2019-10-31 09:46:49 -04:00
Alan Rominger 70269d9a0d Add support for credential_type in tower_credential module (#3820)
* Add support for credential_type

* Finish up credential_type parameter with tests

* make inputs mutually exclusive with other params

* Test credential type with dict input
2019-10-29 11:24:12 -04:00
AlanCoding 98619c5e23 rename awx modules folder to collection 2019-09-27 14:29:04 -04:00