Skip to content

Commit

Permalink
fix test helper code for null tags
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Feb 18, 2024
1 parent ef9b05b commit 2c2bdd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apstra/blueprint/device_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ func (o *DeviceAllocation) SetSystemAttributes(ctx context.Context, state *Devic
return
}

planSA := new(DeviceAllocationSystemAttributes)
diags.Append(o.SystemAttributes.As(ctx, planSA, basetypes.ObjectAsOptions{})...)
var planSA DeviceAllocationSystemAttributes
diags.Append(o.SystemAttributes.As(ctx, &planSA, basetypes.ObjectAsOptions{})...)
if diags.HasError() {
return
}
Expand Down
4 changes: 4 additions & 0 deletions apstra/test_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func cidrOrNull(in *net.IPNet) string {
}

func stringSetOrNull(in []string) string {
if in == nil {
return "null"
}

sb := new(strings.Builder)
for i, s := range in {
if i == 0 {
Expand Down

0 comments on commit 2c2bdd3

Please sign in to comment.