Skip to content

Commit a0e1695

Browse files
committed
fix utils
1 parent 49b920d commit a0e1695

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

internal/pkg/services/iaas/utils/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func GetPublicIP(ctx context.Context, apiClient IaaSClient, projectId, publicIpI
2323
return "", fmt.Errorf("get public ip: %w", err)
2424
}
2525
return *resp.Ip, nil
26+
}
2627

2728
func GetServerName(ctx context.Context, apiClient IaaSClient, projectId, serverId string) (string, error) {
2829
resp, err := apiClient.GetServerExecute(ctx, projectId, serverId)

internal/pkg/services/iaas/utils/utils_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func (m *IaaSClientMocked) GetPublicIPExecute(_ context.Context, _, _ string) (*
3232
return nil, fmt.Errorf("could not get public ip")
3333
}
3434
return m.GetPublicIpResp, nil
35+
}
3536

3637
func (m *IaaSClientMocked) GetServerExecute(_ context.Context, _, _ string) (*iaas.Server, error) {
3738
if m.GetServerFails {
@@ -74,7 +75,7 @@ func (m *IaaSClientMocked) GetNetworkAreaRangeExecute(_ context.Context, _, _, _
7475
}
7576
return m.GetNetworkAreaRangeResp, nil
7677
}
77-
78+
7879
func TestGetPublicIp(t *testing.T) {
7980
type args struct {
8081
getPublicIpFails bool
@@ -120,7 +121,7 @@ func TestGetPublicIp(t *testing.T) {
120121
})
121122
}
122123
}
123-
124+
124125
func TestGetServerName(t *testing.T) {
125126
type args struct {
126127
getInstanceFails bool

0 commit comments

Comments
 (0)