Skip to content

Commit 8e8a754

Browse files
authored
🐛 ✅ Fixing Race Condition in Test (#296)
* Windows -> Linux * 🔧 Added Docker in Docker + Rename * 🐛 Listening starts before server is ready * 🔧 Pinning old version of faas-netes * ⚡ Enabled caching
1 parent e96b138 commit 8e8a754

File tree

5 files changed

+1303
-1295
lines changed

5 files changed

+1303
-1295
lines changed

.devcontainer/devcontainer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/go
33
{
4-
"name": "Go",
4+
"name": "Rabbit MQ Dev",
55
"build": {
66
"dockerfile": "Dockerfile",
77
"args": {
@@ -37,8 +37,11 @@
3737
"[go]": {
3838
"editor.codeActionsOnSave": {
3939
"source.organizeImports": true
40-
},
41-
},
40+
}
41+
}
42+
},
43+
"features": {
44+
"ghcr.io/devcontainers/features/docker-in-docker": "latest"
4245
},
4346
// Add the IDs of extensions you want installed when the container is created.
4447
"extensions": [

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
uses: actions/setup-go@v3
5151
with:
5252
go-version: 1.19
53+
cache: true
5354

5455
- name: Build
5556
run: go build -v ./...
@@ -103,6 +104,7 @@ jobs:
103104
uses: actions/setup-go@v3
104105
with:
105106
go-version: 1.19
107+
cache: true
106108

107109
- name: K8S Cluster Setup
108110
uses: helm/[email protected]
@@ -114,7 +116,7 @@ jobs:
114116
run: ark get faas-cli && sudo mv /home/runner/.arkade/bin/faas-cli /usr/local/bin/
115117

116118
- name: Setup OpenFaaS
117-
run: ark install openfaas --basic-auth=false
119+
run: ark install openfaas --basic-auth=false --set faasnetes.image=ghcr.io/openfaas/faas-netes:0.16.1 --set gateway.image=ghcr.io/openfaas/gateway:0.25.5
118120

119121
- name: Await OpenFaaS Port
120122
run: kubectl -n openfaas wait --for=condition=available --timeout=600s deploy/gateway

go.mod

+56-56
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
module github.com/Templum/rabbitmq-connector
2-
3-
go 1.19
4-
5-
require (
6-
github.com/docker/go-connections v0.4.0
7-
github.com/openfaas/connector-sdk v0.0.0-20201220114541-89f0ffcc5448
8-
github.com/openfaas/faas-provider v0.19.1
9-
github.com/pkg/errors v0.9.1
10-
github.com/spf13/afero v1.9.3
11-
github.com/streadway/amqp v1.0.0
12-
github.com/stretchr/testify v1.8.1
13-
github.com/testcontainers/testcontainers-go v0.15.0
14-
github.com/valyala/fasthttp v1.43.0
15-
go.uber.org/automaxprocs v1.5.1
16-
gopkg.in/yaml.v2 v2.4.0
17-
)
18-
19-
require (
20-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
21-
github.com/Microsoft/go-winio v0.5.2 // indirect
22-
github.com/Microsoft/hcsshim v0.9.4 // indirect
23-
github.com/andybalholm/brotli v1.0.4 // indirect
24-
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
25-
github.com/containerd/cgroups v1.0.4 // indirect
26-
github.com/containerd/containerd v1.6.8 // indirect
27-
github.com/davecgh/go-spew v1.1.1 // indirect
28-
github.com/docker/distribution v2.8.1+incompatible // indirect
29-
github.com/docker/docker v20.10.17+incompatible // indirect
30-
github.com/docker/go-units v0.5.0 // indirect
31-
github.com/gogo/protobuf v1.3.2 // indirect
32-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
33-
github.com/golang/protobuf v1.5.2 // indirect
34-
github.com/google/uuid v1.3.0 // indirect
35-
github.com/klauspost/compress v1.15.9 // indirect
36-
github.com/magiconair/properties v1.8.6 // indirect
37-
github.com/moby/sys/mount v0.3.3 // indirect
38-
github.com/moby/sys/mountinfo v0.6.2 // indirect
39-
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
40-
github.com/morikuni/aec v1.0.0 // indirect
41-
github.com/opencontainers/go-digest v1.0.0 // indirect
42-
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
43-
github.com/opencontainers/runc v1.1.3 // indirect
44-
github.com/pmezard/go-difflib v1.0.0 // indirect
45-
github.com/sirupsen/logrus v1.8.1 // indirect
46-
github.com/stretchr/objx v0.5.0 // indirect
47-
github.com/valyala/bytebufferpool v1.0.0 // indirect
48-
go.opencensus.io v0.23.0 // indirect
49-
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
50-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
51-
golang.org/x/text v0.3.7 // indirect
52-
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect
53-
google.golang.org/grpc v1.47.0 // indirect
54-
google.golang.org/protobuf v1.28.0 // indirect
55-
gopkg.in/yaml.v3 v3.0.1 // indirect
56-
)
1+
module github.com/Templum/rabbitmq-connector
2+
3+
go 1.19
4+
5+
require (
6+
github.com/docker/go-connections v0.4.0
7+
github.com/openfaas/connector-sdk v0.0.0-20201220114541-89f0ffcc5448
8+
github.com/openfaas/faas-provider v0.19.1
9+
github.com/pkg/errors v0.9.1
10+
github.com/spf13/afero v1.9.3
11+
github.com/streadway/amqp v1.0.0
12+
github.com/stretchr/testify v1.8.1
13+
github.com/testcontainers/testcontainers-go v0.15.0
14+
github.com/valyala/fasthttp v1.43.0
15+
go.uber.org/automaxprocs v1.5.1
16+
gopkg.in/yaml.v2 v2.4.0
17+
)
18+
19+
require (
20+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
21+
github.com/Microsoft/go-winio v0.5.2 // indirect
22+
github.com/Microsoft/hcsshim v0.9.4 // indirect
23+
github.com/andybalholm/brotli v1.0.4 // indirect
24+
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
25+
github.com/containerd/cgroups v1.0.4 // indirect
26+
github.com/containerd/containerd v1.6.8 // indirect
27+
github.com/davecgh/go-spew v1.1.1 // indirect
28+
github.com/docker/distribution v2.8.1+incompatible // indirect
29+
github.com/docker/docker v20.10.17+incompatible // indirect
30+
github.com/docker/go-units v0.5.0 // indirect
31+
github.com/gogo/protobuf v1.3.2 // indirect
32+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
33+
github.com/golang/protobuf v1.5.2 // indirect
34+
github.com/google/uuid v1.3.0 // indirect
35+
github.com/klauspost/compress v1.15.9 // indirect
36+
github.com/magiconair/properties v1.8.6 // indirect
37+
github.com/moby/sys/mount v0.3.3 // indirect
38+
github.com/moby/sys/mountinfo v0.6.2 // indirect
39+
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
40+
github.com/morikuni/aec v1.0.0 // indirect
41+
github.com/opencontainers/go-digest v1.0.0 // indirect
42+
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
43+
github.com/opencontainers/runc v1.1.3 // indirect
44+
github.com/pmezard/go-difflib v1.0.0 // indirect
45+
github.com/sirupsen/logrus v1.8.1 // indirect
46+
github.com/stretchr/objx v0.5.0 // indirect
47+
github.com/valyala/bytebufferpool v1.0.0 // indirect
48+
go.opencensus.io v0.23.0 // indirect
49+
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
50+
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
51+
golang.org/x/text v0.3.7 // indirect
52+
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect
53+
google.golang.org/grpc v1.47.0 // indirect
54+
google.golang.org/protobuf v1.28.0 // indirect
55+
gopkg.in/yaml.v3 v3.0.1 // indirect
56+
)

0 commit comments

Comments
 (0)