Commit Graph

16 Commits

Author SHA1 Message Date
Bert Blommers
a7f3b367b4 Introduce mock_aws() (#7194) 2024-01-27 19:38:09 +00:00
tungol
55c589072f
Admin: sorting imports with ruff (#7075) 2023-11-30 14:55:51 -01:00
Bert Blommers
90e8bb1313
Techdebt: Improve/fix exception handling in tests (#7011) 2023-11-09 22:17:46 -01:00
kbalk
45dfb54469
Techdebt: Replace sure with regular assertions in OpsWorks (#6673)
Co-authored-by: Karri Balk <kbalk@users.noreply.github.com>
2023-08-16 10:10:41 +00:00
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Brian Pandola
f4b81e69b8
Address pytest warnings (#3629)
* Address `boto` deprecation warnings

This commit eliminates the following warning:

../boto/ec2/connection.py:582:
  PendingDeprecationWarning: The current get_all_instances implementation will be replaced with get_all_reservations.

`boto` isn't likely to ever make good on this warning, but doing the replacement will
declutter the `moto` test output.

* Remove `invoke_lambda` tracebacks from unit test logging

If an exception is encountered, the details are returned in the response payload.
Printing the traceback was just adding noise to the pytest output.

* Use known AMIs in unit tests

This commit eliminates the following warning in the pytest output:

`PendingDeprecationWarning: Could not find AMI with image-id:ami-123456, in the near future this will cause an error.`

Known, pre-loaded AMI image ids are used instead of random ids that don't actually
exist in the moto backend.  The integrity of the tests is unaffected by this change.

A test has been added to provide explicit coverage of the PendingDeprecationWarning
raised when an invalid AMI image id is passed to moto.
2021-01-29 11:31:56 +00:00
Rigas Papathanasopoulos
4abd88f95c
Fix the online status in OpsWorks
When an instance is running, OpsWorks reports its status as "online"
[1], while EC2 reports it as "running". Until now, moto copied the EC2
instance's status as is. This commit introduces the converts the running
status to online when returned by OpsWorks.

[1]: https://docs.aws.amazon.com/cli/latest/reference/opsworks/describe-instances.html
2020-05-07 10:57:27 +03:00
Stephan Huber
0527e88d46 Merge remote-tracking branch 'upstream/master' 2019-12-23 08:38:53 +01:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Stephan
e51d1bfade merge 2018-12-21 12:28:56 +01:00
Loukas Leontopoulos
bf2ba0b680 Add more exception tests for opsworks 2018-02-19 15:22:53 +02:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Vladimir Sudilovsky
3a8268fd56 opsworks/tests: add missing region_name='us-east-1' in client init 2016-04-18 16:08:08 -04:00
Vladimir Sudilovsky
9ce1890f35 opsworks/tests: init boto3.client with region_name='us-east-1' 2016-04-18 16:03:13 -04:00
Vladimir Sudilovsky
1ce22068ea opsworks: impl start_instance, describe_instances 2016-04-18 15:44:21 -04:00
Vladimir Sudilovsky
09ca1b6e0c opsworks: impl create_instance 2016-04-15 15:44:38 -04:00