1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | var nock = require('nock');
|
17 |
|
18 | module.exports = function () {
|
19 |
|
20 | nock('http://localhost:80')
|
21 | .get('/api/v3/projects/5/repository/blobs/master')
|
22 | .query({"private_token": "zRtVsmeznn7ySatTrnrp", "per_page": "100", "filepath": "strider.json"})
|
23 | .reply(200, ["1f8b0800000000000003abe6525050ca4bcc4d55b25250cacd2c294a54d2010915a726e7e7a580048b12cb3221622519994560a1e2d2a24aa8bab4fcd2a2920c90605246625ea912572d170048d47f8653000000"], {
|
24 | server: 'nginx',
|
25 | date: 'Wed, 19 Aug 2015 14:12:21 GMT',
|
26 | 'content-type': 'text/plain',
|
27 | 'transfer-encoding': 'chunked',
|
28 | connection: 'close',
|
29 | status: '200 OK',
|
30 | etag: 'W/"079e2a69978805f09ba55d6f6b3705f2"',
|
31 | 'cache-control': 'max-age=0, private, must-revalidate',
|
32 | 'x-request-id': 'daffad5d-cdff-4f23-bd2d-aec209109619',
|
33 | 'x-runtime': '0.013665',
|
34 | 'content-encoding': 'gzip'
|
35 | });
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | nock('http://localhost:80')
|
41 | .get('/api/v3/projects/8/repository/blobs/master')
|
42 | .query({"private_token":"zRtVsmeznn7ySatTrnrp","per_page":"100","filepath":"strider.json"})
|
43 | .reply(404, ["1f8b0800000000000003ab56ca4d2d2e4e4c4f55b2523231305170cbcc4955f0cb2f5170cb2fcd4b51aa0500db72e71020000000"], { server: 'nginx',
|
44 | date: 'Mon, 24 Aug 2015 06:28:17 GMT',
|
45 | 'content-type': 'application/json',
|
46 | 'transfer-encoding': 'chunked',
|
47 | connection: 'close',
|
48 | status: '404 Not Found',
|
49 | 'cache-control': 'no-cache',
|
50 | 'x-request-id': '9e221d4c-9109-4291-929b-2e7cb1e4f057',
|
51 | 'x-runtime': '0.022119',
|
52 | 'content-encoding': 'gzip' });
|
53 | };
|