Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-static
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-static
Commits
eec88389
Unverified
Commit
eec88389
authored
Apr 04, 2017
by
Terence Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update logging tests
parent
366e1db3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
9 deletions
+32
-9
static.json
spec/fixtures/debug/static.json
+0
-3
index.html
spec/fixtures/info/public_html/index.html
+0
-0
static.json
spec/fixtures/info/static.json
+5
-0
simple_spec.rb
spec/simple_spec.rb
+27
-6
No files found.
spec/fixtures/debug/static.json
deleted
100644 → 0
View file @
366e1db3
{
"debug"
:
true
}
spec/fixtures/
debug
/public_html/index.html
→
spec/fixtures/
info
/public_html/index.html
View file @
eec88389
File moved
spec/fixtures/info/static.json
0 → 100644
View file @
eec88389
{
"logging"
:
{
"error"
:
"info"
}
}
spec/simple_spec.rb
View file @
eec88389
...
...
@@ -10,7 +10,7 @@ require_relative "support/path_helper"
RSpec
.
describe
"Simple"
do
before
(
:all
)
do
@debug
=
tru
e
@debug
=
fals
e
BuildpackBuilder
.
new
(
@debug
,
ENV
[
'CIRCLECI'
])
RouterBuilder
.
new
(
@debug
,
ENV
[
'CIRCLECI'
])
ProxyBuilder
.
new
(
@debug
,
ENV
[
"CIRCLECI"
])
...
...
@@ -814,23 +814,44 @@ STATIC_JSON
end
end
describe
"debug"
do
let
(
:name
)
{
"debug"
}
describe
"logs"
do
let
(
:name
)
{
"info"
}
context
"when error log is set to info"
do
it
"should display info logs"
do
_
,
io_stream
=
app
.
get
(
"/"
,
true
)
expect
(
io_stream
.
string
).
to
include
(
"[info]"
)
end
end
context
"override debug when env var is set"
do
let
(
:app
)
{
AppRunner
.
new
(
name
,
proxy
,
env
,
true
,
!
ENV
[
'CIRCLECI'
])
}
let
(
:name
)
{
"hello_world"
}
context
"when debug is set"
do
it
"should display debug info"
do
_
,
io_stream
=
app
.
get
(
"/"
,
true
)
expect
(
io_stream
.
string
).
to
include
(
"[info]"
)
end
end
context
"
when debug isn't set
"
do
context
"
should default to normal logging
"
do
let
(
:name
)
{
"hello_world"
}
it
"should not display debug info"
do
it
"should not display debug info
and display access logs
"
do
skip
if
@debug
_
,
io_stream
=
app
.
get
(
"/"
,
true
)
expect
(
io_stream
.
string
).
not_to
include
(
"[info]"
)
expect
(
io_stream
.
string
).
to
include
(
"GET /"
)
end
end
context
"turn off all logging"
do
let
(
:name
)
{
"logging_access_off"
}
it
"should not log access"
do
_
,
io_stream
=
app
.
get
(
"/"
,
true
)
expect
(
io_stream
.
string
).
not_to
include
(
"[info]"
)
expect
(
io_stream
.
string
).
not_to
include
(
"GET /"
)
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment