Added integration tests for ephemeral nodes
Fetch the machines from headscale
This commit is contained in:
parent
afae1ff7b6
commit
55a3885614
5 changed files with 120 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue