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 14
14
import os
15
15
import uuid
16
16
17
- from flaky import flaky
17
+ import pytest
18
18
19
19
from create_instance import main
20
20
21
21
PROJECT = os .environ ['GCLOUD_PROJECT' ]
22
22
BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
23
- INSTANCE_NAME = 'test-instance-' + str (uuid .uuid4 ())
24
23
25
24
26
- @flaky
25
+ @pytest . mark . flaky ( max_runs = 3 , min_passes = 1 )
27
26
def test_main (capsys ):
27
+ instance_name = 'test-instance-{}' .format (uuid .uuid4 ())
28
28
main (
29
29
PROJECT ,
30
30
BUCKET ,
31
31
'us-central1-f' ,
32
- INSTANCE_NAME ,
32
+ instance_name ,
33
33
wait = False )
34
34
35
35
out , _ = capsys .readouterr ()
36
36
37
37
assert "Instances in project" in out
38
38
assert "zone us-central1-f" in out
39
- assert INSTANCE_NAME in out
39
+ assert instance_name in out
40
40
assert "Deleting instance" in out
You can’t perform that action at this time.
0 commit comments