Commit Graph

3730 Commits

Author SHA1 Message Date
Mike Grima
62da0839ae
Merge pull request #2078 from kyledecot/kd-describe-clusters
Returns an empty list when the cluster does not exist
2019-03-28 16:23:17 -07:00
Nick Venenga
d181897ec9
Add proper failure response to describe_clusters 2019-03-28 14:50:48 -04:00
Kyle Decot
79e47fd98f
Returns an empty list when the cluster does not exist 2019-03-28 14:50:48 -04:00
Mike Grima
78d7d67751
Merge pull request #2127 from mikegrima/testfixes
Fixing broken tests #2126
2019-03-28 11:42:09 -07:00
Mike Grima
921b5a3227 Fixing broken tests #2126
- KMS
- S3
- CloudFormation (Thanks kgutwin!)
2019-03-28 10:09:03 -07:00
Hugo Lopes Tavares
7c62f4a75c Add test to CloudFormation and PrimaryPrivateIpAddress GetAtt
This test would raise an error before d4e39146b7
2019-03-27 16:28:18 -04:00
Hugo Lopes Tavares
d4e39146b7 Make sure every NetworkInterface has a private IP
AWS always assigns a primary IP address to Network Interfaces.
Using a test account (modified the IP):

    >>> import boto
    >>> vpc = boto.connect_vpc()
    >>> eni = vpc.create_network_interface(subnet_id)
    >>> eni.private_ip_addresses
    [PrivateIPAddress(10.1.2.3, primary=True)]
2019-03-27 16:27:10 -04:00
Jessie Nadler
497965fadc Return InstanceProfile arn instead of NotImplementedError for get_cfn_attribute 2019-03-26 14:36:31 -04:00
Jessie Nadler
8644b2ff1d Add get_cfn_attribute support for ECS Cluster and Service 2019-03-25 19:14:05 -04:00
Tomoya Iwata
11ff548d14 fix #2113
moto must return Http status code 201 when lambda publish_version has succeeded
2019-03-17 17:54:34 +09:00
Robert Jensen
9ed80f14e8 fix coverage, update IMPLEMENTATION_COVERAGE 2019-03-12 17:52:34 -04:00
Robert Jensen
c7d3e1f8b6 Merge remote-tracking branch 'upstream/master' into feat/cognitoidp-add-update-identity-provider 2019-03-12 17:37:07 -04:00
Andy Tumelty
d53626ad9a Add support for iam update_user
This covers both the NewPath and NewUserName parameters for update_user, but
without regex validation for these values.
2019-03-12 17:23:32 +00:00
Mike Grima
64152f4cda
Merge pull request #2073 from woohooyayaya/master
fix creation date in create key response to unix timestamp type
2019-03-11 15:58:19 -07:00
Mike Grima
6ecb840c61
Merge pull request #2100 from gilbsgilbs/non-versioned-bucket-consitency
[S3] Support null version ids for buckets with versioning disabled
2019-03-11 14:13:26 -07:00
Mike Grima
53b94606de
Merge pull request #2103 from mikegrima/config
Fixed validation bugs in put_configuration_recorder
2019-03-11 13:58:54 -07:00
Mike Grima
87a54b9d81
Merge pull request #2077 from markchalloner/mark-route53-upsert-type
Check record type when upserting.
2019-03-11 13:50:37 -07:00
Mike Grima
fe42309534
Merge pull request #2096 from tay-bird/fix-describe-volumes-response-with-no-tags
Fix describe volumes response with no tags
2019-03-11 13:44:15 -07:00
Mike Grima
6d67418c41 Fixed validation bugs in put_configuration_recorder 2019-03-11 13:25:36 -07:00
Gilbert Gilb's
dedb53371e [S3] Support null version ids for buckets with versioning disabled 2019-03-09 10:21:49 +01:00
Tay Frost
7b236c4ded bugfix ebs volume tag behaviour
This commit modifies the response format of the ec2 calls
`create_volume` and `describe_volumes`. Previously, these calls would
always include a `Tags` key in the response, even when a volume has no tags.
Now, the `Tags` key will not be included in the response if the volume
has no tags.

When an EBS volume has no tags, calls to the aws ec2 endpoints `create_volume`
and `describe_volumes` do not include the `Tags` key in the
`response.Volumes[]` object.

However, moto does include the `Tags` key in this case. This discrepancy
in behaviour can result in code passing a moto test but failing in
production.

Sample snippets that trigger this condition:

```
def create_volume_and_then_get_tags_from_response():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    keys = volume_response['Keys']
```

```
def create_volume_and_then_get_tags_from_describe_volumes():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    volume_describe_response = client.describe_volumes()
    keys = volume_describe_response['Volumes'][0]['Keys']
```

Both sample snippets will succeed in a moto test, but fail with a
`KeyError` when using the aws api.
2019-03-07 17:31:45 -05:00
Tay Frost
15b3ede3cc Add test for case where ebs volume has no tags.
This commit adds a test for a case where an EBS volume has no tags. When
an EBS volume has no tags, calls to the aws ec2 endpoints `create_volume`
and `describe_volumes` do not include the `Tags` key in the
`response.Volumes[]` object.

