From 41398219c27e4e99f023a76b28122d1088e38011 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 18 Dec 2024 10:48:56 +0100 Subject: [PATCH] add email to test users in integration Signed-off-by: Kristoffer Dalby --- integration/cli_test.go | 18 +++++++++++++++++- integration/hsic/hsic.go | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/integration/cli_test.go b/integration/cli_test.go index 7a936a15..fa811bda 100644 --- a/integration/cli_test.go +++ b/integration/cli_test.go @@ -930,7 +930,23 @@ func TestNodeAdvertiseTagCommand(t *testing.T) { wantTag: false, }, { - name: "with-policy", + name: "with-policy-email", + policy: &policy.ACLPolicy{ + ACLs: []policy.ACL{ + { + Action: "accept", + Sources: []string{"*"}, + Destinations: []string{"*:*"}, + }, + }, + TagOwners: map[string][]string{ + "tag:test": {"user1@test.no"}, + }, + }, + wantTag: true, + }, + { + name: "with-policy-username", policy: &policy.ACLPolicy{ ACLs: []policy.ACL{ { diff --git a/integration/hsic/hsic.go b/integration/hsic/hsic.go index b2a2701e..883fc8bc 100644 --- a/integration/hsic/hsic.go +++ b/integration/hsic/hsic.go @@ -702,7 +702,7 @@ func (t *HeadscaleInContainer) WaitForRunning() error { func (t *HeadscaleInContainer) CreateUser( user string, ) error { - command := []string{"headscale", "users", "create", user} + command := []string{"headscale", "users", "create", user, fmt.Sprintf("--email=%s@test.no", user)} _, _, err := dockertestutil.ExecuteCommand( t.container,