@@ -147,7 +147,7 @@ func TestApplicationAnalysis(t *testing.T) {
147147 if err != nil {
148148 t .Error (err )
149149 }
150- printAllAtachmentsOnTask (task , dir )
150+ printTaskAttachments (task , dir )
151151 //if this is still running after timeout, then we should move on, this wont work
152152 return
153153
@@ -160,7 +160,7 @@ func TestApplicationAnalysis(t *testing.T) {
160160 if err != nil {
161161 t .Error (err )
162162 }
163- printAllAtachmentsOnTask (task , dir )
163+ printTaskAttachments (task , dir )
164164 // If the task was unsuccessful there is no reason to continue execution.
165165 return
166166 }
@@ -236,8 +236,8 @@ func TestApplicationAnalysis(t *testing.T) {
236236
237237 } else {
238238 // Ensure stable order of Incidents.
239- sort .SliceStable (got .Incidents , func (a , b int ) bool { return got .Incidents [a ].File + fmt .Sprint (got .Incidents [a ].Line ) < got .Incidents [b ].File + fmt .Sprint (got .Incidents [b ].Line ) })
240- sort .SliceStable (expected .Incidents , func (a , b int ) bool { return expected .Incidents [a ].File + fmt .Sprint (expected .Incidents [a ].Line ) < expected .Incidents [b ].File + fmt .Sprint (expected .Incidents [b ].Line )})
239+ sort .SliceStable (got .Incidents , func (a , b int ) bool { return got .Incidents [a ].File + fmt .Sprint (got .Incidents [a ].Line ) < got .Incidents [b ].File + fmt .Sprint (got .Incidents [b ].Line ) })
240+ sort .SliceStable (expected .Incidents , func (a , b int ) bool { return expected .Incidents [a ].File + fmt .Sprint (expected .Incidents [a ].Line ) < expected .Incidents [b ].File + fmt .Sprint (expected .Incidents [b ].Line ) })
241241 for j , gotInc := range got .Incidents {
242242 expectedInc := expected .Incidents [j ]
243243 if gotInc .File != expectedInc .File {
@@ -370,17 +370,19 @@ func getDefaultToken() string {
370370 return string (decrypted )
371371}
372372
373- func printAllAtachmentsOnTask (task * api.Task , dir string ) error {
374- for _ , attachement := range task .Attached {
375- err := RichClient .File .Get (attachement .ID , dir )
373+ func printTaskAttachments (task * api.Task , dir string ) error {
374+ for _ , attachment := range task .Attached {
375+ err := RichClient .File .Get (attachment .ID , dir )
376376 if err != nil {
377377 return err
378378 }
379- b , err := os .ReadFile (filepath .Join (dir , attachement .Name ))
379+ b , err := os .ReadFile (filepath .Join (dir , attachment .Name ))
380380 if err != nil {
381381 return err
382382 }
383- pp .Println (string (b ))
383+ fmt .Printf ("\n Attachment: %s\n " , attachment .Name )
384+ fmt .Println (string (b ))
385+ fmt .Println ("" )
384386 }
385387
386388 return nil
0 commit comments