Commit Graph

85 Commits

Author SHA1 Message Date
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Bert Blommers
e9a4100324
Rewrite deprecated CloudFormation tests (#3842) 2021-10-04 13:47:40 +00:00
Bert Blommers
f17b4a3904
Rewrite deprecated Autoscaling tests (#3907) 2021-09-22 18:05:28 +00:00
mello7tre
edca235623
Added AutoScalingGroup LifeCycleHook support (fake) (#4259) 2021-09-02 14:10:11 +01:00
mello7tre
cfc793014f
Fix/asg attach instances (#4258) 2021-09-01 18:50:53 +01:00
Ray Myers
4ae9b0e253
Implement AutoScaling resume_processes and correct behavior of suspend_processes (#4133)
* Implement AutoScaling resume_processes and correct behavior of suspend_processes
2021-08-04 06:57:21 +01:00
Ray Myers
9bd38f8480
Add autoscaling delete_tags (#4122) 2021-08-03 08:00:26 +01:00
Gianluca Pacchiella
273d632515
Fix/autoscaling elb interaction (#3757)
* Add minimal failing test case.

* Improve ELB instance ids handling.

We need to handle the instances originated by an autoscaling group differently.
2021-04-30 09:29:20 +01:00
Brian Pandola
e8f1522d1a
Improve autoscaling:CreateLaunchConfiguration request validation (#3687)
AWS requires certain parameters to be mutually inclusive.

Moto wasn't doing anything with the InstanceId parameter, which is now made
clear with a TODO.
2021-02-14 11:38:03 +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
Brian Pandola
9e1fcac9d4
Use known AMI in internal tests (#3620)
Moto's implementation of autoscaling:CreateLaunchConfiguration is a little too loose,
allowing the ImageId parameter to be omitted and defaulting it to None, which results
in dozens of deprecation warnings:

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

This commit refactors calls to CreateLaunchConfiguration to explicitly pass in a known
AMI ImageId in order to avoid these warnings.

The integrity of the tests is unaffected by this change.
2021-01-27 19:49:33 +00:00
Bert Blommers
77dd35e3b8
Use known ImageID in internal tests (#3555) 2021-01-13 09:02:11 +00:00
Bert Blommers
273ca63d59 Linting 2020-11-11 15:55:37 +00:00
Matěj Cepl
5697ff87a8 Back to Black 2020-11-10 14:12:38 +01:00
Matěj Cepl
ea489bce6c Finish porting from nose to pytest. 2020-11-10 08:25:05 +01: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
Bert Blommers
db1d7123f6 List dependencies for services - add integration test to verify 2020-09-13 16:08:23 +01:00
Kevin Frommelt
55b02c6ee9
Add support for Launch Templates in Auto Scaling Groups (#3236)
* Add support for Launch Templates in Auto Scaling Groups

* Use named parameters, simplify parameter validation
2020-08-26 15:15:07 +01:00
Denver Janke
9618e29ba9
Always call update ELBs for ASGs (#2980) 2020-05-11 07:44:26 +01:00
DenverJ
d745dfd3d2 Implement enter_standby, exit_standby and terminate_instance_in_auto_scaling_group 2020-04-13 10:54:13 +10:00
DenverJ
965046aa39 Fix formatting 2020-04-12 17:08:40 +10:00
DenverJ
593e5dc86a Add instance-id filter to describe_auto_scaling_instances 2020-04-12 13:44:16 +10:00
Asher Foa
db559e7e06 Fix some typos 2020-01-14 09:55:32 -08:00
Fabio Dias
743dd46399 black linting 2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5 ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630 Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id 2019-12-16 19:56:11 -05:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Steve Pulec
7ec3d43e0c
Merge pull request #2319 from acsbendi/autoscaling-group-from-instance
Implemented creating Auto Scaling group from instance
2019-07-20 00:06:22 -04:00
Steve Pulec
e052219161
Merge pull request #2315 from bkovacki/asg_min_max_size_update_desired_capacity_change
Handle change of ASG desired capacity on min and max size update
2019-07-19 23:38:16 -04:00
acsbendi
201d9fb491 Created test for terminating instance in an Auto Scaling group. 2019-07-18 20:30:07 +02:00
acsbendi
4ca0bd807f Created tests for calling CreateAutoScalingGroup with an instance id. 2019-07-17 20:15:59 +02:00
Berislav Kovacki
1b3157ced0 Handle change of ASG desired capacity on min and max size update
A change in UpdateAutoScalingGroup:
* if a value for MinSize is specified without specifying a value for
DesiredCapacity, and the new MinSize is larger than the current size of
the group, set the group's DesiredCapacity to the new MinSize value
* if a value for MaxSize is specified without specifying a value for
DesiredCapacity, and the new MaxSize is smaller than the current size of
the group, set the group's DesiredCapacity to the new MaxSize value
2019-07-16 09:12:03 +02:00
David
868d0107bf Autoscaling instance azs (#2030)
* Add instance AZ support in autoscaling

* Resolve py36-py27 format string error in test_autoscaling
2019-05-25 11:18:16 +01:00
Robert Lewis
570b73691b Add requestid checking for autoscaling 2019-01-20 22:54:05 -08:00
Ka Wai Wan
df2120f38c Add instance protection support in autoscaling, with tests 2018-11-24 02:32:53 -08:00
Jim Shields
baedbfa8ca Fix test_suspend_processes
* Add `region_name` to the client to be consistent with other tests
* Add `VPCZoneIdentifier` to the ASG creation (AZ or VPC is required)
* Add myself as a contributor
2018-03-09 18:00:23 -05:00
Jim Shields
bfeea00774 Fix #1370: Implement suspend_processes in AutoScaling service 2018-03-09 16:55:30 -05:00
Steve Pulec
9e0b8da6cb
Merge pull request #1413 from captainkerk/autoscaling-subnet-or-az-is-required
AWS API raises an exception if both AZ and VPCZoneIdentifier params a…
2018-03-06 22:42:49 -05:00
Jack Danger
52f0d0a4e4 importing sure in tests that require it 2018-01-20 19:44:22 -08:00
captainkerk
144611ff99 define setup_networking_deprecated() method to create supporting
resources for tests that use deprecated methods
2017-12-29 03:00:53 +00:00
captainkerk
fe1293ee5b remove unnecessary empty line 2017-12-27 20:31:57 +00:00
captainkerk
59cf81fd56 AWS API raises an exception if both AZ and VPCZoneIdentifier params are empty. mock that exception, fix
tests to follow that pattern.
2017-12-27 19:17:59 +00:00
Jack Danger
aaa0202d08 Merge pull request #1285 from captainkerk/autoscaling-load-balancer-target-group-support
Add ELBv2 Support  to Autoscaling Service
2017-10-23 09:41:52 -07:00
captainkerk
993b092083 add target_group support to autoscaling service 2017-10-21 17:29:22 +00:00
Paul Carleton
685e9163a8 Add set-instance-health support 2017-10-20 11:26:23 -07:00
Paul Carleton
21c3775cb1 Add health status to autoscaling instances 2017-10-20 11:26:23 -07:00
John Kerkstra
b8bb6c2dcf Fix bug with update_attached_elbs (#1266)
* fixed bug where we were using elb_backend.describe_load_balancers
incorrectly, returning all available load balancers when we wanted none.

* improve skip, clean up tests
2017-10-16 22:04:47 -07:00
John Kerkstra
0af3427c15 Add autoscaling load balancer methods (#1265)
* add attach_load_balancers, detach_load_balancers,
describe_load_balancers methods

* prefer using amzn_request_id decorator to generate unique request ids
2017-10-16 19:07:00 -07:00
John Kerkstra
5ef236e966 Add attach_ and detach_instances methods to autoscaling service (#1264)
* add detach_instances functionality to autoscaling service

* use ASG_NAME_TAG constant

* cleanup models method a bit, add mocked DetachInstancesResult to
response template

* add attach_instances method
2017-10-16 17:09:51 -07:00
William Richard
c5ce2848be
Boto3 and cloudformation have different keys for auto scaling tags - handle that gracefully 2017-06-21 15:59:03 -04:00