File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change
1
+ ```release-note:enhancement
2
+ teams_location: make location parameters optional
3
+ ```
Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ type TeamsLocation struct {
32
32
Ip string `json:"ip,omitempty"`
33
33
Subdomain string `json:"doh_subdomain"`
34
34
AnonymizedLogsEnabled bool `json:"anonymized_logs_enabled"`
35
- IPv4Destination string `json:"ipv4_destination"`
36
- IPv4DestinationBackup string `json:"ipv4_destination_backup"`
37
- DNSDestinationIPsID string `json:"dns_destination_ips_id"`
38
- DNSDestinationIPv6BlockID string `json:"dns_destination_ipv6_block_id"`
35
+ IPv4Destination string `json:"ipv4_destination,omitempty "`
36
+ IPv4DestinationBackup string `json:"ipv4_destination_backup,omitempty "`
37
+ DNSDestinationIPsID * string `json:"dns_destination_ips_id,omitempty "`
38
+ DNSDestinationIPv6BlockID * string `json:"dns_destination_ipv6_block_id,omitempty "`
39
39
ClientDefault bool `json:"client_default"`
40
40
ECSSupport * bool `json:"ecs_support,omitempty"`
41
41
Endpoints * LocationEndpoints `json:"endpoints,omitempty"`
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ func TestTeamsLocations(t *testing.T) {
54
54
createdAt , _ := time .Parse (time .RFC3339 , "2020-05-18T22:07:03Z" )
55
55
updatedAt , _ := time .Parse (time .RFC3339 , "2020-05-18T22:07:05Z" )
56
56
57
+ ipv4Id := "9da8e0c9-e9cc-4bbd-85c5-b351fc373354"
58
+ ipv6Id := "8da8e0c9-e9cc-4bbd-85c5-b351fc373354"
57
59
want := []TeamsLocation {{
58
60
ID : "0f8185414dec4a5e9034f3d917c17890" ,
59
61
Name : "home" ,
@@ -63,8 +65,8 @@ func TestTeamsLocations(t *testing.T) {
63
65
AnonymizedLogsEnabled : false ,
64
66
IPv4Destination : "1.2.3.4" ,
65
67
IPv4DestinationBackup : "1.2.3.5" ,
66
- DNSDestinationIPsID : "9da8e0c9-e9cc-4bbd-85c5-b351fc373354" ,
67
- DNSDestinationIPv6BlockID : "8da8e0c9-e9cc-4bbd-85c5-b351fc373354" ,
68
+ DNSDestinationIPsID : & ipv4Id ,
69
+ DNSDestinationIPv6BlockID : & ipv6Id ,
68
70
ClientDefault : false ,
69
71
ECSSupport : BoolPtr (false ),
70
72
CreatedAt : & createdAt ,
You can’t perform that action at this time.
0 commit comments