Nit: simplify config package import

This commit is contained in:
Chris Suszyński 2024-09-03 12:03:32 +02:00
parent 80ec4214a7
commit 8ddab3c57b
No known key found for this signature in database
GPG Key ID: 97CCAEB0D718922B
1 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ import (
"testing" "testing"
"knative.dev/client/pkg/commands" "knative.dev/client/pkg/commands"
config2 "knative.dev/client/pkg/config" "knative.dev/client/pkg/config"
"knative.dev/client/pkg/util" "knative.dev/client/pkg/util"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -135,8 +135,8 @@ func prepareTestSetup(t *testing.T, args ...interface{}) (string, func()) {
tmpPathDir := t.TempDir() tmpPathDir := t.TempDir()
// Prepare configuration to for our test // Prepare configuration to for our test
oldConfig := config2.GlobalConfig oldConfig := config.GlobalConfig
config2.GlobalConfig = &config2.TestConfig{ config.GlobalConfig = &config.TestConfig{
TestPluginsDir: tmpPathDir, TestPluginsDir: tmpPathDir,
TestLookupPluginsInPath: false, TestLookupPluginsInPath: false,
} }
@ -148,7 +148,7 @@ func prepareTestSetup(t *testing.T, args ...interface{}) (string, func()) {
} }
return tmpPathDir, func() { return tmpPathDir, func() {
config2.GlobalConfig = oldConfig config.GlobalConfig = oldConfig
} }
} }