mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Merge branch 'cleanup-utils-imports-leftovers' into 'master'
Cleanup utils imports leftovers See merge request !92
This commit is contained in:
@@ -21,7 +21,6 @@ func Host() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("Couldn't parse API URL:", err)
|
log.Fatalln("Couldn't parse API URL:", err)
|
||||||
}
|
}
|
||||||
log.Println("trace: Host:", u.Host)
|
|
||||||
return u.Host
|
return u.Host
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import (
|
|||||||
|
|
||||||
fnclient "github.com/funcy/functions_go/client"
|
fnclient "github.com/funcy/functions_go/client"
|
||||||
client "gitlab-odx.oracle.com/odx/functions/fn/client"
|
client "gitlab-odx.oracle.com/odx/functions/fn/client"
|
||||||
utils "gitlab-odx.oracle.com/odx/functions/fn/utils"
|
|
||||||
apiroutes "github.com/funcy/functions_go/client/routes"
|
apiroutes "github.com/funcy/functions_go/client/routes"
|
||||||
fnmodels "github.com/funcy/functions_go/models"
|
fnmodels "github.com/funcy/functions_go/models"
|
||||||
"github.com/jmoiron/jsonq"
|
"github.com/jmoiron/jsonq"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"gitlab-odx.oracle.com/odx/functions/fn/utils"
|
"gitlab-odx.oracle.com/odx/functions/fn/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEnvAsHeader(t *testing.T) {
|
func TestEnvAsHeader(t *testing.T) {
|
||||||
@@ -18,7 +18,7 @@ func TestEnvAsHeader(t *testing.T) {
|
|||||||
}
|
}
|
||||||
for _, selectedEnv := range cases {
|
for _, selectedEnv := range cases {
|
||||||
req, _ := http.NewRequest("GET", "http://www.example.com", nil)
|
req, _ := http.NewRequest("GET", "http://www.example.com", nil)
|
||||||
utils.EnvAsHeader(req, selectedEnv)
|
client.EnvAsHeader(req, selectedEnv)
|
||||||
if found := req.Header.Get("k"); found != expectedValue {
|
if found := req.Header.Get("k"); found != expectedValue {
|
||||||
t.Errorf("not found expected header: %v", found)
|
t.Errorf("not found expected header: %v", found)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user