diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-28 11:20:25 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-28 11:20:25 +0100 |
| commit | 8821fd18406a9b8a881e673796020abf329031c5 (patch) | |
| tree | 2b5e66e20f33f90d5b3cf94dbbdc63a3ea6cb4e0 /internal | |
| parent | a5b147b38ebdd8d50220037f5937fe2b07f07c78 (diff) | |
Discovery: Update tests to use the right members
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/discovery/discovery_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/discovery/discovery_test.go b/internal/discovery/discovery_test.go index ec10ef0..2e6c38f 100644 --- a/internal/discovery/discovery_test.go +++ b/internal/discovery/discovery_test.go @@ -40,7 +40,7 @@ func TestServers(t *testing.T) { } // Force expired, 1 hour in the past - d.servers.Timestamp = time.Now().Add(-1 * time.Hour) + d.ServerList.Timestamp = time.Now().Add(-1 * time.Hour) s3, err := d.Servers() // Now we expect an error with the cached copy @@ -85,7 +85,7 @@ func TestOrganizations(t *testing.T) { // TestSecureLocationList tests the function for getting a list of secure internet servers func TestSecureLocationList(t *testing.T) { d := Discovery{ - servers: types.DiscoveryServers{ + ServerList: types.DiscoveryServers{ Version: 1, List: []types.DiscoveryServer{ // institute access server, this should not be found @@ -110,7 +110,7 @@ func TestSecureLocationList(t *testing.T) { // TestServerByURL tests the function for getting a server by the Base URL and type func TestServerByURL(t *testing.T) { d := Discovery{ - servers: types.DiscoveryServers{ + ServerList: types.DiscoveryServers{ Version: 1, List: []types.DiscoveryServer{ // institute access server @@ -151,7 +151,7 @@ func TestServerByURL(t *testing.T) { func TestServerByCountryCode(t *testing.T) { s1 := types.DiscoveryServer{CountryCode: "a", Type: "secure_internet"} d := Discovery{ - servers: types.DiscoveryServers{ + ServerList: types.DiscoveryServers{ Version: 1, List: []types.DiscoveryServer{ // secure internet server @@ -186,7 +186,7 @@ func TestServerByCountryCode(t *testing.T) { func TestOrgByID(t *testing.T) { o1 := types.DiscoveryOrganization{OrgID: "a"} d := Discovery{ - organizations: types.DiscoveryOrganizations{ + OrganizationList: types.DiscoveryOrganizations{ Version: 1, List: []types.DiscoveryOrganization{ o1, @@ -211,14 +211,14 @@ func TestSecureHomeArgs(t *testing.T) { o1 := types.DiscoveryOrganization{OrgID: "id", SecureInternetHome: "a"} s1 := types.DiscoveryServer{BaseURL: "a", Type: "secure_internet"} d := Discovery{ - organizations: types.DiscoveryOrganizations{ + OrganizationList: types.DiscoveryOrganizations{ Version: 1, List: []types.DiscoveryOrganization{ {OrgID: "id2", SecureInternetHome: "c"}, o1, }, }, - servers: types.DiscoveryServers{ + ServerList: types.DiscoveryServers{ Version: 1, List: []types.DiscoveryServer{ s1, |
