Skip to content

Commit 4f6f0a6

Browse files
authored
chore(deps): update upcloud-go-api to v8.23.0 (#494)
- Update package dependency - Add missing methods from mock package - Add "dhcp_provided" field to server test JSON Original dependabot issue at #492 (now closed). Tests were failing. Signed-off-by: Ville Vesilehto <ville.vesilehto@upcloud.com>
1 parent a08cd8a commit 4f6f0a6

4 files changed

Lines changed: 31 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.24.2
66

77
require (
88
github.com/UpCloudLtd/progress v1.0.3
9-
github.com/UpCloudLtd/upcloud-go-api/v8 v8.21.0
9+
github.com/UpCloudLtd/upcloud-go-api/v8 v8.23.0
1010
github.com/adrg/xdg v0.3.2
1111
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
1212
github.com/gemalto/flume v0.12.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWt
33
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
44
github.com/UpCloudLtd/progress v1.0.3 h1:8SfntHkBPyQc5BL3946Bgi9KYnQOxa5RR2EKdadujdg=
55
github.com/UpCloudLtd/progress v1.0.3/go.mod h1:iGxOnb9HvHW0yrLGUjHr0lxHhn7TehgWwh7a8NqK6iQ=
6-
github.com/UpCloudLtd/upcloud-go-api/v8 v8.21.0 h1:gPi3bLwNixV2xo3IFMhP65uOdJcE2KCooXQ5bzPJqEk=
7-
github.com/UpCloudLtd/upcloud-go-api/v8 v8.21.0/go.mod h1:ImDdnWfVVM6WCRTrskGhAw2W1cRwu5IEkBw+9UCzAv8=
6+
github.com/UpCloudLtd/upcloud-go-api/v8 v8.23.0 h1:FkVRboJKO2FIcDrRmoIoVlbcaNJxvjrobmqaK2JpOIU=
7+
github.com/UpCloudLtd/upcloud-go-api/v8 v8.23.0/go.mod h1:ImDdnWfVVM6WCRTrskGhAw2W1cRwu5IEkBw+9UCzAv8=
88
github.com/adrg/xdg v0.3.2 h1:GUSGQ5pHdev83AYhDSS1A/CX+0JIsxbiWtow2DSA+RU=
99
github.com/adrg/xdg v0.3.2/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
1010
github.com/ansel1/merry v1.5.0 h1:9E6Jj5Yda9SfY3dhbOZUq1CeHl5JA1+mItYvKqokJ7s=

internal/commands/server/list_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const expectedJSONOutput = `
3333
{
3434
"access": "public",
3535
"address": "10.0.97.4",
36+
"dhcp_provided": "no",
3637
"family": "",
3738
"part_of_plan": "no",
3839
"ptr_record": "",
@@ -44,6 +45,7 @@ const expectedJSONOutput = `
4445
{
4546
"access": "public",
4647
"address": "10.0.98.3",
48+
"dhcp_provided": "no",
4749
"family": "",
4850
"part_of_plan": "no",
4951
"ptr_record": "",
@@ -55,6 +57,7 @@ const expectedJSONOutput = `
5557
{
5658
"access": "private",
5759
"address": "10.0.99.2",
60+
"dhcp_provided": "no",
5861
"family": "",
5962
"part_of_plan": "no",
6063
"ptr_record": "",
@@ -66,6 +69,7 @@ const expectedJSONOutput = `
6669
{
6770
"access": "utility",
6871
"address": "10.0.100.1",
72+
"dhcp_provided": "no",
6973
"family": "",
7074
"part_of_plan": "no",
7175
"ptr_record": "",

internal/mock/mock.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,3 +1528,27 @@ func (m *Service) GetDevicesAvailability(ctx context.Context) (*upcloud.DevicesA
15281528
}
15291529
return args[0].(*upcloud.DevicesAvailability), args.Error(1)
15301530
}
1531+
1532+
// AssignIPAddressToNetworkInterface implements service.Network.AssignIPAddressToNetworkInterface
1533+
func (m *Service) AssignIPAddressToNetworkInterface(_ context.Context, r *request.AssignIPAddressToNetworkInterfaceRequest) (*upcloud.IPAddress, error) {
1534+
args := m.Called(r)
1535+
if args[0] == nil {
1536+
return nil, args.Error(1)
1537+
}
1538+
return args[0].(*upcloud.IPAddress), args.Error(1)
1539+
}
1540+
1541+
// DeleteIPAddressFromNetworkInterface implements service.Network.DeleteIPAddressFromNetworkInterface
1542+
func (m *Service) DeleteIPAddressFromNetworkInterface(_ context.Context, r *request.DeleteIPAddressFromNetworkInterfaceRequest) error {
1543+
args := m.Called(r)
1544+
return args.Error(0)
1545+
}
1546+
1547+
// GetBillingSummary implements service.Account.GetBillingSummary
1548+
func (m *Service) GetBillingSummary(_ context.Context, r *request.GetBillingSummaryRequest) (*upcloud.BillingSummary, error) {
1549+
args := m.Called(r)
1550+
if args[0] == nil {
1551+
return nil, args.Error(1)
1552+
}
1553+
return args[0].(*upcloud.BillingSummary), args.Error(1)
1554+
}

0 commit comments

Comments
 (0)