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