Skip to content

Commit

Permalink
Update IPv6 address
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Apr 29, 2024
1 parent 11e155d commit 7586273
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
38 changes: 19 additions & 19 deletions test/integration/fixtures/TestLKECluster_withACL.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:31:26 GMT
- Mon, 29 Apr 2024 16:51:45 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand All @@ -295,7 +295,7 @@ interactions:
code: 200
duration: ""
- request:
body: '{"node_pools":[{"count":1,"type":"g6-standard-2","disks":null,"tags":["test"]}],"label":"go-test-def","region":"ap-west","k8s_version":"1.29","tags":["testing"],"control_plane":{"acl":{"enabled":true,"addresses":{"ipv4":["10.0.0.1/32"],"ipv6":["1234::5678/64"]}}}}'
body: '{"node_pools":[{"count":1,"type":"g6-standard-2","disks":null,"tags":["test"]}],"label":"go-test-def","region":"ap-west","k8s_version":"1.29","tags":["testing"],"control_plane":{"acl":{"enabled":true,"addresses":{"ipv4":["10.0.0.1/32"],"ipv6":["1234::5678"]}}}}'
form: {}
headers:
Accept:
Expand All @@ -307,7 +307,7 @@ interactions:
url: https://api.linode.com/v4beta/lke/clusters
method: POST
response:
body: '{"id": 173757, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
body: '{"id": 173778, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
"2018-01-02T03:04:05", "label": "go-test-def", "region": "ap-west", "k8s_version":
"1.29", "control_plane": {"high_availability": false}, "tags": ["testing"]}'
headers:
Expand All @@ -332,7 +332,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:31:54 GMT
- Mon, 29 Apr 2024 16:52:13 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -365,11 +365,11 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/clusters/173757/control_plane_acl
url: https://api.linode.com/v4beta/lke/clusters/173778/control_plane_acl
method: GET
response:
body: '{"acl": {"enabled": true, "addresses": {"ipv4": ["10.0.0.1/32"], "ipv6":
["1234::5678/64"]}}}'
["1234::5678/128"]}}}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -386,13 +386,13 @@ interactions:
Connection:
- keep-alive
Content-Length:
- "103"
- "94"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:31:55 GMT
- Mon, 29 Apr 2024 16:52:13 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand All @@ -417,7 +417,7 @@ interactions:
code: 200
duration: ""
- request:
body: '{"acl":{"enabled":true,"addresses":{"ipv4":["10.0.0.2/32"],"ipv6":["1234::5678/64"]}}}'
body: '{"acl":{"enabled":true,"addresses":{"ipv4":["10.0.0.2/32"],"ipv6":["1234::5678"]}}}'
form: {}
headers:
Accept:
Expand All @@ -426,11 +426,11 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/clusters/173757/control_plane_acl
url: https://api.linode.com/v4beta/lke/clusters/173778/control_plane_acl
method: PUT
response:
body: '{"acl": {"enabled": true, "addresses": {"ipv4": ["10.0.0.2/32"], "ipv6":
["1234::5678/64"]}}}'
["1234::5678/128"]}}}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -447,13 +447,13 @@ interactions:
Connection:
- keep-alive
Content-Length:
- "103"
- "94"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:31:58 GMT
- Mon, 29 Apr 2024 16:52:17 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -486,7 +486,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/clusters/173757/control_plane_acl
url: https://api.linode.com/v4beta/lke/clusters/173778/control_plane_acl
method: DELETE
response:
body: '{}'
Expand All @@ -512,7 +512,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:32:00 GMT
- Mon, 29 Apr 2024 16:52:19 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -545,7 +545,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/clusters/173757/control_plane_acl
url: https://api.linode.com/v4beta/lke/clusters/173778/control_plane_acl
method: GET
response:
body: '{"acl": {"enabled": false, "addresses": null}}'
Expand All @@ -571,7 +571,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:32:01 GMT
- Mon, 29 Apr 2024 16:52:20 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -605,7 +605,7 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/clusters/173757
url: https://api.linode.com/v4beta/lke/clusters/173778
method: DELETE
response:
body: '{}'
Expand All @@ -631,7 +631,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 29 Apr 2024 16:32:23 GMT
- Mon, 29 Apr 2024 16:52:42 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down
10 changes: 5 additions & 5 deletions test/integration/lke_clusters_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestLKECluster_withACL(t *testing.T) {
Enabled: true,
Addresses: linodego.LKEClusterControlPlaneACLAddresses{
IPv4: []string{"10.0.0.1/32"},
IPv6: []string{"2001:db8:1234:abcd::/64"},
IPv6: []string{"1234::5678"},
},
},
}
Expand All @@ -34,14 +34,14 @@ func TestLKECluster_withACL(t *testing.T) {
// TODO: Not currently populated in response, uncomment when available
// require.Equal(t, true, cluster.ControlPlane.ACL.Enabled)
// require.Equal(t, "10.0.0.1/32", cluster.ControlPlane.ACL.Addresses.IPv4[0])
// require.Equal(t, "2001:db8:1234:abcd::/64", cluster.ControlPlane.ACL.Addresses.IPv6[0])
// require.Equal(t, "1234::5678", cluster.ControlPlane.ACL.Addresses.IPv6[0])

acl, err := client.GetLKEClusterControlPlaneACL(context.Background(), cluster.ID)
assert.NoError(t, err)

require.Equal(t, true, acl.ACL.Enabled)
require.Equal(t, "10.0.0.1/32", acl.ACL.Addresses.IPv4[0])
require.Equal(t, "2001:db8:1234:abcd::/64", acl.ACL.Addresses.IPv6[0])
require.Equal(t, "1234::5678/128", acl.ACL.Addresses.IPv6[0])

acl, err = client.UpdateLKEClusterControlPlaneACL(
context.Background(),
Expand All @@ -51,7 +51,7 @@ func TestLKECluster_withACL(t *testing.T) {
Enabled: true,
Addresses: linodego.LKEClusterControlPlaneACLAddresses{
IPv4: []string{"10.0.0.2/32"},
IPv6: []string{"2002:db8:1234:abcd::/64"},
IPv6: []string{"1235::5678"},
},
},
},
Expand All @@ -60,7 +60,7 @@ func TestLKECluster_withACL(t *testing.T) {

require.Equal(t, true, acl.ACL.Enabled)
require.Equal(t, "10.0.0.2/32", acl.ACL.Addresses.IPv4[0])
require.Equal(t, "2002:db8:1234:abcd::/64", acl.ACL.Addresses.IPv6[0])
require.Equal(t, "1235::5678/128", acl.ACL.Addresses.IPv6[0])

err = client.DeleteLKEClusterControlPlaneACL(context.Background(), cluster.ID)
require.NoError(t, err)
Expand Down

0 comments on commit 7586273

Please sign in to comment.