Skip to content

Commit

Permalink
Merge pull request kubernetes#82 from danielnorberg/dano/fix-cloudcfg…
Browse files Browse the repository at this point in the history
…-test-dorequest

cloudcfg: fix TestDoRequest
  • Loading branch information
brendandburns committed Jun 12, 2014
2 parents 3e1e3d9 + 75957dc commit c0f41e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cloudcfg/cloudcfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"testing"

. "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)

Expand Down Expand Up @@ -152,7 +153,8 @@ func TestDoRequest(t *testing.T) {
}
testServer := httptest.NewTLSServer(&fakeHandler)
request, _ := http.NewRequest("GET", testServer.URL+"/foo/bar", nil)
body, err := DoRequest(request, "user", "pass")
auth := client.AuthInfo{User: "user", Password: "pass"}
body, err := DoRequest(request, &auth)
if request.Header["Authorization"] == nil {
t.Errorf("Request is missing authorization header: %#v", *request)
}
Expand Down

0 comments on commit c0f41e2

Please sign in to comment.