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