mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-20 19:09:07 +01:00
Update Tailscale interface with new Execute signature
This commit is contained in:
parent
f5a5437917
commit
7bf2eb3d71
@ -168,7 +168,7 @@ func TestTaildrop(t *testing.T) {
|
|||||||
for _, client := range allClients {
|
for _, client := range allClients {
|
||||||
command := []string{"touch", fmt.Sprintf("/tmp/file_from_%s", client.Hostname())}
|
command := []string{"touch", fmt.Sprintf("/tmp/file_from_%s", client.Hostname())}
|
||||||
|
|
||||||
if _, err := client.Execute(command); err != nil {
|
if _, _, err := client.Execute(command); err != nil {
|
||||||
t.Errorf("failed to create taildrop file on %s, err: %s", client.Hostname(), err)
|
t.Errorf("failed to create taildrop file on %s, err: %s", client.Hostname(), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ func TestTaildrop(t *testing.T) {
|
|||||||
client.Hostname(),
|
client.Hostname(),
|
||||||
peer.Hostname(),
|
peer.Hostname(),
|
||||||
)
|
)
|
||||||
_, err := client.Execute(command)
|
_, _, err := client.Execute(command)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
@ -214,7 +214,7 @@ func TestTaildrop(t *testing.T) {
|
|||||||
"get",
|
"get",
|
||||||
"/tmp/",
|
"/tmp/",
|
||||||
}
|
}
|
||||||
if _, err := client.Execute(command); err != nil {
|
if _, _, err := client.Execute(command); err != nil {
|
||||||
t.Errorf("failed to get taildrop file on %s, err: %s", client.Hostname(), err)
|
t.Errorf("failed to get taildrop file on %s, err: %s", client.Hostname(), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ func TestTaildrop(t *testing.T) {
|
|||||||
peer.Hostname(),
|
peer.Hostname(),
|
||||||
)
|
)
|
||||||
|
|
||||||
result, err := client.Execute(command)
|
result, _, err := client.Execute(command)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to execute command to ls taildrop: %s", err)
|
t.Errorf("failed to execute command to ls taildrop: %s", err)
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ func TestResolveMagicDNS(t *testing.T) {
|
|||||||
"tailscale",
|
"tailscale",
|
||||||
"ip", peerFQDN,
|
"ip", peerFQDN,
|
||||||
}
|
}
|
||||||
result, err := client.Execute(command)
|
result, _, err := client.Execute(command)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to execute resolve/ip command %s from %s: %s",
|
"failed to execute resolve/ip command %s from %s: %s",
|
||||||
|
@ -10,7 +10,7 @@ type TailscaleClient interface {
|
|||||||
Hostname() string
|
Hostname() string
|
||||||
Shutdown() error
|
Shutdown() error
|
||||||
Version() string
|
Version() string
|
||||||
Execute(command []string) (string, error)
|
Execute(command []string) (string, string, error)
|
||||||
Up(loginServer, authKey string) error
|
Up(loginServer, authKey string) error
|
||||||
IPs() ([]netip.Addr, error)
|
IPs() ([]netip.Addr, error)
|
||||||
FQDN() (string, error)
|
FQDN() (string, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user