@@ -84,19 +84,21 @@ func (suite *PlatformChartIntegrationSuite) TestBasicDeployment() {
84
84
helm .Install (suite .T (), options , suite .chartPath , releaseName )
85
85
86
86
defer func () {
87
- secret := k8s .GetSecret (suite .T (), kubectlOptions , "platform-tls" )
88
- secretJson , _ := json .MarshalIndent (secret , "" , " " )
89
- fmt .Println ("TLS Secret: " , string (secretJson ))
90
- pods := k8s .ListPods (suite .T (), kubectlOptions , metav1.ListOptions {})
91
- for _ , pod := range pods {
92
- if strings .Contains (pod .Name , "opentdf-platform" ) {
93
- fmt .Println ("Pod Name: " , pod .Name )
94
- fmt .Println ("Pod Status: " , pod .Status .Phase )
95
- fmt .Println ("Pod Reason: " , pod .Status .Reason )
96
- podJson , _ := json .MarshalIndent (pod , "" , " " )
97
- fmt .Println ("Pod: " , string (podJson ))
98
- platLogs := k8s .GetPodLogs (suite .T (), kubectlOptions , & pod , "platform" )
99
- fmt .Println ("Platform Logs: " , platLogs )
87
+ if suite .T ().Failed () {
88
+ secret := k8s .GetSecret (suite .T (), kubectlOptions , "platform-tls" )
89
+ secretJson , _ := json .MarshalIndent (secret , "" , " " )
90
+ fmt .Println ("TLS Secret: " , string (secretJson ))
91
+ pods := k8s .ListPods (suite .T (), kubectlOptions , metav1.ListOptions {})
92
+ for _ , pod := range pods {
93
+ if strings .Contains (pod .Name , "opentdf-platform" ) {
94
+ fmt .Println ("Pod Name: " , pod .Name )
95
+ fmt .Println ("Pod Status: " , pod .Status .Phase )
96
+ fmt .Println ("Pod Reason: " , pod .Status .Reason )
97
+ podJson , _ := json .MarshalIndent (pod , "" , " " )
98
+ fmt .Println ("Pod: " , string (podJson ))
99
+ platLogs := k8s .GetPodLogs (suite .T (), kubectlOptions , & pod , "platform" )
100
+ fmt .Println ("Platform Logs: " , platLogs )
101
+ }
100
102
}
101
103
}
102
104
helm .Delete (suite .T (), options , releaseName , true )
0 commit comments