Skip to content

Commit

Permalink
Add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Apr 29, 2024
1 parent a659686 commit 11e155d
Show file tree
Hide file tree
Showing 4 changed files with 740 additions and 6 deletions.
16 changes: 11 additions & 5 deletions lke_clusters_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ type LKEClusterControlPlaneACL struct {
// available when updating the ACL configuration of an LKE cluster's
// control plane.
type LKEClusterControlPlaneACLUpdateOptions struct {
ACL *LKEClusterControlPlaneACL `json:"acl"`
ACL LKEClusterControlPlaneACL `json:"acl"`
}

// LKEClusterControlPlaneACLResponse represents the response structure
// for the Client.GetLKEClusterControlPlaneACL(...) method.
type LKEClusterControlPlaneACLResponse struct {
ACL LKEClusterControlPlaneACL `json:"acl"`
}

// GetLKEClusterControlPlaneACL gets the ACL configuration for the
// given cluster's control plane.
func (c *Client) GetLKEClusterControlPlaneACL(ctx context.Context, clusterID int) (*LKEClusterControlPlaneACL, error) {
return doGETRequest[LKEClusterControlPlaneACL](
func (c *Client) GetLKEClusterControlPlaneACL(ctx context.Context, clusterID int) (*LKEClusterControlPlaneACLResponse, error) {
return doGETRequest[LKEClusterControlPlaneACLResponse](
ctx,
c,
formatAPIPath("lke/clusters/%d/control_plane_acl", clusterID),
Expand All @@ -39,8 +45,8 @@ func (c *Client) UpdateLKEClusterControlPlaneACL(
ctx context.Context,
clusterID int,
opts LKEClusterControlPlaneACLUpdateOptions,
) (*LKEClusterControlPlaneACL, error) {
return doPUTRequest[LKEClusterControlPlaneACL](
) (*LKEClusterControlPlaneACLResponse, error) {
return doPUTRequest[LKEClusterControlPlaneACLResponse](
ctx,
c,
formatAPIPath("lke/clusters/%d/control_plane_acl", clusterID),
Expand Down
Loading

0 comments on commit 11e155d

Please sign in to comment.