@@ -11,11 +11,6 @@ import (
1111
1212// GetLogs returns the logs for all containers in all pods for a release.
1313func GetLogs (rm ResourceManager , namespace string , releaseName string ) string {
14- GinkgoWriter .Printf (
15- "Getting logs for all containers in all pods for release %q in namespace %q\n " ,
16- releaseName ,
17- namespace ,
18- )
1914 var returnLogs string
2015 pods , err := rm .GetPods (namespace , client.MatchingLabels {
2116 "app.kubernetes.io/instance" : releaseName ,
@@ -31,13 +26,6 @@ func GetLogs(rm ResourceManager, namespace string, releaseName string) string {
3126 Container : container .Name ,
3227 })
3328 if err != nil {
34- GinkgoWriter .Printf (
35- "ERROR occurred during getting logs for container %q in pod %q in namespace %q: %v\n " ,
36- container .Name ,
37- pod .Name ,
38- pod .Namespace ,
39- err ,
40- )
4129 returnLogs += fmt .Sprintf (" failed to get logs: %v\n " , err )
4230 continue
4331 }
@@ -52,8 +40,6 @@ func GetEvents(rm ResourceManager, namespace string) string {
5240 var returnEvents string
5341 events , err := rm .GetEvents (namespace )
5442 if err != nil {
55- GinkgoWriter .Printf ("ERROR occurred during getting events in namespace %q: %v\n " , namespace , err )
56-
5743 return fmt .Sprintf ("failed to get events: %v" , err )
5844 }
5945
@@ -74,7 +60,6 @@ func GetEvents(rm ResourceManager, namespace string) string {
7460
7561// GetBuildInfo returns the build information.
7662func GetBuildInfo () (commitHash string , commitTime string , dirtyBuild string ) {
77- GinkgoWriter .Printf ("Getting build info\n " )
7863 commitHash = "unknown"
7964 commitTime = "unknown"
8065 dirtyBuild = "unknown"
@@ -101,10 +86,9 @@ func GetBuildInfo() (commitHash string, commitTime string, dirtyBuild string) {
10186// AddNginxLogsAndEventsToReport adds nginx logs and events from the namespace to the report if the spec failed.
10287func AddNginxLogsAndEventsToReport (rm ResourceManager , namespace string , opts ... Option ) {
10388 if CurrentSpecReport ().Failed () {
104- GinkgoWriter .Printf ("Current spec failed. Adding Nginx logs and events to report for namespace %q\n " , namespace )
10589 var returnLogs string
10690
107- nginxPodNames , _ := GetReadyNginxPodNames ( rm .K8sClient , namespace , rm .TimeoutConfig .GetStatusTimeout , opts ... )
91+ nginxPodNames , _ := rm .GetReadyNginxPodNames ( namespace , rm .TimeoutConfig .GetStatusTimeout , opts ... )
10892
10993 for _ , nginxPodName := range nginxPodNames {
11094 returnLogs += fmt .Sprintf ("Logs for Nginx Pod %s:\n " , nginxPodName )
0 commit comments