Merge pull request #609 from ansible-semaphore/fix-dredd-tests

Fix Dredd tests
This commit is contained in:
Denis Gukov 2020-10-01 14:53:51 +05:00 committed by GitHub
commit f3c53e2346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 18 deletions

31
.dredd/dredd.dev.yml Normal file
View File

@ -0,0 +1,31 @@
dry-run: null
hookfiles: ./.dredd/compiled_hooks
language: go
#server: context=dev task dc:up
server-wait: 240
init: false
custom: {}
names: false
only: []
reporter: []
output: []
header: "Authorization: bearer h4a_i4qslpnxyyref71rk5nqbwxccrs7enwvggx0vfs="
sorted: false
user: null
inline-errors: false
details: false
method: []
color: true
loglevel: debug
path: []
hooks-worker-timeout: 5000
hooks-worker-connect-timeout: 1500
hooks-worker-connect-retry: 500
hooks-worker-after-connect-wait: 100
hooks-worker-term-timeout: 5000
hooks-worker-term-retry: 500
hooks-worker-handler-host: 0.0.0.0
hooks-worker-handler-port: 61321
config: ./.dredd/dredd.yml
blueprint: api-docs.yml
endpoint: 'http://semaphore_ci:3000'

View File

@ -28,4 +28,4 @@ hooks-worker-handler-host: 0.0.0.0
hooks-worker-handler-port: 61321
config: ./.dredd/dredd.yml
blueprint: api-docs.yml
endpoint: 'http://semaphore_ci:3000'
endpoint: 'http://localhost:3000'

View File

@ -44,17 +44,17 @@ Windows users will additionally need to manually install goreleaser from https:/
4) Set up config, database & run migrations
```
cat <<EOT >> config.json
{
"mysql": {
"host": "127.0.0.1:3306",
"user": "root",
"pass": "",
"name": "semaphore"
},
"port": ":3000"
}
EOT
cat <<EOT >> config.json
{
"mysql": {
"host": "127.0.0.1:3306",
"user": "root",
"pass": "",
"name": "semaphore"
},
"port": ":3000"
}
EOT
echo "create database semaphore;" | mysql -uroot -p
task compile

View File

@ -511,7 +511,7 @@ paths:
description: Your session was successfully nuked
# User Tokens
/user:
/user/:
get:
tags:
- user
@ -595,7 +595,7 @@ paths:
schema:
$ref: "#/definitions/User"
/users/{user_id}:
/users/{user_id}/:
parameters:
- $ref: "#/parameters/user_id"
get:
@ -704,7 +704,7 @@ paths:
items:
$ref: '#/definitions/Event'
/project/{project_id}:
/project/{project_id}/:
parameters:
- $ref: "#/parameters/project_id"
get:

View File

@ -4,7 +4,7 @@ services:
dredd:
image: ansiblesemaphore/dredd:dev-compose
command: ["--config", ".dredd/dredd.local.yml"]
command: ["--config", ".dredd/dredd.dev.yml"]
build:
context: ./../../../
dockerfile: ./deployment/docker/dev/dredd.Dockerfile

2
go.mod
View File

@ -40,7 +40,7 @@ require (
github.com/radovskyb/watcher v1.0.7 // indirect
github.com/russross/blackfriday v1.5.2
github.com/sirupsen/logrus v1.4.2 // indirect
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa // indirect
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa
github.com/spf13/cobra v0.0.5 // indirect
github.com/ziutek/mymysql v1.5.4 // indirect
golang.org/x/crypto v0.0.0-20200208060501-ecb85df21340