Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #792 from slagle/fix-lint
Browse files Browse the repository at this point in the history
Fixes lint errors raised by golint and golangci-lint
  • Loading branch information
openshift-merge-bot[bot] authored Mar 27, 2024
2 parents f6bc8fe + 4a65e65 commit c6b6ab0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions controllers/openstackdataplanenodeset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ const (
OvnControllerAgentDefaultImage = "quay.io/podified-antelope-centos9/openstack-ovn-controller:current-podified"
// OvnBgpAgentDefaultImage -
OvnBgpAgentDefaultImage = "quay.io/podified-antelope-centos9/openstack-ovn-bgp-agent:current-podified"
// TelemetryCeilometerComputeDefaultImage
// TelemetryCeilometerComputeDefaultImage -
TelemetryCeilometerComputeDefaultImage = "quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified"
// TelemetryCeilometerIpmiDefaultImage
// TelemetryCeilometerIpmiDefaultImage -
TelemetryCeilometerIpmiDefaultImage = "quay.io/podified-antelope-centos9/openstack-ceilometer-ipmi:current-podified"
// NodeExporterDefaultImage -
// TelemetryNodeExporterDefaultImage -
TelemetryNodeExporterDefaultImage = "quay.io/prometheus/node-exporter:v1.5.0"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/deployment/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func EnsureServices(ctx context.Context, helper *helper.Helper, instance *datapl
return nil
}

// Check that global services are defined only once in all nodesets, report and fail if there are duplicates
// CheckGlobalServiceExecutionConsistency - Check that global services are defined only once in all nodesets, report and fail if there are duplicates
func CheckGlobalServiceExecutionConsistency(ctx context.Context, helper *helper.Helper, nodesets []dataplanev1.OpenStackDataPlaneNodeSet) error {
var globalServices []string
var allServices []string
Expand Down
3 changes: 2 additions & 1 deletion pkg/util/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ package util
const (
// AnsibleExecutionServiceNameLen max length for the ansibleEE service name prefix
AnsibleExecutionServiceNameLen = 53
AnsibleExcecutionNameLabelLen = 63
// AnsibleExcecutionNameLabelLen max length for the ansibleEE execution name
AnsibleExcecutionNameLabelLen = 63
)
4 changes: 2 additions & 2 deletions tests/functional/openstackdataplanenodeset_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1044,15 +1044,15 @@ var _ = Describe("Dataplane NodeSet Test", func() {
})

It("Should change the ConfigHash", func() {
Eventually(func(g Gomega) error {
Eventually(func(_ Gomega) error {
instance := GetDataplaneNodeSet(dataplaneNodeSetName)
dataplaneConfigHash = instance.Status.ConfigHash
instance.Spec.NodeTemplate.Ansible.AnsibleVars = map[string]json.RawMessage{
"edpm_network_config_hide_sensitive_logs": json.RawMessage([]byte(`"true"`)),
}
return th.K8sClient.Update(th.Ctx, instance)
}).Should(Succeed())
Eventually(func(g Gomega) bool {
Eventually(func(_ Gomega) bool {
updatedInstance := GetDataplaneNodeSet(dataplaneNodeSetName)
return dataplaneConfigHash != updatedInstance.Status.ConfigHash
}).Should(BeTrue())
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/openstackdataplanenodeset_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var _ = Describe("DataplaneNodeSet Webhook", func() {
})

It("Should block changes to the BmhLabelSelector object in baremetalSetTemplate spec", func() {
Eventually(func(g Gomega) string {
Eventually(func(_ Gomega) string {
instance := GetDataplaneNodeSet(dataplaneNodeSetName)
instance.Spec.BaremetalSetTemplate = baremetalv1.OpenStackBaremetalSetSpec{
CloudUserName: "new-user",
Expand Down Expand Up @@ -77,7 +77,7 @@ var _ = Describe("DataplaneNodeSet Webhook", func() {
DeferCleanup(th.DeleteInstance, CreateDataplaneNodeSet(dataplaneNodeSetName, nodeSetSpec))
})
It("Should allow changes to the CloudUserName", func() {
Eventually(func(g Gomega) error {
Eventually(func(_ Gomega) error {
instance := GetDataplaneNodeSet(dataplaneNodeSetName)
instance.Spec.BaremetalSetTemplate = baremetalv1.OpenStackBaremetalSetSpec{
CloudUserName: "new-user",
Expand Down Expand Up @@ -137,7 +137,7 @@ var _ = Describe("DataplaneNodeSet Webhook", func() {
})

It("Should block duplicate node declaration", func() {
Eventually(func(g Gomega) string {
Eventually(func(_ Gomega) string {
newNodeSetSpec := DefaultDataPlaneNoNodeSetSpec(false)
newNodeSetSpec["preProvisioned"] = true
newNodeSetSpec["nodes"] = map[string]interface{}{
Expand All @@ -153,7 +153,7 @@ var _ = Describe("DataplaneNodeSet Webhook", func() {
})

It("Should block NodeSets if they contain a duplicate ansibleHost", func() {
Eventually(func(g Gomega) string {
Eventually(func(_ Gomega) string {
newNodeSetSpec := DefaultDataPlaneNoNodeSetSpec(false)
newNodeSetSpec["preProvisioned"] = true
newNodeSetSpec["nodes"] = map[string]interface{}{
Expand Down

0 comments on commit c6b6ab0

Please sign in to comment.