Skip to content

Commit

Permalink
nicer debugging output for a few packet types
Browse files Browse the repository at this point in the history
  • Loading branch information
eikenb committed Jul 20, 2017
1 parent 314a5cc commit c325f9a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packet-manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sftp

import (
"encoding"
"fmt"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -89,6 +90,19 @@ func TestPacketManager(t *testing.T) {
s.close()
}

func (p sshFxpRemovePacket) String() string {
return fmt.Sprintf("RmPct:%d", p.ID)
}
func (p sshFxpOpenPacket) String() string {
return fmt.Sprintf("OpPct:%d", p.ID)
}
func (p sshFxpWritePacket) String() string {
return fmt.Sprintf("WrPct:%d", p.ID)
}
func (p sshFxpClosePacket) String() string {
return fmt.Sprintf("ClPct:%d", p.ID)
}

// Test what happens when the pool processes a close packet on a file that it
// is still reading from.
func TestCloseOutOfOrder(t *testing.T) {
Expand Down

0 comments on commit c325f9a

Please sign in to comment.