This commit is contained in:
knqyf263
2019-04-08 00:16:26 +09:00
parent c7208b3efa
commit 0954e0f44b
2 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import (
"testing"
)
func TestExtract(t *testing.T) {
func TestExtractFromFile(t *testing.T) {
vectors := []struct {
file string // Test input file
filenames []string // Target files
@@ -52,7 +52,7 @@ func TestExtract(t *testing.T) {
defer f.Close()
d := DockerExtractor{}
fm, err := d.Extract(f, v.filenames)
fm, err := d.ExtractFromFile(nil, f, v.filenames)
if v.err != err {
t.Errorf("err: got %v, want %v", v.err, err)
}

View File

@@ -5,10 +5,10 @@ import (
"encoding/base64"
"strings"
"github.com/prometheus/common/log"
"golang.org/x/xerrors"
"log"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ecr"
"github.com/docker/docker/api/types"
@@ -34,7 +34,7 @@ func GetToken(ctx context.Context, auth types.AuthConfig) types.AuthConfig {
username, password, err = GetGCRAuthorizationToken(ctx)
}
if err != nil {
log.Debugf("failed to get token: %w", err)
log.Printf("failed to get token: %s", err)
}
auth.Username = username
auth.Password = password