2022-10-13 23:00:22 +09:00
|
|
|
package integration
|
|
|
|
|
2022-10-23 19:41:35 +09:00
|
|
|
import (
|
2024-07-18 14:38:25 +09:00
|
|
|
v1 "github.com/juanfont/headscale/gen/go/headscale/v1"
|
2024-07-22 15:56:00 +09:00
|
|
|
"github.com/ory/dockertest/v3"
|
2022-10-23 19:41:35 +09:00
|
|
|
)
|
2022-10-13 23:00:22 +09:00
|
|
|
|
|
|
|
type ControlServer interface {
|
2024-09-11 19:00:32 +09:00
|
|
|
Shutdown() (string, string, error)
|
|
|
|
SaveLog(string) (string, string, error)
|
2023-04-27 23:57:11 +09:00
|
|
|
SaveProfile(string) error
|
2022-10-24 23:40:49 +09:00
|
|
|
Execute(command []string) (string, error)
|
2024-07-18 14:38:25 +09:00
|
|
|
WriteFile(path string, content []byte) error
|
2023-04-23 20:02:28 +09:00
|
|
|
ConnectToNetwork(network *dockertest.Network) error
|
2022-10-13 23:00:22 +09:00
|
|
|
GetHealthEndpoint() string
|
|
|
|
GetEndpoint() string
|
2023-08-29 15:33:33 +09:00
|
|
|
WaitForRunning() error
|
2023-01-18 01:43:44 +09:00
|
|
|
CreateUser(user string) error
|
|
|
|
CreateAuthKey(user string, reusable bool, ephemeral bool) (*v1.PreAuthKey, error)
|
2023-09-24 20:42:05 +09:00
|
|
|
ListNodesInUser(user string) ([]*v1.Node, error)
|
2022-11-14 22:27:02 +09:00
|
|
|
GetCert() []byte
|
|
|
|
GetHostname() string
|
|
|
|
GetIP() string
|
2022-10-13 23:00:22 +09:00
|
|
|
}
|