Skip to content

Commit 1858bba

Browse files
authored
Merge pull request #434 from hellofresh/patch/rm-comply
Delete .comply.yaml
2 parents 85fea61 + 46ad4d0 commit 1858bba

File tree

10 files changed

+51
-86
lines changed

10 files changed

+51
-86
lines changed

.comply.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ services:
55
- docker
66

77
go:
8-
- 1.12
8+
- "1.12"
9+
- "1.13"
10+
- "1.14"
11+
- "stable"
912

1013
env:
1114
- MAKE_TASK=test

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ all: clean deps test build
1515
deps:
1616
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
1717
@go get -u golang.org/x/lint/golint
18-
@go get -u github.com/DATA-DOG/godog/cmd/godog
18+
@go get -u github.com/cucumber/godog/cmd/godog
1919

2020
build:
2121
@echo "$(OK_COLOR)==> Building... $(NO_COLOR)"
2222
@/bin/sh -c "JANUS_BUILD_ONLY_DEFAULT=$(JANUS_BUILD_ONLY_DEFAULT) PKG_SRC=$(PKG_SRC) VERSION=$(VERSION) ./build/build.sh"
2323

2424
test: lint format vet
2525
@echo "$(OK_COLOR)==> Running tests$(NO_COLOR)"
26-
@go test -v -cover ./...
26+
@go test -cover ./...
2727

2828
test-integration: lint format vet
2929
@echo "$(OK_COLOR)==> Running tests$(NO_COLOR)"
30-
@go test -v -cover -tags=integration ./...
30+
@go test -cover -tags=integration ./...
3131

3232
test-features:
3333
@/bin/sh -c "JANUS_BUILD_ONLY_DEFAULT=1 PKG_SRC=$(PKG_SRC) ./build/build.sh"

build/features.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export API_PORT=${API_PORT_PRIMARY}
6262
# make sure app started
6363
sleep 1
6464

65-
go test -godog -stop-on-failure
65+
godog --format=pretty --random --stop-on-failure --strict
6666
exit_code=$?
6767

6868
kill ${pid_janus}

features/bootstrap/context_api.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package bootstrap
33
import (
44
"time"
55

6-
"github.com/DATA-DOG/godog"
7-
"github.com/hellofresh/janus/pkg/api"
6+
"github.com/cucumber/godog"
87
"github.com/pkg/errors"
8+
9+
"github.com/hellofresh/janus/pkg/api"
910
)
1011

1112
// RegisterAPIContext registers godog suite context for handling API related steps

features/bootstrap/context_misc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package bootstrap
33
import (
44
"time"
55

6-
"github.com/DATA-DOG/godog"
6+
"github.com/cucumber/godog"
77
)
88

99
const durationAWhile = time.Second

features/bootstrap/context_request.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/DATA-DOG/godog"
13-
"github.com/DATA-DOG/godog/gherkin"
14-
jwtgo "github.com/dgrijalva/jwt-go"
12+
"github.com/cucumber/godog"
13+
"github.com/cucumber/godog/gherkin"
14+
jwtGo "github.com/dgrijalva/jwt-go"
15+
"github.com/tidwall/gjson"
16+
1517
"github.com/hellofresh/janus/pkg/config"
1618
"github.com/hellofresh/janus/pkg/jwt"
17-
"github.com/tidwall/gjson"
1819
)
1920

