-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix more lint errors from goreportcard #34
Changes from 5 commits
0f34ecf
613e4d6
d2d0f6e
7883932
98a621a
ae0ad01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,17 +21,14 @@ import ( | |
"github.com/pkg/errors" | ||
) | ||
|
||
const ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert this too. Mark intentionally made these consts. I don't particularly care whether there are string literals in the tests or not, but these changes will only aggravate the rebase I will have to do to brink in my dummies module. |
||
AntiAffinityGroupType = "host anti-affinity" | ||
AffinityGroupType = "host affinity" | ||
) | ||
|
||
// AffinityGroup type | ||
type AffinityGroup struct { | ||
Type string | ||
Name string | ||
ID string | ||
} | ||
|
||
// AffinityGroupIface contains the collection of functions for AffinityGroup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here too, and probably elsewhere. |
||
type AffinityGroupIface interface { | ||
FetchAffinityGroup(*AffinityGroup) error | ||
GetOrCreateAffinityGroup(*infrav1.CloudStackCluster, *AffinityGroup) error | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ package cloud_test | |
|
||
import ( | ||
"errors" | ||
|
||
"github.com/apache/cloudstack-go/v2/cloudstack" | ||
infrav1 "github.com/aws/cluster-api-provider-cloudstack/api/v1beta1" | ||
"github.com/aws/cluster-api-provider-cloudstack/pkg/cloud" | ||
|
@@ -47,7 +48,7 @@ var _ = Describe("AffinityGroup Unit Tests", func() { | |
client = cloud.NewClientFromCSAPIClient(mockClient) | ||
fakeAG = &cloud.AffinityGroup{ | ||
Name: "FakeAffinityGroup", | ||
Type: cloud.AffinityGroupType} | ||
Type: "host affinity"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert. |
||
cluster = &infrav1.CloudStackCluster{Spec: infrav1.CloudStackClusterSpec{ | ||
Zone: "Zone1", Network: "SharedGuestNet1"}} | ||
cluster.ObjectMeta.SetUID("0") | ||
|
@@ -89,7 +90,7 @@ var _ = Describe("AffinityGroup Unit Tests", func() { | |
if connectionErr != nil { // Only do these tests if an actual ACS instance is available via cloud-config. | ||
Skip("Could not connect to ACS instance.") | ||
} | ||
arbitraryAG = &cloud.AffinityGroup{Name: "ArbitraryAffinityGroup", Type: cloud.AffinityGroupType} | ||
arbitraryAG = &cloud.AffinityGroup{Name: "ArbitraryAffinityGroup", Type: "host affinity"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert. |
||
}) | ||
AfterEach(func() { | ||
mockCtrl.Finish() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add periods to the end of these comments? I'd like us to stick to the prevailing conventions.