@@ -901,22 +901,24 @@ func (t *Testing) PrintEventsPodDetailsAndLogs(namespace string, selector string
901
901
return
902
902
}
903
903
904
- printDetails (pod , "Logs of init container" , "-" ,
905
- func (item string ) error {
906
- return t .kubectl .Logs (namespace , pod , item )
907
- }, initContainers ... )
904
+ if t .config .PrintLogs {
905
+ printDetails (pod , "Logs of init container" , "-" ,
906
+ func (item string ) error {
907
+ return t .kubectl .Logs (namespace , pod , item )
908
+ }, initContainers ... )
908
909
909
- containers , err := t .kubectl .GetContainers (namespace , pod )
910
- if err != nil {
911
- fmt .Printf ("failed printing logs: %v\n " , err .Error ())
912
- return
913
- }
910
+ containers , err := t .kubectl .GetContainers (namespace , pod )
911
+ if err != nil {
912
+ fmt .Printf ("failed printing logs: %v\n " , err .Error ())
913
+ return
914
+ }
914
915
915
- printDetails (pod , "Logs of container" , "-" ,
916
- func (item string ) error {
917
- return t .kubectl .Logs (namespace , pod , item )
918
- },
919
- containers ... )
916
+ printDetails (pod , "Logs of container" , "-" ,
917
+ func (item string ) error {
918
+ return t .kubectl .Logs (namespace , pod , item )
919
+ },
920
+ containers ... )
921
+ }
920
922
}
921
923
922
924
util .PrintDelimiterLineToWriter (os .Stdout , "=" )
0 commit comments