Skip to content

Commit

Permalink
Merge pull request #850 from buhongw7583c/task#800#rmRedisCacheLogger
Browse files Browse the repository at this point in the history
task#800RmLoggerRedisCache
  • Loading branch information
jananivMS authored Apr 1, 2020
2 parents 811ea40 + ba06b4d commit 7188c46
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ func setup() error {
scheme.Scheme,
)
redisCacheManager := resourcemanagerrediscaches.NewAzureRedisCacheManager(
ctrl.Log.WithName("rediscachemanager").WithName("RedisCache"),
secretClient,
scheme.Scheme,
)
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func main() {
resourceGroupManager := resourcemanagerresourcegroup.NewAzureResourceGroupManager()

redisCacheManager := resourcemanagerrediscache.NewAzureRedisCacheManager(
ctrl.Log.WithName("rediscachemanager").WithName("RedisCache"),
secretClient,
scheme,
)
Expand Down
5 changes: 1 addition & 4 deletions pkg/resourcemanager/rediscaches/rediscaches.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@ import (
"github.com/Azure/azure-service-operator/pkg/resourcemanager/iam"
"github.com/Azure/azure-service-operator/pkg/secrets"
"github.com/Azure/go-autorest/autorest/to"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
)

// AzureRedisCacheManager creates a new RedisCacheManager
type AzureRedisCacheManager struct {
Log logr.Logger
SecretClient secrets.SecretClient
Scheme *runtime.Scheme
}

// NewAzureRedisCacheManager creates a new RedisCacheManager
func NewAzureRedisCacheManager(log logr.Logger, secretClient secrets.SecretClient, scheme *runtime.Scheme) *AzureRedisCacheManager {
func NewAzureRedisCacheManager(secretClient secrets.SecretClient, scheme *runtime.Scheme) *AzureRedisCacheManager {
return &AzureRedisCacheManager{
Log: log,
SecretClient: secretClient,
Scheme: scheme,
}
Expand Down
6 changes: 2 additions & 4 deletions pkg/resourcemanager/rediscaches/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ var _ = BeforeSuite(func() {
tc = TestContext{
ResourceGroupName: resourceGroupName,
ResourceGroupLocation: resourceGroupLocation,
RedisCacheManager: &AzureRedisCacheManager{
Log: zaplogger,
},
ResourceGroupManager: resourceGroupManager,
RedisCacheManager: &AzureRedisCacheManager{},
ResourceGroupManager: resourceGroupManager,
}
})

Expand Down

0 comments on commit 7188c46

Please sign in to comment.