fn: rename from fnctl (#321)

* fn: rename from fnctl

* fn: predicting the release version for installer

* fn: predicting the release version for installer
This commit is contained in:
C Cirello
2016-11-21 17:24:26 +01:00
committed by GitHub
parent 0343c4990c
commit c0512a4cbd
45 changed files with 172 additions and 172 deletions

25
fn/routes_test.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"net/http"
"os"
"testing"
)
func TestEnvAsHeader(t *testing.T) {
const expectedValue = "v=v"
os.Setenv("k", expectedValue)
cases := [][]string{
nil,
[]string{},
[]string{"k"},
}
for _, selectedEnv := range cases {
req, _ := http.NewRequest("GET", "http://www.example.com", nil)
envAsHeader(req, selectedEnv)
if found := req.Header.Get("k"); found != expectedValue {
t.Errorf("not found expected header: %v", found)
}
}
}