Skip to content

Commit

Permalink
use variable for namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
  • Loading branch information
kradalby committed Oct 18, 2022
1 parent 13aa845 commit aef77a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions integration/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func TestHeadscale(t *testing.T) {

var err error

namespace := "test-space"

scenario, err := NewScenario()
if err != nil {
t.Errorf("failed to create scenario: %s", err)
Expand All @@ -46,18 +48,18 @@ func TestHeadscale(t *testing.T) {
})

t.Run("create-namespace", func(t *testing.T) {
err := scenario.CreateNamespace("test-space")
err := scenario.CreateNamespace(namespace)
if err != nil {
t.Errorf("failed to create namespace: %s", err)
}

if _, ok := scenario.namespaces["test-space"]; !ok {
if _, ok := scenario.namespaces[namespace]; !ok {
t.Errorf("namespace is not in scenario")
}
})

t.Run("create-auth-key", func(t *testing.T) {
_, err := scenario.CreatePreAuthKey("test-space")
_, err := scenario.CreatePreAuthKey(namespace)
if err != nil {
t.Errorf("failed to create preauthkey: %s", err)
}
Expand Down

0 comments on commit aef77a1

Please sign in to comment.