def run_sample(): subscriber.update_subscription_with_dead_letter_policy( PROJECT_ID, TOPIC, SUBSCRIPTION_DLQ, DEAD_LETTER_TOPIC, UPDATED_MAX_DELIVERY_ATTEMPTS, )
def test_update_dead_letter_policy(subscriber_client, topic, subscription_dlq, dead_letter_topic, capsys): _ = subscriber.update_subscription_with_dead_letter_policy( PROJECT, TOPIC, SUBSCRIPTION_DLQ, DEAD_LETTER_TOPIC) out, _ = capsys.readouterr() assert "max_delivery_attempts: 20" in out
def test_update_dead_letter_policy(subscription_dlq, dead_letter_topic, capsys): _ = subscriber.update_subscription_with_dead_letter_policy( PROJECT_ID, TOPIC, SUBSCRIPTION_DLQ, DEAD_LETTER_TOPIC, UPDATED_MAX_DELIVERY_ATTEMPTS) out, _ = capsys.readouterr() assert dead_letter_topic in out assert subscription_dlq in out assert f"max_delivery_attempts: {UPDATED_MAX_DELIVERY_ATTEMPTS}" in out