Fixed tests

This commit is contained in:
Diptanu Choudhury 2016-07-08 18:27:51 -07:00
parent 3c4002c48b
commit 5d61fa01f1
2 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"path/filepath" "path/filepath"
"reflect" "reflect"
"runtime/debug" "runtime/debug"
"strconv"
"strings" "strings"
"testing" "testing"
"time" "time"
@ -709,7 +710,7 @@ func TestDockerPortsMapping(t *testing.T) {
expectedEnvironment := map[string]string{ expectedEnvironment := map[string]string{
"NOMAD_ADDR_main": "127.0.0.1:8080", "NOMAD_ADDR_main": "127.0.0.1:8080",
"NOMAD_ADDR_REDIS": "127.0.0.1:6379", "NOMAD_ADDR_REDIS": "127.0.0.1:6379",
"NOMAD_HOST_PORT_main": "8080", "NOMAD_HOST_PORT_main": strconv.Itoa(docker_reserved),
} }
for key, val := range expectedEnvironment { for key, val := range expectedEnvironment {

View File

@ -129,15 +129,19 @@ func TestDriver_GetTaskEnv(t *testing.T) {
"NOMAD_ADDR_one": "1.2.3.4:80", "NOMAD_ADDR_one": "1.2.3.4:80",
"NOMAD_IP_one": "1.2.3.4", "NOMAD_IP_one": "1.2.3.4",
"NOMAD_PORT_one": "80", "NOMAD_PORT_one": "80",
"NOMAD_HOST_PORT_one": "80",
"NOMAD_ADDR_two": "1.2.3.4:443", "NOMAD_ADDR_two": "1.2.3.4:443",
"NOMAD_IP_two": "1.2.3.4", "NOMAD_IP_two": "1.2.3.4",
"NOMAD_PORT_two": "443", "NOMAD_PORT_two": "443",
"NOMAD_HOST_PORT_two": "443",
"NOMAD_ADDR_admin": "1.2.3.4:8081", "NOMAD_ADDR_admin": "1.2.3.4:8081",
"NOMAD_IP_admin": "1.2.3.4", "NOMAD_IP_admin": "1.2.3.4",
"NOMAD_PORT_admin": "8081", "NOMAD_PORT_admin": "8081",
"NOMAD_HOST_PORT_admin": "8081",
"NOMAD_ADDR_web": "1.2.3.4:8086", "NOMAD_ADDR_web": "1.2.3.4:8086",
"NOMAD_IP_web": "1.2.3.4", "NOMAD_IP_web": "1.2.3.4",
"NOMAD_PORT_web": "8086", "NOMAD_PORT_web": "8086",
"NOMAD_HOST_PORT_web": "8086",
"NOMAD_META_CHOCOLATE": "cake", "NOMAD_META_CHOCOLATE": "cake",
"NOMAD_META_STRAWBERRY": "icecream", "NOMAD_META_STRAWBERRY": "icecream",
"NOMAD_META_ELB_CHECK_INTERVAL": "30s", "NOMAD_META_ELB_CHECK_INTERVAL": "30s",