You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration
Sam Doran 511d3110f7
Only change expiration date if it is different (#38885) (#39575)
* Only change expiration date if it is different

Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.

* Improve formatting on user tests

* Add integration test for expiration

* Add changelog fragment

* Improve integration test

Skip macOS and use getent module for validating expiration date.

* Fix expiration change for FreeBSD

* Don't use datetime since the total_seconds method isn't available on CentOS 6

* Use better name for expiration index field

Use separate tasks for verifying expiration date on BSD

* Use calendar.timegm() rather than time.mktime()

calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC

* Mark tests as destructive and use test for change status

* Fix account expiration for FreeBSD

Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.

Greatly simply comparing desired  and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.

(cherry picked from commit 5a6bdef76b)
7 years ago
..
group_vars Added support for new Ansible Infra (network_cli plugin, cliconf, module utils cleanup and test) for dellos10 Support t (#34915) 7 years ago
host_vars Simplify Windows versions in ansible-test. 7 years ago
roles Added support for new Ansible Infra (network_cli plugin, cliconf, module utils cleanup and test) for dellos10 Support t (#34915) 7 years ago
targets Only change expiration date if it is different (#38885) (#39575) 7 years ago
cloud-config-aws.yml.template Add region to ansible-test AWS cloud config. (#30733) 7 years ago
cloud-config-azure.yml.template Fix Azure config template. 7 years ago
cloud-config-cs.ini.template Add support for cloud tests to ansible-test. (#24315) 8 years ago
cloud-config-gcp.yml.template [cloud] New GCP module: DNS Managed Zones (gcp_dns_managed_zone.py) (#35014) 7 years ago
dellos6.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos9.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos10.yaml Added support for new Ansible Infra (network_cli plugin, cliconf, module utils cleanup and test) for dellos10 Support t (#34915) 7 years ago
integration.cfg Fix ansible-test config management. 7 years ago
integration_config.yml Fix pip integration test. 7 years ago
inventory ACI: Support validate_certs, use_ssl and use_proxy (#35146) 7 years ago
inventory.networking.template Reflect new process for network integration tests (#35577) 7 years ago
inventory.remote.template Add support for OS X CI on Shippable. (#17160) 8 years ago
inventory.winrm.template Increase python version coverage for tests. (#24762) 8 years ago
network-integration.cfg Increase socket connect retry timeout for integration test (#30681) 7 years ago
target-prefixes.network ACI: Make network testing work out-of-the-box (#35116) 7 years ago
windows-integration.cfg Fix ansible-test config management. 7 years ago