Skip to content

Commit

Permalink
Fix-up for ldap unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Chad Roberts <chad.roberts@suse.com>
  • Loading branch information
crobby committed Oct 22, 2024
1 parent 0752663 commit 56f118b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/auth/providers/ldap/ldap_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"testing"
"time"

wcorev1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"

ldapv3 "github.com/go-ldap/ldap/v3"
"github.com/pkg/errors"

"github.com/rancher/norman/types"
v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"
"github.com/rancher/rancher/pkg/auth/tokens"
corev1 "github.com/rancher/rancher/pkg/generated/norman/core/v1"
v3 "github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3"
"github.com/rancher/rancher/pkg/user"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -31,7 +32,7 @@ func Test_ldapProvider_loginUser(t *testing.T) {
type fields struct {
ctx context.Context
authConfigs v3.AuthConfigInterface
secrets corev1.SecretInterface
secrets wcorev1.SecretController
userMGR mockUserManager
tokenMGR *tokens.Manager
certs string
Expand Down
5 changes: 3 additions & 2 deletions pkg/auth/providers/ldap/ldap_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"reflect"
"testing"

wcorev1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"

"github.com/rancher/norman/objectclient"
v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"
"github.com/rancher/rancher/pkg/auth/tokens"
corev1 "github.com/rancher/rancher/pkg/generated/norman/core/v1"
v3 "github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3"
"github.com/rancher/rancher/pkg/user"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -82,7 +83,7 @@ func Test_ldapProvider_getLDAPConfig(t *testing.T) {
type fields struct {
ctx context.Context
authConfigs v3.AuthConfigInterface
secrets corev1.SecretInterface
secrets wcorev1.SecretController
userMGR user.Manager
tokenMGR *tokens.Manager
certs string
Expand Down

0 comments on commit 56f118b

Please # to comment.