File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ func (d *Deployer) Down() error {
36
36
return nil
37
37
}
38
38
39
+ if err := d .DumpClusterLogs (); err != nil {
40
+ klog .Warningf ("Dumping cluster logs at the end of Up() failed: %v" , err )
41
+ }
42
+
39
43
// If the GCP projects are acquired from Boskos, release the projects and
40
44
// rely on boskos-janitor to do clean-ups for them.
41
45
if d .totalBoskosProjectsRequested > 0 {
Original file line number Diff line number Diff line change @@ -38,24 +38,26 @@ func (d *Deployer) Up() error {
38
38
return err
39
39
}
40
40
41
- defer func () {
41
+ if err := d .CreateNetwork (); err != nil {
42
+ return err
43
+ }
44
+ if err := d .CreateClusters (); err != nil {
42
45
if d .RepoRoot == "" {
43
46
klog .Warningf ("repo-root not supplied, skip dumping cluster logs" )
44
- return
45
47
}
46
48
if err := d .DumpClusterLogs (); err != nil {
47
49
klog .Warningf ("Dumping cluster logs at the end of Up() failed: %v" , err )
48
50
}
49
- }()
50
-
51
- if err := d .CreateNetwork (); err != nil {
52
- return err
53
- }
54
- if err := d .CreateClusters (); err != nil {
55
51
return fmt .Errorf ("error creating the clusters: %w" , err )
56
52
}
57
53
58
54
if err := d .TestSetup (); err != nil {
55
+ if d .RepoRoot == "" {
56
+ klog .Warningf ("repo-root not supplied, skip dumping cluster logs" )
57
+ }
58
+ if err := d .DumpClusterLogs (); err != nil {
59
+ klog .Warningf ("Dumping cluster logs at the end of Up() failed: %v" , err )
60
+ }
59
61
return fmt .Errorf ("error running setup for the tests: %w" , err )
60
62
}
61
63
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ import (
25
25
)
26
26
27
27
func (d * deployer ) Down () error {
28
+ if err := d .DumpClusterLogs (); err != nil {
29
+ klog .Warningf ("Dumping cluster logs at the start of Down() failed: %v" , err )
30
+ }
28
31
args := []string {
29
32
"delete" , "cluster" ,
30
33
"--name" , d .ClusterName ,
You can’t perform that action at this time.
0 commit comments