From ca4fb78ce9d5d1beb1833664b1070d13c9cac570 Mon Sep 17 00:00:00 2001 From: Rafael Almeida Date: Wed, 27 Mar 2019 15:14:43 +1300 Subject: [PATCH] chore (drone) trying to use NATS as a service in CI --- .drone.yml | 14 +++++++++----- .gitignore | 2 +- transit/nats/stan_test.go | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8aba4ced..56789515 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,12 +5,16 @@ platform: os: linux arch: amd64 +services: + - name: nats-streaming + image: nats-streaming + ports: + - 4222 + steps: - name: branch-push image: golang commands: - - apt-get update - - apt-get install unzip - go get -v golang.org/x/lint/golint - go get -v golang.org/x/tools/cmd/cover - go get -v github.com/mattn/goveralls @@ -19,9 +23,9 @@ steps: - go get -v github.com/onsi/ginkgo/ginkgo - go get -v github.com/onsi/gomega - go get -v github.com/moleculer-go/cupaloy - - curl -fSsL https://github.com/nats-io/nats-streaming-server/releases/download/v0.11.2/nats-streaming-server-v0.11.2-linux-amd64.zip -o nats.zip - - unzip nats.zip && ls - - nohup nats-*/nats-streaming-server -mc 0 -l /dev/null & + # - curl -fSsL https://github.com/nats-io/nats-streaming-server/releases/download/v0.11.2/nats-streaming-server-v0.11.2-linux-amd64.zip -o nats.zip + # - unzip nats.zip && ls + # - nohup nats-*/nats-streaming-server -mc 0 -l /dev/null & - mkdir /usr/local/go/src/github.com/ - mkdir /usr/local/go/src/github.com/moleculer-go - ln -s /drone/src/ /usr/local/go/src/github.com/moleculer-go/moleculer diff --git a/.gitignore b/.gitignore index a7b30582..c23d9017 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ .idea .DS_Store -broker/broker.coverprofile + diff --git a/transit/nats/stan_test.go b/transit/nats/stan_test.go index eab6947b..359d689f 100644 --- a/transit/nats/stan_test.go +++ b/transit/nats/stan_test.go @@ -83,7 +83,7 @@ var _ = Describe("NATS Streaming Transit", func() { contextA := context.BrokerContext(brokerDelegates) logger := contextA.Logger() var serializer serializer.Serializer = serializer.CreateJSONSerializer(logger) - url := "stan://localhost:4222" + url := "stan://nats-streaming:4222" options := nats.StanOptions{ "MOL", url,