File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1414import os
1515import uuid
1616
17- from flaky import flaky
17+ import pytest
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 ())
2423
2524
26- @flaky
25+ @pytest . mark . flaky ( max_runs = 3 , min_passes = 1 )
2726def test_main (capsys ):
27+ instance_name = 'test-instance-{}' .format (uuid .uuid4 ())
2828 main (
2929 PROJECT ,
3030 BUCKET ,
3131 'us-central1-f' ,
32- INSTANCE_NAME ,
32+ instance_name ,
3333 wait = False )
3434
3535 out , _ = capsys .readouterr ()
3636
3737 assert "Instances in project" in out
3838 assert "zone us-central1-f" in out
39- assert INSTANCE_NAME in out
39+ assert instance_name in out
4040 assert "Deleting instance" in out
You can’t perform that action at this time.
0 commit comments