Skip to content

Commit 6421e39

Browse files
Jon Wayne Parrottbusunkim96
authored andcommitted
Fix test conflict.
Change-Id: I67e149dc43ebdb11144ac3839e062aa4668ebb2e
1 parent afead75 commit 6421e39

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

samples/snippets/export_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ def _():
4848

4949

5050
def test_create(cloud_config, capsys):
51+
# Delete the sink if it exists, otherwise the test will fail in conflit.
52+
client = logging.Client()
53+
sink = client.sink(TEST_SINK_NAME)
54+
if sink.exists():
55+
sink.delete()
56+
5157
export.create_sink(
5258
TEST_SINK_NAME,
5359
TEST_SINK_FILTER,
@@ -56,6 +62,7 @@ def test_create(cloud_config, capsys):
5662

5763
out, _ = capsys.readouterr()
5864
assert TEST_SINK_NAME in out
65+
assert sink.exists()
5966

6067

6168
def test_update(example_sink, capsys):

0 commit comments

Comments
 (0)