Skip to content

Commit a031120

Browse files
authored
switch to regular flaky in compute (GoogleCloudPlatform#3326)
1 parent 6314cbb commit a031120

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

compute/api/create_instance_test.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# limitations under the License.
1313

1414
import os
15-
import re
15+
import uuid
1616

17-
from gcp_devrel.testing.flaky import flaky
17+
from flaky import flaky
1818

1919
from create_instance import main
2020

2121
PROJECT = os.environ['GCLOUD_PROJECT']
2222
BUCKET = os.environ['CLOUD_STORAGE_BUCKET']
23+
INSTANCE_NAME = 'test-instance-' + str(uuid.uuid4())
2324

2425

2526
@flaky
@@ -28,14 +29,12 @@ def test_main(capsys):
2829
PROJECT,
2930
BUCKET,
3031
'us-central1-f',
31-
'test-instance',
32+
INSTANCE_NAME,
3233
wait=False)
3334

3435
out, _ = capsys.readouterr()
3536

36-
expected_output = re.compile(
37-
(r'Instances in project .* and zone us-central1-.* - test-instance'
38-
r'.*Deleting instance.*done..$'),
39-
re.DOTALL)
40-
41-
assert re.search(expected_output, out)
37+
assert "Instances in project" in out
38+
assert "zone us-central1-f" in out
39+
assert INSTANCE_NAME in out
40+
assert "Deleting instance" in out

compute/api/requirements-test.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pytest==5.3.2
2-
gcp-devrel-py-tools==0.0.15
32
flaky==3.6.1

0 commit comments

Comments
 (0)