mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 21:27:45 +00:00
Added integration tests for ephemeral nodes
Fetch the machines from headscale
This commit is contained in:
@@ -316,6 +316,8 @@ func (t *HeadscaleInContainer) CreateNamespace(
|
||||
|
||||
func (t *HeadscaleInContainer) CreateAuthKey(
|
||||
namespace string,
|
||||
reusable bool,
|
||||
ephemeral bool,
|
||||
) (*v1.PreAuthKey, error) {
|
||||
command := []string{
|
||||
"headscale",
|
||||
@@ -323,13 +325,20 @@ func (t *HeadscaleInContainer) CreateAuthKey(
|
||||
namespace,
|
||||
"preauthkeys",
|
||||
"create",
|
||||
"--reusable",
|
||||
"--expiration",
|
||||
"24h",
|
||||
"--output",
|
||||
"json",
|
||||
}
|
||||
|
||||
if reusable {
|
||||
command = append(command, "--reusable")
|
||||
}
|
||||
|
||||
if ephemeral {
|
||||
command = append(command, "--ephemeral")
|
||||
}
|
||||
|
||||
result, _, err := dockertestutil.ExecuteCommand(
|
||||
t.container,
|
||||
command,
|
||||
|
Reference in New Issue
Block a user