Странный pytest с проблемой AWS CDKPython

Программы на Python
Гость
Странный pytest с проблемой AWS CDK

Сообщение Гость »


У меня большой проект на AWS CDK с Python, и я впервые сталкиваюсь с этой проблемой в резюме:
  • Я добавил второй DNS CNAME домена в свой стек.
  • Я запускаю cdk diff, выглядит хорошо.
  • Я развертываю
  • Я проверяю, и выглядит развернутым, как и ожидалось, пока все хорошо.
  • Итак, черт возьми, я забыл написать unites, поэтому продолжаю текущий
    тест для предварительной записи CNAME маршрута 53 я добавил, скопировал ее и изменил значения.
    Проблема: она продолжает терпеть неудачу, примерно после 8 часов попыток изменить способ выполнения теста
    Я решил удалить вторую проверьте второй CNAME и выполните простой тест:

Код: Выделить всё

template.resource_count_is("AWS::Route53::RecordSet", 1)
This above works!
but this does not!

Код: Выделить всё

template.resource_count_is("AWS::Route53::RecordSet", 2)
I'm like what??? I go double check, do a

Код: Выделить всё

cdk synth
I see both!

Код: Выделить всё

cat my-stack.template.json | grep Route53
"Type": "AWS::Route53::RecordSet",
"Type": "AWS::Route53::RecordSet",
Furthermore, I have been like 4 hours looking online to see if there is anything similar or to see if is using a cache template etc., but remember this is deployed and working, also it shows to me on

Код: Выделить всё

cdk synth
etc... :(
  • The original test works and is currently working, the second test is a copy/paste with the values for the second CNAME and diff method name...

Код: Выделить всё

def test_dns1():
template = _my_template()

template.has_resource_properties(
'AWS::Route53::RecordSet',
{
'Name': 'x.x.net.',
'Type': 'CNAME',
'ResourceRecords': [f'{x}-{x}.{region}.elasticbeanstalk.com'],
'TTL': '300',
},
)



Источник: https://stackoverflow.com/questions/781 ... -cdk-issue

Вернуться в «Python»