From 0a96951570843c9104cf842213e600b8e7770f68 Mon Sep 17 00:00:00 2001 From: Suhrit Rimal Date: Mon, 13 Feb 2023 12:19:50 -0500 Subject: [PATCH] Support root_certificate_installation_enabled flag --- .changelog/1208.txt | 3 +++ teams_accounts.go | 5 +++-- teams_accounts_test.go | 19 +++++++++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 .changelog/1208.txt diff --git a/.changelog/1208.txt b/.changelog/1208.txt new file mode 100644 index 00000000000..8075ecc7939 --- /dev/null +++ b/.changelog/1208.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +teams_accounts: Add new root_certificate_installation_enabled field +``` diff --git a/teams_accounts.go b/teams_accounts.go index f90707147cf..7667a155beb 100644 --- a/teams_accounts.go +++ b/teams_accounts.go @@ -97,8 +97,9 @@ type TeamsLoggingSettings struct { } type TeamsDeviceSettings struct { - GatewayProxyEnabled bool `json:"gateway_proxy_enabled"` - GatewayProxyUDPEnabled bool `json:"gateway_udp_proxy_enabled"` + GatewayProxyEnabled bool `json:"gateway_proxy_enabled"` + GatewayProxyUDPEnabled bool `json:"gateway_udp_proxy_enabled"` + RootCertificateInstallationEnabled bool `json:"root_certificate_installation_enabled"` } type TeamsDeviceSettingsResponse struct { diff --git a/teams_accounts_test.go b/teams_accounts_test.go index a9535528bfc..1741217355e 100644 --- a/teams_accounts_test.go +++ b/teams_accounts_test.go @@ -239,7 +239,7 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) { "success": true, "errors": [], "messages": [], - "result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false} + "result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false, "root_certificate_installation_enabled":true} }`) } @@ -249,8 +249,9 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) { if assert.NoError(t, err) { assert.Equal(t, actual, TeamsDeviceSettings{ - GatewayProxyEnabled: true, - GatewayProxyUDPEnabled: false, + GatewayProxyEnabled: true, + GatewayProxyUDPEnabled: false, + RootCertificateInstallationEnabled: true, }) } } @@ -266,21 +267,23 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) { "success": true, "errors": [], "messages": [], - "result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true} + "result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true, "root_certificate_installation_enabled":true} }`) } mux.HandleFunc("/accounts/"+testAccountID+"/devices/settings", handler) actual, err := client.TeamsAccountDeviceUpdateConfiguration(context.Background(), testAccountID, TeamsDeviceSettings{ - GatewayProxyUDPEnabled: true, - GatewayProxyEnabled: true, + GatewayProxyUDPEnabled: true, + GatewayProxyEnabled: true, + RootCertificateInstallationEnabled: true, }) if assert.NoError(t, err) { assert.Equal(t, actual, TeamsDeviceSettings{ - GatewayProxyEnabled: true, - GatewayProxyUDPEnabled: true, + GatewayProxyEnabled: true, + GatewayProxyUDPEnabled: true, + RootCertificateInstallationEnabled: true, }) } }