forked from juanfont/headscale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update cli and oauth tests for users with email
Signed-off-by: Kristoffer Dalby <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,8 +130,9 @@ func TestOIDCAuthenticationPingAll(t *testing.T) { | |
|
||
want := []v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 2, | ||
|
@@ -141,8 +142,9 @@ func TestOIDCAuthenticationPingAll(t *testing.T) { | |
ProviderId: oidcConfig.Issuer + "/user1", | ||
}, | ||
{ | ||
Id: 3, | ||
Name: "user2", | ||
Id: 3, | ||
Name: "user2", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 4, | ||
|
@@ -260,8 +262,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
want: func(iss string) []v1.User { | ||
return []v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 2, | ||
|
@@ -271,8 +274,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
ProviderId: iss + "/user1", | ||
}, | ||
{ | ||
Id: 3, | ||
Name: "user2", | ||
Id: 3, | ||
Name: "user2", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 4, | ||
|
@@ -295,8 +299,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
want: func(iss string) []v1.User { | ||
return []v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 2, | ||
|
@@ -305,8 +310,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
ProviderId: iss + "/user1", | ||
}, | ||
{ | ||
Id: 3, | ||
Name: "user2", | ||
Id: 3, | ||
Name: "user2", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 4, | ||
|
@@ -357,8 +363,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
want: func(iss string) []v1.User { | ||
return []v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 2, | ||
|
@@ -367,8 +374,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
ProviderId: iss + "/user1", | ||
}, | ||
{ | ||
Id: 3, | ||
Name: "user2", | ||
Id: 3, | ||
Name: "user2", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 4, | ||
|
@@ -421,8 +429,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
want: func(iss string) []v1.User { | ||
return []v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1.headscale.net", | ||
Id: 1, | ||
Name: "user1.headscale.net", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 2, | ||
|
@@ -431,8 +440,9 @@ func TestOIDC024UserCreation(t *testing.T) { | |
ProviderId: iss + "/user1", | ||
}, | ||
{ | ||
Id: 3, | ||
Name: "user2.headscale.net", | ||
Id: 3, | ||
Name: "user2.headscale.net", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Id: 4, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,8 +135,9 @@ func TestUserCommand(t *testing.T) { | |
slices.SortFunc(listByUsername, sortWithID) | ||
want := []*v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
} | ||
|
||
|
@@ -161,8 +162,9 @@ func TestUserCommand(t *testing.T) { | |
slices.SortFunc(listByID, sortWithID) | ||
want = []*v1.User{ | ||
{ | ||
Id: 1, | ||
Name: "user1", | ||
Id: 1, | ||
Name: "user1", | ||
Email: "[email protected]", | ||
}, | ||
} | ||
|
||
|
@@ -199,8 +201,9 @@ func TestUserCommand(t *testing.T) { | |
slices.SortFunc(listAfterIDDelete, sortWithID) | ||
want = []*v1.User{ | ||
{ | ||
Id: 2, | ||
Name: "newname", | ||
Id: 2, | ||
Name: "newname", | ||
Email: "[email protected]", | ||
}, | ||
} | ||
|
||
|