Skip to content

Commit

Permalink
Changes necessary to support netctl login
Browse files Browse the repository at this point in the history
Changes:

- default http client is replaced by a http.Client in the ContivClient struct
- httpGet()/httpPost()/httpDelete() are moved into ContivClient and use the new internal http.Client
- added SetHttpClient() which allows for overriding the internal http.Client (to disable cert checking, add timeouts, etc.)
- added Login() function which performs a login POST request against auth_proxy
- added SetAuthToken() which adds a custom request header (X-Auth-Token) before requests are sent out
- httpGet()/httpPost()/httpDelete() are modified to set any custom request headers before performing the request
- added `make systemtests` target which runs everything under the systemtests dir

Signed-off-by: Bill Robinson <dseevr@users.noreply.github.com>
  • Loading branch information
dseevr committed May 4, 2017
1 parent 73fe9d8 commit 800d0ec
Show file tree
Hide file tree
Showing 4 changed files with 580 additions and 80 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.PHONY: all build godep modelgen
.PHONY: all build godep modelgen systemtests

all: build

Expand All @@ -11,3 +11,7 @@ godep:

modelgen:
@if [ -z "`which modelgen`" ]; then go get -v github.com/contiv/modelgen; fi

# systemtest runs all of the systemtests
systemtests:
go test -v -timeout 5m ./systemtests -check.v
Loading

0 comments on commit 800d0ec

Please sign in to comment.