Skip to content

Commit 69444bb

Browse files
committed
1.5.0
Fix tests
1 parent 38082fc commit 69444bb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "docker-apt-cacher-ng",
3-
"version": "1.0.0",
3+
"version": "1.5.0",
44
"description": "tests for docker ",
55
"main": "index.js",
66
"scripts": {
7-
"test": "mocha"
7+
"test": "mocha test/*.coffee"
88
},
99
"repository": {
1010
"type": "git",

test/functional_aptcacherng.coffee

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ getCacherPage = ( repo_url )->
1212

1313
describe 'cache requests', ->
1414

15-
1615
it 'responds with an apt error for a directory', ->
1716
getCacherPage 'http://dl-cdn.alpinelinux.org/alpine/v3.5/', request_options
1817
.then (res) ->
@@ -24,12 +23,15 @@ describe 'cache requests', ->
2423

2524
describe 'pulling a file', ->
2625

27-
this.timeout(5000)
2826
file_request_options = request_options
2927
res = null
3028

3129
before ->
32-
res = getCacherPage 'http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz', file_request_options
30+
@timeout(5000)
31+
getCacherPage 'http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz', file_request_options
32+
.then (result) ->
33+
debug(result)
34+
res = result
3335

3436
it 'sould return a response', ->
3537
expect( res ).to.be.ok
@@ -41,7 +43,7 @@ describe 'cache requests', ->
4143
expect( res.headers ).to.be.ok
4244

4345
it 'should have a bzip content type', ->
44-
expect( res.headers['content-type'] ).to.equal 'application/x-gzip'
46+
expect( res.headers['content-type'] ).to.equal 'application/octet-stream'
4547

4648
it 'should have a statusCode of 200', ->
4749
expect( res.statusCode ).to.equal 200

test/mocha.opts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--compilers coffee:coffeescript/register
1+
--require coffeescript/register
22
--require test/fixture/mocha_setup
33
--reporter spec
44
--ui bdd

0 commit comments

Comments
 (0)