File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1212# limitations under the License.
1313
1414import os
15- import re
15+ import uuid
1616
17- from gcp_devrel . testing . flaky import flaky
17+ from flaky import flaky
1818
1919from create_instance import main
2020
2121PROJECT = os .environ ['GCLOUD_PROJECT' ]
2222BUCKET = 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
Original file line number Diff line number Diff line change 11pytest==5.3.2
2- gcp-devrel-py-tools==0.0.15
32flaky==3.6.1
You can’t perform that action at this time.
0 commit comments