test: improve test to ensure ipv6 compatability (#5113)

This commit is contained in:
Damian Debkowski authored and GitHub committed 2024-09-19 08:55:27 -07:00
1 parent 61c1544446
commit 9576ed40dc
12 files changed
+116 -45

No files matched your search

+18 -2
View File
@@ -54,13 +54,29 @@ func TestRepository_UpsertController(t *testing.T) {
wantErr: true,
},
{
name: "valid-controller",
name: "valid-ipv4-controller",
controller: &store.Controller{
PrivateId: "test-controller",
PrivateId: "test-ipv4-controller",
Address: "127.0.0.1",
},
wantCount: 1,
},
{
name: "valid-ipv6-controller",
controller: &store.Controller{
PrivateId: "test-ipv6-controller",
Address: "[2001:4860:4860:0:0:0:0:8888]",
},
wantCount: 1,
},
{
name: "valid-abbreviated-ipv6-controller",
controller: &store.Controller{
PrivateId: "test-abbreviated-ipv6-controller",
Address: "[2001:4860:4860::8888]",
},
wantCount: 1,
},
{
name: "valid-controller-short-name",
controller: &store.Controller{