Skip to content

Commit db26c16

Browse files
committed
logger: change logger test name, bug fix with error return, misc fixes
1 parent 68f7f27 commit db26c16

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

logger.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ func (l Logger) Close() error {
2525

2626
// GetLogs is used to retrieve a parsable logger object
2727
func (s *Shell) GetLogs(ctx context.Context) (Logger, error) {
28-
2928
resp, err := s.Request("log/tail").Send(ctx)
3029
if err != nil {
31-
return Logger{}, nil
30+
return Logger{}, err
3231
}
3332
if resp.Error != nil {
34-
resp.Close()
33+
resp.Output.Close()
3534
return Logger{}, resp.Error
3635
}
3736
return newLogger(resp.Output), nil

logger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66
)
77

8-
func Test_Logger(t *testing.T) {
8+
func TestLogger(t *testing.T) {
99
ctx, cancel := context.WithCancel(context.Background())
1010
defer cancel()
1111
sh := NewShell(shellUrl)

0 commit comments

Comments
 (0)