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
2 people authored and dizcology committed Sep 15, 2023
1 parent c1acfec commit 4b51400
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions video/live-stream/channel_test.py
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
4 changes: 3 additions & 1 deletion video/live-stream/input_test.py
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 4b51400

Please sign in to comment.