However, moto does include the `Tags` key in this case. This discrepancy
in behaviour can result in code passing a moto test but failing in
production.

Sample snippets that trigger this condition:

```
def create_volume_and_then_get_tags_from_response():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    keys = volume_response['Keys']
```

```
def create_volume_and_then_get_tags_from_describe_volumes():
    client = boto3.client('ec2', region_name='us-east-1')
    volume_response = client.create_volume(
        Size=10,
        AvailabilityZone='us-east-1a'
    )
    volume_describe_response = client.describe_volumes()
    keys = volume_describe_response['Volumes'][0]['Keys']
```

Both sample snippets will succeed in a moto test, but fail with a
`KeyError` when using the aws api.
2019-03-07 17:25:18 -05:00
Mike Grima
5a20755565
Merge pull request #2095 from mikegrima/configfix
Add Config mock to init
2019-03-07 13:19:34 -08:00
Mike Grima
d6022417f5 Forgot to add Config to the __init__.py. 2019-03-07 12:53:01 -08:00
Mike Grima
7eaf6bf595
Merge pull request #2062 from domtes/fix_copy_key_with_unicode
Fixing S3 copy_key error when using unicode.
2019-03-04 11:48:46 -08:00
Mike Grima
ef74e19000
Merge pull request #2074 from jmehnle/patch-1
IMPLEMENTATION_COVERAGE.md: SQS get_queue_url is implemented
2019-03-04 11:41:13 -08:00
Mike Grima
9158c1356f
Merge pull request #2091 from whummer/fix/dict-sorted
Fix sorting of log groups
2019-03-04 11:04:42 -08:00
Mike Grima
848a4f451e
Merge pull request #2087 from mikegrima/config
Basic AWS Config service support.
2019-03-04 11:04:12 -08:00
Domenico Testa
74ff2ccc95 Reformatting to get better coverage results 2019-03-04 09:16:43 +01:00
Mike Grima
bc116ab750 Basic AWS Config service support. 2019-03-02 18:37:20 -08:00
Waldemar Hummer
840045c688 fix sorting of log groups 2019-03-02 18:56:49 -05:00
Mike Grima
b4fcbd79d8
Merge pull request #2081 from yan12125/patch-1
Bump idna to 2.8
2019-03-02 13:31:31 -08:00
Mark Challoner
d61ce0584b
Check record type when upserting.
Previously this was not checked so an existing record (e.g. with type A) would be overwritten on upsert by a record with the same name but different type (e.g. TXT).

This commit also:

* publicizes the type variable appending the underscore affix (required to maintain compatibility with CloudFormation which sets type as the CF type),
* fixes a wrong assumption in tests that UPSERT applies a change to Type (it creates a distinct record instead),
* Updates ACM model to use serial_number instead of deprecated and remove serial causing Travis failures.
2019-03-01 16:44:50 +00:00
Chih-Hsuan Yen
9992e23e68
Fix compatibility with cryptography 2.6
[1] https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#26---2019-02-27
2019-03-01 19:22:26 +08:00
Chih-Hsuan Yen
7b7cf5bd11
Bump idna to 2.8
requests 2.21.0 allows idna 2.8 [1]

[1] 8761e9736f
2019-03-01 17:14:18 +08:00
Julian Mehnle
c43f311a5e
IMPLEMENTATION_COVERAGE.md: SQS get_queue_url is implemented
SQS get_queue_url was implemented in dbf2368aa.
2019-02-25 21:10:36 -08:00
woohooyayaya
e6e7f235ac
fix creation date in create key response to unix timestamp type 2019-02-25 16:14:24 -08:00
Mike Grima
09855801ba
Merge pull request #2019 from acsbendi/launch_index
Correctly returning ami launch index
2019-02-25 12:16:40 -08:00
Mike Grima
3920f0e16b
Merge pull request #2060 from gregsterin/better-support-for-ddb-expressions
support a bit more of the dynamoDB ConditionExpression syntax
2019-02-25 10:03:02 -08:00
Mike Grima
7f0b1d6795
Merge pull request #2061 from rubelw/master
Update kms, iam and lambda to work with terraform
2019-02-25 09:58:55 -08:00
William Rubel
a5208222b4 Fixing list entities for policy 2019-02-18 21:29:09 -06:00
William Rubel
59deb4d6c0 Fixing list entities for policy 2019-02-18 21:25:29 -06:00
William Rubel
e9d8021c86 Fixing list entities for policy 2019-02-18 21:20:29 -06:00
William Rubel
37845e41a6 Trying to improve coverage 2019-02-18 09:44:48 -06:00
William Rubel
c46bc9ae83 Trying to improve coverage 2019-02-18 09:15:07 -06:00
William Rubel
e229d248ad Trying to improve coverage 2019-02-18 08:52:37 -06:00
William Rubel
8048e39dc0 Fix policy date 2019-02-17 22:32:39 -06:00
William Rubel
ce7b5ebf54 Fix policy date 2019-02-17 21:37:33 -06:00
William Rubel
37a765db8d Fix policy date 2019-02-17 17:12:27 -06:00
William Rubel
63b692356d Fix policy date 2019-02-17 16:49:54 -06:00