Skip to content

Commit

Permalink
ci: try to stop channel again before deleting it in the test (#36)
Browse files Browse the repository at this point in the history
* Try to stop channel again before deleting it in the test.

* docs(samples): try to stop channel again before deleting it in the test.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
irataxy and gcf-owl-bot[bot] authored Apr 29, 2022
1 parent d8179d6 commit 5328b20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def test_channel_operations(capsys: pytest.fixture) -> None:
delete_channel.delete_channel(
project_name, location, next_channel_id
)
except FailedPrecondition as e:
print(f"Ignoring FailedPrecondition, try to stop channel: {e}")
try:
stop_channel.stop_channel(
project_name, location, next_channel_id
)
except FailedPrecondition as e:
print(f"Ignoring FailedPrecondition, details: {e}")
except NotFound as e:
print(f"Ignoring NotFound, details: {e}")
except NotFound as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import uuid

from google.api_core.exceptions import NotFound
from google.api_core.exceptions import FailedPrecondition, NotFound
import pytest

import create_input
Expand All @@ -38,6 +38,8 @@ def test_input_operations(capsys: pytest.fixture) -> None:
if utils.is_resource_stale(response.create_time):
try:
delete_input.delete_input(project_name, location, next_input_id)
except FailedPrecondition as e:
print(f"Ignoring FailedPrecondition, details: {e}")
except NotFound as e:
print(f"Ignoring NotFound, details: {e}")

Expand Down

0 comments on commit 5328b20

Please sign in to comment.