Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add a user provided conf #157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ http {
server_tokens off;

log_format common '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent';
log_format extended '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent vcap_request_id=$http_x_vcap_request_id';
log_format extended '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent';
access_log /dev/stdout extended;

# set $https only when SSL is actually used.
Expand Down
3 changes: 2 additions & 1 deletion integration/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func testDefault(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("SUCCESS: date loads.")).OnPort(8080).WithEndpoint("/index.php?date"))
Eventually(container).Should(Serve(ContainSubstring("<p>Hello World!</p>SUCCESS: date loads.")).OnPort(8080).WithEndpoint("/index.php?date"))
Eventually(container).Should(Serve(ContainSubstring("<p>Hello World!</p>ERROR: failed to load. </body>")).OnPort(8080).WithEndpoint("/random.userprovidedtest"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be misunderstanding the addition you made to the app, but why do we expect an error when we hit the userprovidedtest endpoint?

})
})
}
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Some user-provided server configuration
location ~* \.userprovidedtest$ {
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_pass php_fpm;
}