2021
const (
@@ -233,7 +234,7 @@ func (c *requestContext) requestJWTTokenIsNotSet() error {
233234

234235
func (c *requestContext) requestJWTTokenIsValidAdminToken() error {
235236
jwtConfig := jwt.NewGuard(c.adminCred)
236-
accessToken, err := jwt.IssueAdminToken(jwtConfig.SigningMethod, jwtgo.MapClaims{}, jwtConfig.Timeout)
237+
accessToken, err := jwt.IssueAdminToken(jwtConfig.SigningMethod, jwtGo.MapClaims{}, jwtConfig.Timeout)
237238
if nil != err {
238239
return fmt.Errorf("failed to issue JWT: %v", err)
239240
}

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ go 1.12
55
require (
66
code.cloudfoundry.org/bytefmt v0.0.0-20180108190415-b31f603f5e1e
77
github.com/BurntSushi/toml v0.3.1 // indirect
8-
github.com/DATA-DOG/godog v0.7.13
98
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a // indirect
109
github.com/Knetic/govaluate v3.0.0+incompatible
1110
github.com/afex/hystrix-go v0.0.0-20180406012432-f86abeeb9f72
1211
github.com/asaskevich/govalidator v0.0.0-20171111151018-521b25f4b05f
1312
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
1413
github.com/cactus/go-statsd-client v3.1.1+incompatible // indirect
14+
github.com/cucumber/godog v0.8.1
1515
github.com/davecgh/go-spew v1.1.0 // indirect
1616
github.com/dgrijalva/jwt-go v3.2.0+incompatible
1717
github.com/felixge/httpsnoop v1.0.0
@@ -58,12 +58,12 @@ require (
5858
github.com/tidwall/match v1.0.0 // indirect
5959
github.com/ulule/limiter v2.2.2+incompatible
6060
go.opencensus.io v0.18.0
61-
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 // indirect
62-
golang.org/x/net v0.0.0-20191003171128-d98b1b443823
61+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
62+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
6363
golang.org/x/oauth2 v0.0.0-20180118004544-b28fcf2b08a1
64-
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
6564
golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect
6665
golang.org/x/text v0.3.2 // indirect
66+
golang.org/x/tools v0.0.0-20200319210407-521f4a0cd458 // indirect
6767
google.golang.org/appengine v1.0.0 // indirect
6868
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
6969
gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect

go.sum

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ code.cloudfoundry.org/bytefmt v0.0.0-20180108190415-b31f603f5e1e h1:R3Kkucb2Lbd/
22
code.cloudfoundry.org/bytefmt v0.0.0-20180108190415-b31f603f5e1e/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc=
33
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
44
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
5-
github.com/DATA-DOG/godog v0.7.13 h1:JmgpKcra7Vf3yzI9vPsWyoQRx13tyKziHtXWDCUUgok=
6-
github.com/DATA-DOG/godog v0.7.13/go.mod h1:z2OZ6a3X0/YAKVqLfVzYBwFt3j6uSt3Xrqa7XTtcQE0=
75
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a h1:zpQSzEApXM0qkXcpdjeJ4OpnBWhD/X8zT/iT1wYLiVU=
86
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
97
github.com/Knetic/govaluate v3.0.0+incompatible h1:7o6+MAPhYTCF0+fdvoz1xDedhRb4f6s9Tn1Tt7/WTEg=
@@ -20,6 +18,8 @@ github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0
2018
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
2119
github.com/cactus/go-statsd-client v3.1.1+incompatible h1:p97okCU2aaeSxQ6KzMdGEwQkiGBMys71/J0XWoirbJY=
2220
github.com/cactus/go-statsd-client v3.1.1+incompatible/go.mod h1:cMRcwZDklk7hXp+Law83urTHUiHMzCev/r4JMYr/zU0=
21+
github.com/cucumber/godog v0.8.1 h1:lVb+X41I4YDreE+ibZ50bdXmySxgRviYFgKY6Aw4XE8=
22+
github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA=
2323
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2424
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2525
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
@@ -136,24 +136,36 @@ github.com/tidwall/match v1.0.0 h1:Ym1EcFkp+UQ4ptxfWlW+iMdq5cPH5nEuGzdf/Pb7VmI=
136136
github.com/tidwall/match v1.0.0/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
137137
github.com/ulule/limiter v2.2.2+incompatible h1:1lk9jesmps1ziYHHb4doL7l5hFkYYYA3T8dkNyw7ffY=
138138
github.com/ulule/limiter v2.2.2+incompatible/go.mod h1:VJx/ZNGmClQDS5F6EmsGqK8j3jz1qJYZ6D9+MdAD+kw=
139+
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
139140
go.opencensus.io v0.10.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0=
140141
go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938=
141142
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
142143
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
143144
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0=
144145
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
146+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
147+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
148+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
149+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
150+
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
151+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
145152
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
146153
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
147154
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
148155
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
156+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
149157
golang.org/x/net v0.0.0-20191003171128-d98b1b443823 h1:Ypyv6BNJh07T1pUSrehkLemqPKXhus2MkfktJ91kRh4=
150158
golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
159+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
160+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
151161
golang.org/x/oauth2 v0.0.0-20180118004544-b28fcf2b08a1 h1:gRThnsUxGd2h5EB2AOiqLcAxfMF3Y2LQCeru8REL+p0=
152162
golang.org/x/oauth2 v0.0.0-20180118004544-b28fcf2b08a1/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
153163
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
154164
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
155165
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
156166
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
167+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
168+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
157169
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
158170
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
159171
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -167,6 +179,14 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
167179
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
168180
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
169181
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
182+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
183+
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuHtwM6KV/vb4U85g/cigFY=
184+
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
185+
golang.org/x/tools v0.0.0-20200319210407-521f4a0cd458 h1:DgonIcqC7u+gVZX7lpuReBil5B/i8fvW/hAQdhT6/ao=
186+
golang.org/x/tools v0.0.0-20200319210407-521f4a0cd458/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
187+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
188+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
189+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
170190
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf h1:rjxqQmxjyqerRKEj+tZW+MCm4LgpFXu18bsEoCMgDsk=
171191
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
172192
google.golang.org/appengine v1.0.0 h1:dN4LljjBKVChsv0XCSI+zbyzdqrkEwX5LQFUMRSGqOc=

godog_test.go

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,19 @@ package main
22

33
import (
44
"context"
5-
"flag"
65
"net/url"
76
"os"
87
"strconv"
98
"testing"
10-
"time"
119

12-
"github.com/DATA-DOG/godog"
10+
"github.com/cucumber/godog"
11+
"github.com/stretchr/testify/assert"
12+
1313
"github.com/hellofresh/janus/features/bootstrap"
1414
"github.com/hellofresh/janus/pkg/api"
1515
"github.com/hellofresh/janus/pkg/config"
16-
"github.com/stretchr/testify/assert"
17-
)
18-
19-
var (
20-
runGoDogTests bool
21-
stopOnFailure bool
2216
)
2317

24-
func init() {
25-
flag.BoolVar(&runGoDogTests, "godog", false, "Set this flag is you want to run godog BDD tests")
26-
flag.BoolVar(&stopOnFailure, "stop-on-failure", false, "Stop processing on first failed scenario.. Flag is passed to godog")
27-
flag.Parse()
28-
}
29-
3018
func FeatureContext(s *godog.Suite) {
3119
c, err := config.LoadEnv()
3220
if nil != err {
@@ -36,6 +24,10 @@ func FeatureContext(s *godog.Suite) {
3624
var apiRepo api.Repository
3725

3826
dsnURL, err := url.Parse(c.Database.DSN)
27+
if nil != err {
28+
panic(err)
29+
}
30+
3931
switch dsnURL.Scheme {
4032
case "mongodb":
4133
apiRepo, err = api.NewMongoAppRepository(c.Database.DSN, c.BackendFlushInterval)
@@ -76,24 +68,3 @@ func FeatureContext(s *godog.Suite) {
7668
func Test_Fake(t *testing.T) {
7769
assert.True(t, true)
7870
}
79-
80-
func TestMain(m *testing.M) {
81-
if !runGoDogTests {
82-
os.Exit(m.Run())
83-
}
84-
85-
status := godog.RunWithOptions("Janus", func(s *godog.Suite) {
86-
FeatureContext(s)
87-
}, godog.Options{
88-
Format: "pretty",
89-
Paths: []string{"features"},
90-
Randomize: time.Now().UTC().UnixNano(),
91-
StopOnFailure: stopOnFailure,
92-
})
93-
94-
if st := m.Run(); st > status {
95-
status = st
96-
}
97-
98-
os.Exit(status)
99-
}

0 commit comments

Comments
 (0)