@@ -34,6 +34,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
3434 context ("templated with env vars" , func () {
3535 it ("builds and runs the app" , func () {
3636 deployment , logs , err := platform .Deploy .
37+ WithBuildpacks ("nginx_buildpack" ).
3738 WithEnv (map [string ]string {
3839 "OVERRIDE" : `'{ "abcd": 12345 }{ \'ef\' : "ab" }'` ,
3940 }).
@@ -44,18 +45,17 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
4445
4546 Eventually (deployment ).Should (Serve (ContainSubstring (`{ "abcd": 12345 }{ 'ef' : "ab" }` )).WithEndpoint ("test" ))
4647
47-
4848 Eventually (func () string {
4949 logs , _ := deployment .RuntimeLogs ()
50- return logs
51- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET /test HTTP/1.1" 200` ),
52- ))
50+ return logs
51+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET /test HTTP/1.1" 200` )))
5352 })
5453 })
5554
5655 context ("templated with env vars with include" , func () {
5756 it ("builds and runs the app" , func () {
5857 deployment , logs , err := platform .Deploy .
58+ WithBuildpacks ("nginx_buildpack" ).
5959 WithEnv (map [string ]string {
6060 "OVERRIDE" : `'{ "abcd": 12345 }{ \'ef\' : "ab" }'` ,
6161 }).
@@ -68,49 +68,49 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
6868
6969 Eventually (func () string {
7070 logs , _ := deployment .RuntimeLogs ()
71- return logs
72- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET /test HTTP/1.1" 200` ),
73- ))
71+ return logs
72+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET /test HTTP/1.1" 200` )))
7473 })
7574 })
7675
7776 context ("with no specified pid" , func () {
7877 it ("builds and runs the app" , func () {
7978 deployment , _ , err := platform .Deploy .
79+ WithBuildpacks ("nginx_buildpack" ).
8080 Execute (name , filepath .Join (fixtures , "default" , "without_pid" ))
8181 Expect (err ).NotTo (HaveOccurred ())
8282
8383 Eventually (deployment ).Should (Serve (ContainSubstring ("Exciting Content" )))
8484
8585 Eventually (func () string {
8686 logs , _ := deployment .RuntimeLogs ()
87- return logs
88- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
89- ))
87+ return logs
88+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
9089
9190 })
9291 })
9392
9493 context ("with a specified pid" , func () {
9594 it ("builds and runs the app" , func () {
9695 deployment , _ , err := platform .Deploy .
96+ WithBuildpacks ("nginx_buildpack" ).
9797 Execute (name , filepath .Join (fixtures , "default" , "with_pid" ))
9898 Expect (err ).NotTo (HaveOccurred ())
9999
100100 Eventually (deployment ).Should (Serve (ContainSubstring ("Exciting Content" )))
101101
102102 Eventually (func () string {
103103 logs , _ := deployment .RuntimeLogs ()
104- return logs
105- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
106- ))
104+ return logs
105+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
107106
108107 })
109108 })
110109
111110 context ("with no specified version" , func () {
112111 it ("builds and runs the app and uses mainline" , func () {
113112 deployment , logs , err := platform .Deploy .
113+ WithBuildpacks ("nginx_buildpack" ).
114114 Execute (name , filepath .Join (fixtures , "default" , "unspecified_version" ))
115115 Expect (err ).NotTo (HaveOccurred ())
116116
@@ -121,15 +121,15 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
121121
122122 Eventually (func () string {
123123 logs , _ := deployment .RuntimeLogs ()
124- return logs
125- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
126- ))
124+ return logs
125+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
127126 })
128127 })
129128
130129 context ("with an app specifying mainline" , func () {
131130 it ("builds and runs the app" , func () {
132131 deployment , logs , err := platform .Deploy .
132+ WithBuildpacks ("nginx_buildpack" ).
133133 Execute (name , filepath .Join (fixtures , "default" , "mainline" ))
134134 Expect (err ).NotTo (HaveOccurred ())
135135
@@ -139,34 +139,34 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
139139
140140 Eventually (func () string {
141141 logs , _ := deployment .RuntimeLogs ()
142- return logs
143- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
144- ))
142+ return logs
143+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
145144 })
146145 })
147146
148147 context ("with an app specifying stable" , func () {
149148 it ("builds and runs the app" , func () {
150149 deployment , logs , err := platform .Deploy .
150+ WithBuildpacks ("nginx_buildpack" ).
151151 Execute (name , filepath .Join (fixtures , "default" , "stable" ))
152152 Expect (err ).NotTo (HaveOccurred ())
153153
154154 Eventually (logs ).Should (ContainSubstring (`Requested nginx version: stable => 1.26.` ))
155155 Eventually (logs ).Should (ContainSubstring (`Warning: usage of "stable" versions of NGINX is discouraged in most cases by the NGINX team.` ))
156156
157157 Eventually (deployment ).Should (Serve (ContainSubstring ("Exciting Content" )))
158-
158+
159159 Eventually (func () string {
160160 logs , _ := deployment .RuntimeLogs ()
161- return logs
162- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
163- ))
161+ return logs
162+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
164163 })
165164 })
166165
167166 context ("with an app unavailable version" , func () {
168167 it ("the build fails and logs and error" , func () {
169168 _ , logs , err := platform .Deploy .
169+ WithBuildpacks ("nginx_buildpack" ).
170170 Execute (name , filepath .Join (fixtures , "default" , "unavailable_version" ))
171171 Expect (err ).To (HaveOccurred ())
172172
@@ -177,6 +177,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
177177 context ("with using the stream module" , func () {
178178 it ("builds and runs the app" , func () {
179179 deployment , _ , err := platform .Deploy .
180+ WithBuildpacks ("nginx_buildpack" ).
180181 Execute (name , filepath .Join (fixtures , "default" , "with_stream_module" ))
181182 Expect (err ).NotTo (HaveOccurred ())
182183
@@ -187,6 +188,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
187188 context ("with an app that has no access to logging" , func () {
188189 it ("logs a warning and builds and runs the app" , func () {
189190 deployment , logs , err := platform .Deploy .
191+ WithBuildpacks ("nginx_buildpack" ).
190192 Execute (name , filepath .Join (fixtures , "default" , "no_logging" ))
191193 Expect (err ).NotTo (HaveOccurred ())
192194
@@ -199,16 +201,16 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
199201 context ("an Openresty app" , func () {
200202 it ("builds and runs the app" , func () {
201203 deployment , _ , err := platform .Deploy .
204+ WithBuildpacks ("nginx_buildpack" ).
202205 Execute (name , filepath .Join (fixtures , "default" , "openresty" ))
203206 Expect (err ).NotTo (HaveOccurred ())
204207
205208 Eventually (deployment ).Should (Serve (ContainSubstring ("<p>hello, world</p>" )))
206209
207210 Eventually (func () string {
208211 logs , _ := deployment .RuntimeLogs ()
209- return logs
210- }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` ),
211- ))
212+ return logs
213+ }, "10s" , "1s" ).Should (Or (ContainSubstring (`NginxLog "GET / HTTP/1.1" 200` )))
212214 })
213215 })
214216 }
0 commit comments