Commit Graph

93 Commits

Author SHA1 Message Date
Bert Blommers
6b0d022925
Techdebt: Replace sure with regular assertions in ELBv2 (#6558) 2023-07-24 12:50:35 +00:00
Marco Braga
bdcc6f3335
ELBv2: describe-target-health: return unavailable target (#6195) 2023-04-17 16:43:14 +00:00
Bert Blommers
27a2e42d9b
Admin: Update Docs to point to getmoto (#5826) 2023-01-07 10:35:14 -01: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
9340335d73
EC2 availability zones in us-west-1: use A and B (#5515) 2022-10-02 13:03:03 +00:00
Bert Blommers
37c5be725a
EC2: Fix us-west-1 availability zones to b and c (#5513) 2022-10-01 22:33:22 +00:00
Bert Blommers
3d913f8f15
MultiAccount support (#5192) 2022-08-13 09:49:43 +00:00
Adam
5aace90385
ELBv2:create_target_group: fix template variable typo (#5147) 2022-05-19 17:35:38 +00:00
Stephanie Manning
b57ce46670
Support all Action types in ELBv2 create_rule and set_rule_priorities responses (#5080) 2022-04-30 11:09:03 +00:00
Bert Blommers
61a5d5ca3b
ELBv2 - enable Tags for create_target_group (#5045) 2022-04-21 19:27:14 +00:00
Viren Nadkarni
14fc1d3e41
ELB: Fix response templates (#5032) 2022-04-16 20:57:02 +00:00
Bert Blommers
d6bec75e43
ELBV2 - Ensure ResourceARN is returned when describing tags (#4990) 2022-03-31 11:40:06 +00:00
Bert Blommers
472b1dab0c
ELBv2 - improve tagging (#4964) 2022-03-23 19:44:12 -01:00
Bert Blommers
47ce689cb7
ELB/ELBv2 improvements (#4956) 2022-03-21 19:55:19 -01:00
Viren Nadkarni
c1c423674c
Remove unused exception argument (#4924) 2022-03-15 11:34:52 -01:00
Viren Nadkarni
131c448756
ELBv2: Fix LoadBalancerNotFound being thrown for listener rules (#4921) 2022-03-15 11:34:19 -01:00
Bert Blommers
29d01c35bc
Update Black + formatting (#4926) 2022-03-10 13:39:59 -01:00
Bert Blommers
bb6fb1200f
ELBv2 - Allow IAM certificates when calling modify_listener (#4823) 2022-02-04 20:59:23 -01:00
Bert Blommers
2fd6f34060
EC2 - VpcEndpointServiceConfiguration (#4815) 2022-01-30 22:00:26 -01:00
Bert Blommers
ed86df6bae
ELBv2 improvements (#4808) 2022-01-29 11:04:14 -01:00
Bert Blommers
43269fc8af
ELBv2 - Support create_listener with ForwardConfig param (#4704) 2021-12-20 16:06:57 -01:00
Hugo Delgado
7b06d74576
ELBV2 - Fix elbv2 modify_rule expects Conditions (#4677) (#4681) 2021-12-12 20:10:15 -01:00
Bert Blommers
17f2a13573
ELBv2 - Store default action when modifying listener (#4589) 2021-11-17 20:36:20 -01:00
Julio Cesar
1e85e16f0f
Fix missing valid_attrs (issue 4529) (#4530) 2021-11-06 11:37:19 -01:00
Bert Blommers
bf242cd382
Feature: ELBv2: create_target_group with TargetType (#4443) 2021-10-19 21:01:00 +00:00
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Bert Blommers
0d0354438e
ELBv2 - Streamline parsing of Actions-parameter in create_rule (#4390) 2021-10-11 21:12:38 +00:00
Shreesha Addala
7d660b236f
Add support for ELBSecurityPolicy-FS-1-2-Res-2020-10 (#4377) 2021-10-07 18:18:02 +00:00
rajinder
71b4b47523
4365 cannot create listener (#4373) 2021-10-06 09:24:59 +00:00
Bert Blommers
7acdfe4feb
Introduce Pylint to check for duplicate test method names (#3684) 2021-08-21 16:33:15 +01:00
Evan O'Connell
25e79c6e67
Fix IsDefault bug in elbv2 describe_rules (#4204) 2021-08-21 05:50:10 +01:00
Bert Blommers
547a1844ed
Tech debt - improve test coverage EC2/ELBv2/Events (#4181) 2021-08-16 15:13:50 +01:00
Evan O'Connell
85dc52bd84
Support all ELBv2 ListenerRule condition types (#4066)
* ELBv2 - ListenerRule condition validation

- ListenerRule condition model now uses upper case field names that
  match input params for boto and CloudFormation.
- BaseResponse._get_params() introduced to make it easier to deal
  with the querystring input params.
2021-07-16 08:01:14 +01:00
Sahil Shah
3ae4c23c23
Transform certificates in listener in expected XML (#4049) 2021-07-01 16:25:40 +01:00
Sahil Shah
3f5408c9d0
Adding support for ForwardConfig property in ListernRule in CloudFormation (#3993)
* Add ssm parsing support for cloudformation stacks

* Start adding unit tests for ssm parameter parsing

* Add tests for code update

* Add tests to parse ssm parameters code

* Fix black lint errors

* Fix bug.

* Need to specify region_name

* region needs to be same

* Use ssm_backends[region] instead of ssm_backend

* StringList -> string

* Linting

* check if servermode tests are on

* Typo

* Added support for ListenerRule. Will remove cruft

* Pushing latest

* Something works

* Put back ripped out code

* Save point. Incase I need more validations

* Revert "Save point. Incase I need more validations"

This reverts commit dac4953335dd9335eddb7a91a63667bc3c17104c.

* Fixed validations and some refactor

* Fix formatting

* Linting

* Cannot refactor if I have to fix all tests

* Remove exceptions for now. Will do in another PR

* Remove validations. Will add in next PR

* Fix broken tests. Almost.:

* Fix all tests. Some sneaky for now.

* Python2 making me write bad code

* OrderedDict.move_to_end() does not work in python2

* Linting

* Add more checks to field in conditions later.

* Unwnated change in FakeListener

* Revert "Unwnated change in FakeListener"

This reverts commit 962c2fdfd76fce999de9feccf1dd1c3ec48c459f.

* Add back default listener rule

* Linting fix

* Fix priority sorting

* Add cloudformation test for edge case

* Add validation for ForwardConfig in Action of ListernRule CF

* use not in

* set the priority template correctly

* Check for boolean in condition

* One more check

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2021-06-09 18:41:18 +01:00
Bert Blommers
43426c71f4
ELBv2 - Simplify tests (#3999) 2021-06-09 16:34:53 +01:00
Sahil Shah
b82096ba37
Add support for AWS::ElasticLoadBalancingV2::ListenerRule (#3969)
* Add ssm parsing support for cloudformation stacks

* Start adding unit tests for ssm parameter parsing

* Add tests for code update

* Add tests to parse ssm parameters code

* Fix black lint errors

* Fix bug.

* Need to specify region_name

* region needs to be same

* Use ssm_backends[region] instead of ssm_backend

* StringList -> string

* Linting

* check if servermode tests are on

* Typo

* Added support for ListenerRule. Will remove cruft

* Pushing latest

* Something works

* Put back ripped out code

* Save point. Incase I need more validations

* Revert "Save point. Incase I need more validations"

This reverts commit dac4953335dd9335eddb7a91a63667bc3c17104c.

* Fixed validations and some refactor

* Fix formatting

* Linting

* Cannot refactor if I have to fix all tests

* Remove exceptions for now. Will do in another PR

* Remove validations. Will add in next PR

* Fix broken tests. Almost.:

* Fix all tests. Some sneaky for now.

* Python2 making me write bad code

* OrderedDict.move_to_end() does not work in python2

* Linting

* Add more checks to field in conditions later.

* Unwnated change in FakeListener

* Revert "Unwnated change in FakeListener"

This reverts commit 962c2fdfd76fce999de9feccf1dd1c3ec48c459f.

* Add back default listener rule

* Linting fix

* Fix priority sorting

* Add cloudformation test for edge case

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2021-06-05 10:04:04 +01:00
Giovanni Torres
867cf078de
feat: transition elbv2 state to active on first describe (#3937)
* refactor: parameterize state in elbv2 template response

* feat: transition load balancer to active on first describe

Closes #3936
2021-05-18 07:52:39 +01:00
Brandon Clodius
81859f9180
(fix) Fixes #3648 (#3649)
* (fix) Fixes #3648

* (fix) formatting

* (review) add assertion for exception thrown
2021-02-02 15:21:16 +00:00
Brian Pandola
cd044ef00b
Remove redundant test code (#3640)
These tests, when run, do not execute any `moto` code. They fail the
parameter validation check in `botocore`, which raises an exception
before ever sending a request.  These tests do not cover or verify
any `moto` behavior and have been removed.
2021-01-31 12:21:24 +00:00
Brian Pandola
779d18e00c
Fix: Golang aws-sdk fails to parse elbv2:CreateLoadBalancer response (#3639)
The `botocore` response parsers are forgiving when it comes to timestamps,
but a real AWS backend does return time zone details for this attribute.

Verified failure/fix using the Go repo included in the issue report.

Fixes #3516
2021-01-31 11:39:11 +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
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
0ab21f62a8 Linting 2020-09-13 19:42:38 +01:00
Bert Blommers
db1d7123f6 List dependencies for services - add integration test to verify 2020-09-13 16:08:23 +01:00
Adrian
73813460b6
Fix condition filtering bug in elbv2.create_rule() (#3092)
* Fix condition filtering bug

* Update test_handle_listener_rules unit test

* Run black
2020-06-27 09:42:32 +01:00
Asher Foa
d9d055c75d Fix more typos. 2020-01-23 10:15:02 -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