Fn-prefix everything (#545)

* Fn-prefix everything

Closes: #492

* Global replacement

* missed one fn_
This commit is contained in:
Denis Makogon
2017-11-30 03:50:24 +02:00
committed by Chad Arimura
parent 64997ed0fe
commit 5c68a88599
18 changed files with 62 additions and 57 deletions

View File

@@ -7,13 +7,13 @@ Test dependencies
```bash
DOCKER_HOST - for building images
API_URL - Fn API endpoint
FN_API_URL - Fn API endpoint
```
How to run tests?
-----------------
```bash
export API_URL=http://localhost:8080
export FN_API_URL=http://localhost:8080
go test -v ./...
```

View File

@@ -24,7 +24,10 @@ import (
const lBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
func Host() string {
apiURL := "http://localhost:8080"
apiURL := os.Getenv("FN_API_URL")
if apiURL == "" {
apiURL = "http://localhost:8080"
}
u, err := url.Parse(apiURL)
if err != nil {
@@ -59,7 +62,7 @@ func getServerWithCancel() (*server.Server, context.CancelFunc) {
common.SetLogLevel("fatal")
timeString := time.Now().Format("2006_01_02_15_04_05")
dbURL := os.Getenv("DB_URL")
dbURL := os.Getenv(server.EnvDBURL)
tmpDir := os.TempDir()
tmpMq := fmt.Sprintf("%s/fn_integration_test_%s_worker_mq.db", tmpDir, timeString)
tmpDb := fmt.Sprintf("%s/fn_integration_test_%s_fn.db", tmpDir, timeString)