diff --git a/go.mod b/go.mod index e8553b47..86036619 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/fatih/structs v1.1.0 github.com/goccy/go-yaml v1.15.11 github.com/guptarohit/asciigraph v0.7.3 - github.com/hetznercloud/hcloud-go/v2 v2.17.0 + github.com/hetznercloud/hcloud-go/v2 v2.17.1 github.com/jedib0t/go-pretty/v6 v6.6.5 github.com/spf13/cast v1.7.1 github.com/spf13/cobra v1.8.1 @@ -62,7 +62,7 @@ require ( go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.30.0 // indirect + golang.org/x/net v0.32.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect diff --git a/go.sum b/go.sum index df235b97..432b573f 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,8 @@ github.com/guptarohit/asciigraph v0.7.3 h1:p05XDDn7cBTWiBqWb30mrwxd6oU0claAjqeyt github.com/guptarohit/asciigraph v0.7.3/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hetznercloud/hcloud-go/v2 v2.17.0 h1:ge0w2piey9SV6XGyU/wQ6HBR24QyMbJ3wLzezplqR68= -github.com/hetznercloud/hcloud-go/v2 v2.17.0/go.mod h1:zfyZ4Orx+mPpYDzWAxXR7DHGL50nnlZ5Edzgs1o6f/s= +github.com/hetznercloud/hcloud-go/v2 v2.17.1 h1:DPi019dv0WCiECEmtcuTgc//hBvnxESb6QlJnAb4a04= +github.com/hetznercloud/hcloud-go/v2 v2.17.1/go.mod h1:6ygmBba+FdawR2lLp/d9uJljY2k0dTYthprrI8usdLw= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -145,8 +145,8 @@ golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjs golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/internal/cmd/network/create_test.go b/internal/cmd/network/create_test.go index 2603be45..6ce8677d 100644 --- a/internal/cmd/network/create_test.go +++ b/internal/cmd/network/create_test.go @@ -64,14 +64,15 @@ func TestCreateJSON(t *testing.T) { Labels: make(map[string]string), }). Return(&hcloud.Network{ - ID: 123, - Name: "myNetwork", - IPRange: ipRange, - Created: time.Date(2016, 1, 30, 23, 50, 0, 0, time.UTC), - Labels: make(map[string]string), - Servers: []*hcloud.Server{{ID: 1}, {ID: 2}, {ID: 3}}, - Routes: []hcloud.NetworkRoute{}, - Subnets: []hcloud.NetworkSubnet{}, + ID: 123, + Name: "myNetwork", + IPRange: ipRange, + Created: time.Date(2016, 1, 30, 23, 50, 0, 0, time.UTC), + Labels: make(map[string]string), + Servers: []*hcloud.Server{{ID: 1}, {ID: 2}, {ID: 3}}, + LoadBalancers: []*hcloud.LoadBalancer{{ID: 4}, {ID: 5}, {ID: 6}}, + Routes: []hcloud.NetworkRoute{}, + Subnets: []hcloud.NetworkSubnet{}, }, nil, nil) jsonOut, out, err := fx.Run(cmd, []string{"-o=json", "--name", "myNetwork", "--ip-range", "10.0.0.0/24"}) diff --git a/internal/cmd/network/testdata/create_response.json b/internal/cmd/network/testdata/create_response.json index 55f124eb..3d69af80 100644 --- a/internal/cmd/network/testdata/create_response.json +++ b/internal/cmd/network/testdata/create_response.json @@ -5,6 +5,11 @@ "id": 123, "ip_range": "10.0.0.0/24", "labels": {}, + "load_balancers": [ + 4, + 5, + 6 + ], "name": "myNetwork", "protection": { "delete": false diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index f102faa6..a7e9b984 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -215,6 +215,7 @@ func TestNetwork(t *testing.T) { "gateway": "10.0.0.1" } ], + "load_balancers": [], "routes": [ { "destination": "10.100.1.0/24",