Check RDS storage type is not io1 (#359)

* Check RDS storage type is not io1

* Rename a test file

Because we're checking not just for "io1" but also anything that starts with "io".

* Make black happy
This commit is contained in:
bqbn 2020-10-08 10:01:17 -07:00 коммит произвёл GitHub
Родитель ef7191f99f
Коммит 68686af1f1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,17 @@
import pytest
from aws.rds.helpers import get_db_instance_id
from aws.rds.resources import rds_db_instances_with_tags
@pytest.mark.rds
@pytest.mark.parametrize(
"rds_db_instance", rds_db_instances_with_tags(), ids=get_db_instance_id,
)
def test_rds_db_instance_storage_type_not_piops(rds_db_instance):
"""PIOPs storage type is expensive. Cloudops recommends using gp2 type with
a volume size that offers the same IOPs as the desired PIOPs type.
"""
assert not rds_db_instance["StorageType"].startswith(
"io"
), f"{rds_db_instance['DBInstanceIdentifier']} uses PIOPs storage type with IOPs of {rds_db_instance['Iops']}"