Skip to content

Commit

Permalink
Merge pull request mybuilder#101 from mybuilder/fix-travis
Browse files Browse the repository at this point in the history
Fix travis
  • Loading branch information
CyExy authored Nov 16, 2017
2 parents 7c0567a + 58c78e9 commit 6e37e0e
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 75 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ node_js:
before_install:
- docker run -d --name kong-database -e "POSTGRES_USER=kong" -e "POSTGRES_DB=kong" postgres:9.4
- sleep 5
- docker run -d --name kong --link kong-database:kong-database -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" -p 127.0.0.1:8001:8001 -p 127.0.0.1:8000:8000 kong:$KONG_VERSION
- docker run --rm --link kong-database:kong-database -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" kong:latest kong migrations up
- sleep 5
- docker run -d --name kong --link kong-database:kong-database -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" -e "KONG_PROXY_ACCESS_LOG=/dev/stdout" -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" -e "KONG_PROXY_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" -p 127.0.0.1:8001:8001 -p 127.0.0.1:8000:8000 kong:$KONG_VERSION
- sleep 5
- curl localhost:8001
10 changes: 5 additions & 5 deletions examples/consumer.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ HTTP 201 Created

```
{
"username": "iphone-app",
"created_at": "___created_at___",
"username": "iphone-app",
"id": "2b47ba9b-761a-492d-9a0c-000000000001"
}
```
Expand All @@ -56,10 +56,10 @@ HTTP 201 Created

```
{
"id": "2b47ba9b-761a-492d-9a0c-000000000002",
"created_at": "___created_at___",
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001",
"key": "very-secret-key",
"id": "2b47ba9b-761a-492d-9a0c-000000000002"
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001"
}
```

Expand All @@ -78,8 +78,8 @@ HTTP 201 Created
```
{
"group": "foo-group",
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001",
"created_at": "___created_at___",
"id": "2b47ba9b-761a-492d-9a0c-000000000003"
"id": "2b47ba9b-761a-492d-9a0c-000000000003",
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001"
}
```
12 changes: 6 additions & 6 deletions examples/global-plugin.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ HTTP 201 Created

```
{
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"created_at": "___created_at___",
"enabled": true,
"name": "cors",
"config": {
"credentials": false,
"preflight_continue": false,
"max_age": 7000
}
"max_age": 7000,
"preflight_continue": false
},
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"enabled": true,
"name": "cors"
}
```
45 changes: 23 additions & 22 deletions examples/key-auth.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ HTTP 201 Created

```
{
"username": "iphone-app",
"created_at": "___created_at___",
"username": "iphone-app",
"id": "2b47ba9b-761a-492d-9a0c-000000000001"
}
```
Expand All @@ -67,10 +67,10 @@ HTTP 201 Created

```
{
"id": "2b47ba9b-761a-492d-9a0c-000000000002",
"created_at": "___created_at___",
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001",
"key": "very-secret-key",
"id": "2b47ba9b-761a-492d-9a0c-000000000002"
"consumer_id": "2b47ba9b-761a-492d-9a0c-000000000001"
}
```

Expand All @@ -88,21 +88,21 @@ HTTP 201 Created

```
{
"http_if_terminated": true,
"id": "2b47ba9b-761a-492d-9a0c-000000000003",
"retries": 5,
"preserve_host": false,
"created_at": "___created_at___",
"upstream_connect_timeout": 60000,
"upstream_url": "http://mockbin.com",
"upstream_read_timeout": 60000,
"https_only": false,
"upstream_send_timeout": 60000,
"strip_uri": true,
"name": "mockbin",
"id": "2b47ba9b-761a-492d-9a0c-000000000003",
"hosts": [
"mockbin.com"
]
],
"name": "mockbin",
"http_if_terminated": false,
"preserve_host": false,
"upstream_url": "http://mockbin.com",
"upstream_connect_timeout": 60000,
"upstream_send_timeout": 60000,
"upstream_read_timeout": 60000,
"retries": 5,
"https_only": false
}
```

Expand All @@ -120,18 +120,19 @@ HTTP 201 Created

