Commit Graph

26 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
1a8ddc0f2b
Techdebt: Replace string-format with f-strings (for tests dirs) (#5678) 2022-11-17 21:41:08 -01: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
Matěj Cepl
77dc60ea97 Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01: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
b7ae704ad2 Add opsworks app mocks (#1481)
* Add implementation for OpsWorks create_app and describe_apps

* Fix the name of the test

* Add some more exception tests
2018-03-21 09:05:57 -07:00
Loukas Leontopoulos
bf2ba0b680 Add more exception tests for opsworks 2018-02-19 15:22:53 +02:00
Loukas Leontopoulos
4393a4f76c Change checks for handling same layer name un different stack 2017-09-25 14:49:08 +03:00
Loukas Leontopoulos
7599fd5dc0 Add test_case for layer per stack
Add a new test case for creating a layer with the same name under a different stack.
2017-09-25 14:31:29 +03:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
Steve Pulec
1b4bb156e4 Freezetime. 2016-11-23 19:23:47 -06:00
Vladimir Sudilovsky
768f1adb4f opsworks: py2.6 compat str.format 2016-04-18 16:36:30 -04: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
Vladimir Sudilovsky
2fe5b77861 opsworks: impl create_layers; describe_layers 2016-04-14 16:28:53 -04:00
Vladimir Sudilovsky
165bab0f97 opsworks: implement create_stack 2016-04-14 10:37:13 -04:00