Skip to content

Commit eea7abe

Browse files
committed
fix #327
1 parent 584e0ce commit eea7abe

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

e2e/pipeline_test.go

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ import (
88
hm "crypto/hmac"
99
"crypto/sha256"
1010
"fmt"
11+
"io/ioutil"
12+
"net/url"
13+
"os"
14+
"path/filepath"
15+
"regexp"
16+
"strings"
17+
"sync"
18+
"testing"
19+
"time"
20+
1121
"github.com/aws/aws-sdk-go/aws"
1222
"github.com/aws/aws-sdk-go/aws/session"
1323
"github.com/aws/aws-sdk-go/service/codecommit"
@@ -21,15 +31,6 @@ import (
2131
"gopkg.in/src-d/go-git.v4/plumbing/object"
2232
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
2333
"gopkg.in/yaml.v2"
24-
"io/ioutil"
25-
"net/url"
26-
"os"
27-
"path/filepath"
28-
"regexp"
29-
"strings"
30-
"sync"
31-
"testing"
32-
"time"
3334
)
3435

3536
var contexts []*common.Context
@@ -354,7 +355,9 @@ func setupRepo(sess *session.Session, name string, dir string) error {
354355
// git push
355356
remote, err := repo.CreateRemote(&config.RemoteConfig{
356357
Name: "origin",
357-
URL: common.StringValue(resp.RepositoryMetadata.CloneUrlHttp),
358+
URLs: []string{
359+
common.StringValue(resp.RepositoryMetadata.CloneUrlHttp),
360+
},
358361
})
359362
if err != nil {
360363
fmt.Printf("Failure create remote '%s'\n", name)
@@ -363,7 +366,10 @@ func setupRepo(sess *session.Session, name string, dir string) error {
363366

364367
username, password := credentialHelper(sess, common.StringValue(resp.RepositoryMetadata.CloneUrlHttp))
365368

366-
auth := http.NewBasicAuth(username, password)
369+
auth := &http.BasicAuth{
370+
Username: username,
371+
Password: password,
372+
}
367373
err = remote.Push(&git.PushOptions{
368374
RemoteName: "origin",
369375
Auth: auth,

0 commit comments

Comments
 (0)