@@ -56,15 +56,12 @@ func TestBuildPod(t *testing.T) {
5656 env := make (map [string ]interface {})
5757 env ["KEY" ] = "VALUE"
5858
59- cacheDisabledEnv := make (map [string ]interface {})
60- cacheDisabledEnv ["DEIS_DISABLE_CACHE" ] = "1"
61-
6259 var pod * api.Pod
6360
6461 slugBuilds := []slugBuildCase {
6562 {true , "test" , "default" , emptyEnv , "tar" , "put-url" , "cache-url" , "deadbeef" , "" , "" , api .PullAlways , "" },
6663 {true , "test" , "default" , env , "tar" , "put-url" , "cache-url" , "deadbeef" , "" , "" , api .PullAlways , "" },
67- {true , "test" , "default" , cacheDisabledEnv , "tar" , "put-url" , "cache-url " , "deadbeef" , "" , "" , api .PullAlways , "" },
64+ {true , "test" , "default" , emptyEnv , "tar" , "put-url" , "" , "deadbeef" , "" , "" , api .PullAlways , "" },
6865 {true , "test" , "default" , emptyEnv , "tar" , "put-url" , "cache-url" , "deadbeef" , "buildpack" , "" , api .PullAlways , "" },
6966 {true , "test" , "default" , env , "tar" , "put-url" , "cache-url" , "deadbeef" , "buildpack" , "" , api .PullAlways , "" },
7067 {true , "test" , "default" , env , "tar" , "put-url" , "cache-url" , "deadbeef" , "buildpack" , "customimage" , api .PullAlways , "" },
@@ -100,12 +97,12 @@ func TestBuildPod(t *testing.T) {
10097 checkForEnv (t , pod , "TAR_PATH" , build .tarKey )
10198 checkForEnv (t , pod , "PUT_PATH" , build .putKey )
10299
103- if _ , ok := build .env ["DEIS_DISABLE_CACHE" ]; ! ok {
104- checkForEnv (t , pod , "CACHE_PATH" , build .cacheKey )
105- } else {
100+ if build .cacheKey == "" {
106101 if cachePath , err := envValueFromKey (pod , "CACHE_PATH" ); err == nil {
107102 t .Errorf ("expected CACHE_PATH not to be defined but it was defined with %v" , cachePath )
108103 }
104+ } else {
105+ checkForEnv (t , pod , "CACHE_PATH" , build .cacheKey )
109106 }
110107
111108 if build .buildPack != "" {
0 commit comments