@@ -2,8 +2,10 @@ package integration_test
2
2
3
3
import (
4
4
"flag"
5
+ "fmt"
5
6
"html/template"
6
7
"os"
8
+ "os/exec"
7
9
"path/filepath"
8
10
"testing"
9
11
"time"
@@ -52,6 +54,19 @@ func TestIntegration(t *testing.T) {
52
54
repoName , err := switchblade .RandomName ()
53
55
Expect (err ).NotTo (HaveOccurred ())
54
56
57
+ // tech debt alert!
58
+ // remove this block when testing envs come with cflinuxfs4
59
+ // enabled staticfile & binary buildpacks.
60
+ if os .Getenv ("CF_STACK" ) == "cflinuxfs4" {
61
+ command := exec .Command ("cf" , "create-buildpack" , "staticfile_buildpack" , "https://github.com/cloudfoundry/staticfile-buildpack/releases/download/v1.6.0/staticfile-buildpack-cflinuxfs4-v1.6.0.zip" , "1" , "--enable" )
62
+ data , err := command .CombinedOutput ()
63
+ Expect (err ).NotTo (HaveOccurred (), fmt .Sprintf ("Failed to create staticfile_buildpack:\n %s\n %v" , string (data ), err ))
64
+
65
+ command = exec .Command ("cf" , "create-buildpack" , "binary_buildpack" , "https://github.com/cloudfoundry/binary-buildpack/releases/download/v1.1.3/binary-buildpack-cflinuxfs4-v1.1.3.zip" , "1" , "--enable" )
66
+ data , err = command .CombinedOutput ()
67
+ Expect (err ).NotTo (HaveOccurred (), fmt .Sprintf ("Failed to create binary_buildpack:\n %s\n %v" , string (data ), err ))
68
+ }
69
+
55
70
repoDeployment , _ , err := platform .Deploy .
56
71
WithBuildpacks ("staticfile_buildpack" ).
57
72
Execute (repoName , filepath .Join (root , "fixtures" , "repo" ))
0 commit comments