add missing docker e2e test

This commit is contained in:
Boshi Lian 2022-07-13 23:24:05 +00:00
parent fdc6691d75
commit 56844d0295
4 changed files with 120 additions and 27 deletions

View file

@ -6,11 +6,9 @@ import (
"encoding/base64"
"fmt"
"net"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/patrickmn/go-cache"
log "github.com/sirupsen/logrus"
"github.com/tg123/sshpiper/libplugin"
"golang.org/x/crypto/ssh"
@ -26,7 +24,6 @@ type pipe struct {
type plugin struct {
dockerCli *client.Client
cache *cache.Cache
}
func newDockerPlugin() (*plugin, error) {
@ -36,7 +33,6 @@ func newDockerPlugin() (*plugin, error) {
}
return &plugin{
dockerCli: cli,
cache: cache.New(1*time.Minute, 10*time.Minute),
}, nil
}