Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-enable and update integration tests for aws_ssm_parameter_store (a…
…nsible-collections#1241) Re-enable and update integration tests for aws_ssm_parameter_store SUMMARY Fixes exception when description was updated within passing value. Rewrite and enable integration tests for module Add some return values While the integration tests don't include coverage for the more complex options for aws_ssm_parameter_store these have never existed. Having something enabled gives future module developers something to build upon. ISSUE TYPE Bugfix Pull Request COMPONENT NAME aws_ssm_parameter_store ADDITIONAL INFORMATION Exception: TASK [aws_ssm_parameter_store : Update description] **************************** task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/aws_ssm_parameter_store-071mpr89-ÅÑŚÌβŁÈ/tests/integration/targets/aws_ssm_parameter_store/tasks/main.yml:64 Using module file /root/ansible_collections/community/aws/plugins/modules/aws_ssm_parameter_store.py Pipelining is enabled. <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /usr/bin/python3.10 && sleep 0' The full traceback is: Traceback (most recent call last): File "/tmp/ansible_aws_ssm_parameter_store_payload_13s3_ao3/ansible_aws_ssm_parameter_store_payload.zip/ansible_collections/community/aws/plugins/modules/aws_ssm_parameter_store.py", line 160, in update_parameter File "/usr/local/lib/python3.10/dist-packages/botocore/client.py", line 357, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/lib/python3.10/dist-packages/botocore/client.py", line 648, in _make_api_call request_dict = self._convert_to_request_dict( File "/usr/local/lib/python3.10/dist-packages/botocore/client.py", line 696, in _convert_to_request_dict request_dict = self._serializer.serialize_to_request( File "/usr/local/lib/python3.10/dist-packages/botocore/validate.py", line 293, in serialize_to_request raise ParamValidationError(report=report.generate_report()) botocore.exceptions.ParamValidationError: Parameter validation failed: Invalid type for parameter Value, value: None, type: <class 'NoneType'>, valid types: <class 'str'> fatal: [testhost]: FAILED! => { "boto3_version": "1.17.0", "botocore_version": "1.20.0", "changed": false, "invocation": { "module_args": { "aws_access_key": "ASIA6CCDWXDOM4BEFFL4", "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "debug_botocore_endpoint_logs": true, "decryption": true, "description": "This is an updated example", "ec2_url": null, "key_id": "alias/aws/ssm", "name": "/ansible-test-12184966-mchappel/Simple", "overwrite_value": "changed", "profile": null, "region": "us-east-1", "security_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "string_type": "String", "tier": "Standard", "validate_certs": true, "value": null } }, "msg": "setting parameter: Parameter validation failed:\nInvalid type for parameter Value, value: None, type: <class 'NoneType'>, valid types: <class 'str'>", "resource_actions": [ "ssm:GetParameter" ] } Reviewed-by: Alina Buzachis <None>
- Loading branch information