Skip to content
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

Adding Zone validation function for PowerFlex #821

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Updated client.go.
anathoodell committed Dec 17, 2024
commit 3573bd1351b88da9039482dccedc105458f8861e
9 changes: 3 additions & 6 deletions tests/shared/crclient/client.go
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@

// List implements client.Client.
func (f Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error {
_, log := logger.GetNewContextWithLogger("0")

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Image Scanner

declared and not used: log

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Golang Validation / Lint golang code

declared and not used: log) (typecheck)

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Golang Validation / Lint golang code

declared and not used: log) (typecheck)

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Golang Validation / Lint golang code

declared and not used: log) (typecheck)

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Golang Validation / Lint golang code

declared and not used: log) (typecheck)

Check failure on line 102 in tests/shared/crclient/client.go

GitHub Actions / Golang Validation / Lint golang code

declared and not used: log) (typecheck)

if f.ErrorInjector != nil {
if err := f.ErrorInjector.ShouldFail("List", list); err != nil {
@@ -111,26 +111,23 @@
return f.listPodList(l)
case *corev1.NodeList:

var labelValue string = ""
var labelKey string
// Initialize ListOptions
listOpts := &client.ListOptions{}
// Apply each ListOption to listOpts
if opts != nil {
anathoodell marked this conversation as resolved.
Show resolved Hide resolved
for _, opt := range opts {
if opt != nil {
opt.ApplyToList(listOpts)
//log.Infof("\t client.go List 2 opt %v %s\n", opt, opt)
//log.Infof("\t client.go List 2 listOpts %v\n", listOpts)
}
}
}
s := listOpts.LabelSelector
if s != nil {
log.Infof("\t client.go labelValue is non null set to '%s'\n", s.String())
labelValue = s.String()
labelKey = s.String()
}

return f.listNodeList(l, labelValue, "")
return f.listNodeList(l, labelKey)
case *appsv1.DeploymentList:
return f.listDeploymentList(ctx, &appsv1.DeploymentList{})
default:
Loading