Skip to content

Commit

Permalink
Remove single use dependency (#229)
Browse files Browse the repository at this point in the history
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
  • Loading branch information
valaparthvi authored Dec 18, 2024
1 parent e1a21a6 commit cfd66eb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ require (
github.com/pkg/errors v0.9.1
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20241114104736-0d5b41ca9158
github.com/rancher-sandbox/qase-ginkgo v1.0.1
github.com/rancher/norman v0.5.0
github.com/rancher/rancher v0.0.0-00010101000000-000000000000
github.com/rancher/shepherd v0.0.0-20241113142845-1338e51b4891 // rancher/shepherd main commit
github.com/sirupsen/logrus v1.9.3
Expand Down Expand Up @@ -76,6 +75,7 @@ require (
github.com/rancher/fleet/pkg/apis v0.11.0 // indirect
github.com/rancher/gke-operator v1.10.0 // indirect
github.com/rancher/lasso v0.0.0-20240924233157-8f384efc8813 // indirect
github.com/rancher/norman v0.0.0-20241001183610-78a520c160ab // indirect
github.com/rancher/rancher/pkg/apis v0.0.0-20241113133627-598640d1556c // indirect
github.com/rancher/rke v1.7.0-rc.5 // indirect
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20240301001845-4eacc2dabbde // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ github.com/rancher/gke-operator v1.10.0 h1:vV9jLErnH5VRBpK/kCzem8T7/yEDqLVXIcv20
github.com/rancher/gke-operator v1.10.0/go.mod h1:k3oIJMCilpaLHeHPRy90S3pfZ05vbe+b+g1ISiHQbLo=
github.com/rancher/lasso v0.0.0-20240924233157-8f384efc8813 h1:V/LY8pUHZG9Kc+xEDWDOryOnCU6/Q+Lsr9QQEQnshpU=
github.com/rancher/lasso v0.0.0-20240924233157-8f384efc8813/go.mod h1:IxgTBO55lziYhTEETyVKiT8/B5Rg92qYiRmcIIYoPgI=
github.com/rancher/norman v0.5.0 h1:O77NXN4oyiXTbWG0VFDLGTbABsoAq5SjfSE9BYg1Z2Y=
github.com/rancher/norman v0.5.0/go.mod h1:qX/OG/4wY27xSAcSdRilUBxBumV6Ey2CWpAeaKnBQDs=
github.com/rancher/norman v0.0.0-20241001183610-78a520c160ab h1:ihK6See3y/JilqZlc0CG7NXPN+ue5nY9U7xUZUA8M7I=
github.com/rancher/norman v0.0.0-20241001183610-78a520c160ab/go.mod h1:qX/OG/4wY27xSAcSdRilUBxBumV6Ey2CWpAeaKnBQDs=
github.com/rancher/qase-go/client v0.0.0-20240308221502-c3b2635212be h1:+m6Jv5sAI4i5NwVYYUccJUK+ecp8eHInkZfMD8BgNjU=
github.com/rancher/qase-go/client v0.0.0-20240308221502-c3b2635212be/go.mod h1:NP3xboG+t2p+XMnrcrJ/L384Ki0Cp3Pww/X+vm5Jcy0=
github.com/rancher/rancher v0.0.0-20241119163817-d801b4924311 h1:1LQW1FxHHNhyPy4wvtM7o/7ZePjnQ6SwEqxV8giytlQ=
Expand Down
3 changes: 1 addition & 2 deletions hosted/eks/p1/p1_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
. "github.com/onsi/gomega"
"github.com/rancher-sandbox/ele-testhelpers/tools"
. "github.com/rancher-sandbox/qase-ginkgo"
"github.com/rancher/norman/types/slice"
"github.com/rancher/shepherd/clients/rancher"
management "github.com/rancher/shepherd/clients/rancher/generated/management/v3"
"github.com/rancher/shepherd/extensions/clusters"
Expand Down Expand Up @@ -99,7 +98,7 @@ func updateClusterInUpdatingState(cluster *management.Cluster, client *rancher.C
Expect(err).To(BeNil())

for _, loggingType := range loggingTypes {
exists = slice.ContainsString(*cluster.EKSStatus.UpstreamSpec.LoggingTypes, loggingType)
exists = helpers.ContainsString(*cluster.EKSStatus.UpstreamSpec.LoggingTypes, loggingType)
}
return exists && *cluster.EKSStatus.UpstreamSpec.KubernetesVersion == upgradeToVersion
}, "15m", "30s").Should(BeTrue())
Expand Down
9 changes: 9 additions & 0 deletions hosted/helpers/helper_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,12 @@ func GetRancherIP() (rancherIP string) {
}
return
}

func ContainsString(slice []string, item string) bool {
for _, j := range slice {
if j == item {
return true
}
}
return false
}

0 comments on commit cfd66eb

Please sign in to comment.