Refactor: move to testing/logger

This commit is contained in:
Hidetake Iwata
2020-02-21 22:39:27 +09:00
parent f89525b184
commit aac8780caf
12 changed files with 51 additions and 51 deletions

View File

@@ -17,10 +17,10 @@ import (
"github.com/int128/kubelogin/pkg/adaptors/browser/mock_browser"
"github.com/int128/kubelogin/pkg/adaptors/credentialpluginwriter"
"github.com/int128/kubelogin/pkg/adaptors/credentialpluginwriter/mock_credentialpluginwriter"
"github.com/int128/kubelogin/pkg/adaptors/logger/mock_logger"
"github.com/int128/kubelogin/pkg/adaptors/tokencache"
"github.com/int128/kubelogin/pkg/di"
"github.com/int128/kubelogin/pkg/testing/jwt"
"github.com/int128/kubelogin/pkg/testing/logger"
)
// Run the integration tests of the credential plugin use-case.
@@ -282,7 +282,7 @@ func newCredentialPluginWriterMock(t *testing.T, ctrl *gomock.Controller, idToke
func runGetTokenCmd(t *testing.T, ctx context.Context, b browser.Interface, w credentialpluginwriter.Interface, args []string) {
t.Helper()
cmd := di.NewCmdForHeadless(mock_logger.New(t), b, w)
cmd := di.NewCmdForHeadless(logger.New(t), b, w)
exitCode := cmd.Run(ctx, append([]string{
"kubelogin", "get-token",
"--v=1",

View File

@@ -14,9 +14,9 @@ import (
"github.com/int128/kubelogin/integration_test/localserver"
"github.com/int128/kubelogin/pkg/adaptors/browser"
"github.com/int128/kubelogin/pkg/adaptors/browser/mock_browser"
"github.com/int128/kubelogin/pkg/adaptors/logger/mock_logger"
"github.com/int128/kubelogin/pkg/di"
"github.com/int128/kubelogin/pkg/testing/jwt"
"github.com/int128/kubelogin/pkg/testing/logger"
)
// Run the integration tests of the Login use-case.
@@ -265,7 +265,7 @@ func testStandalone(t *testing.T, idpTLS keys.Keys) {
func runRootCmd(t *testing.T, ctx context.Context, b browser.Interface, args []string) {
t.Helper()
cmd := di.NewCmdForHeadless(mock_logger.New(t), b, nil)
cmd := di.NewCmdForHeadless(logger.New(t), b, nil)
exitCode := cmd.Run(ctx, append([]string{
"kubelogin",
"--v=1",