```
{
"api_id": "2b47ba9b-761a-492d-9a0c-000000000003",
"id": "2b47ba9b-761a-492d-9a0c-000000000004",
"created_at": "___created_at___",
"enabled": true,
"name": "key-auth",
"config": {
"hide_credentials": false,
"anonymous": "",
"key_names": [
"very-secret-key"
],
"key_in_body": false
}
"key_in_body": false,
"anonymous": "",
"run_on_preflight": true,
"hide_credentials": false
},
"id": "2b47ba9b-761a-492d-9a0c-000000000004",
"name": "key-auth",
"api_id": "2b47ba9b-761a-492d-9a0c-000000000003",
"enabled": true
}
```
22 changes: 11 additions & 11 deletions examples/simple-api.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ HTTP 201 Created

```
{
"http_if_terminated": true,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"retries": 5,
"preserve_host": false,
"created_at": "___created_at___",
"upstream_connect_timeout": 60000,
"upstream_url": "http://mockbin.com",
"upstream_read_timeout": 60000,
"https_only": false,
"upstream_send_timeout": 60000,
"strip_uri": true,
"name": "mockbin",
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"hosts": [
"mockbin.com"
]
],
"name": "mockbin",
"http_if_terminated": false,
"preserve_host": false,
"upstream_url": "http://mockbin.com",
"upstream_connect_timeout": 60000,
"upstream_send_timeout": 60000,
"upstream_read_timeout": 60000,
"retries": 5,
"https_only": false
}
```
42 changes: 24 additions & 18 deletions test-integration/__snapshots__/api.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -95,6 +95,7 @@ Array [
"key_names": Array [
"foobar",
],
"run_on_preflight": true,
},
"created_at": "___created_at___",
"enabled": true,
Expand Down Expand Up @@ -137,11 +138,12 @@ exports[`API plugins should add mockbin API with a plugins 2`] = `
attributes:
enabled: true
config:
hide_credentials: false
anonymous: ''
key_names:
- foobar
key_in_body: false
anonymous: ''
run_on_preflight: true
hide_credentials: false
attributes:
hosts:
- mockbin.com
Expand All @@ -153,7 +155,7 @@ exports[`API plugins should add mockbin API with a plugins 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down Expand Up @@ -189,7 +191,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -254,6 +256,7 @@ Array [
"key_names": Array [
"foobar",
],
"run_on_preflight": true,
},
"created_at": "___created_at___",
"enabled": true,
Expand Down Expand Up @@ -371,7 +374,7 @@ exports[`API plugins should remove mockbin api plugin 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down Expand Up @@ -407,7 +410,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -472,6 +475,7 @@ Array [
"key_names": Array [
"foobar",
],
"run_on_preflight": true,
},
"created_at": "___created_at___",
"enabled": true,
Expand Down Expand Up @@ -570,6 +574,7 @@ Array [
"key_names": Array [
"foobar",
],
"run_on_preflight": true,
},
"created_at": "___created_at___",
"enabled": false,
Expand Down Expand Up @@ -612,11 +617,12 @@ exports[`API plugins should update mockbin api plugin 2`] = `
attributes:
enabled: false
config:
hide_credentials: false
anonymous: ''
key_names:
- foobar
key_in_body: false
anonymous: ''
run_on_preflight: true
hide_credentials: false
attributes:
hosts:
- mockbin.com
Expand All @@ -628,7 +634,7 @@ exports[`API plugins should update mockbin api plugin 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down Expand Up @@ -664,7 +670,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -714,7 +720,7 @@ exports[`API should add the API 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down Expand Up @@ -750,7 +756,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -821,7 +827,7 @@ exports[`API should not update if already up to date 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down Expand Up @@ -857,7 +863,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -965,7 +971,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -1028,7 +1034,7 @@ Array [
"hosts": Array [
"mockbin.com",
],
"http_if_terminated": true,
"http_if_terminated": false,
"https_only": false,
"id": "2b47ba9b-761a-492d-9a0c-000000000001",
"name": "mockbin",
Expand Down Expand Up @@ -1081,7 +1087,7 @@ exports[`API should update the api 2`] = `
upstream_read_timeout: 60000
upstream_send_timeout: 60000
https_only: false
http_if_terminated: true
http_if_terminated: false
consumers: []
plugins: []
"
Expand Down
2 changes: 1 addition & 1 deletion test-integration/__snapshots__/bugs.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ plugins:
attributes:
enabled: true
config:
preflight_continue: false
credentials: false
preflight_continue: false
"
`;
Loading

0 comments on commit 6e37e0e

Please sign in to comment.