mirror of
https://github.com/moby/buildkit.git
synced 2026-08-07 00:00:52 +00:00
Fixes https://github.com/moby/buildkit/issues/914 Signed-off-by: Nick Santos <nicholas.j.santos@gmail.com>
22 lines
460 B
Go
22 lines
460 B
Go
package sshprovider_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/moby/buildkit/cmd/buildctl/build"
|
|
"github.com/moby/buildkit/session/sshforward/sshprovider"
|
|
)
|
|
|
|
func TestToAgentSource(t *testing.T) {
|
|
configs, err := build.ParseSSH([]string{"default"})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
_, err = sshprovider.NewSSHAgentProvider(configs)
|
|
ok := err == nil || strings.Contains(err.Error(), "invalid empty ssh agent socket")
|
|
if !ok {
|
|
t.Fatal(err)
|
|
}
|
|
}
|