From 4fdcc86294b150eb7f71643e6e3803f15c036a23 Mon Sep 17 00:00:00 2001 From: Flavia Pezoti Date: Thu, 9 Jul 2020 17:48:36 -0300 Subject: [PATCH] Move all integ tests into a same Spec and mark the ones failing previously as Pending There were an "Integration" and an "Integration2" test Spec. Only Integration2 was being ran by our targets, I put all tests under the same Spec and marked the ones in "Integration" that were failing as pending. Also modified the `make integration` target to skip unit tests and focus only in Integration ones --- .travis.yml | 2 +- Makefile | 2 +- extensions/gcm_message_handler_test.go | 2 +- extensions/kafka_consumer_test.go | 2 +- extensions/pg_test.go | 2 +- feedback/kafka_consumer_test.go | 2 +- feedback/listener_test.go | 2 +- travis_install_kafka.sh => travis-install-librkafka.sh | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename travis_install_kafka.sh => travis-install-librkafka.sh (100%) diff --git a/.travis.yml b/.travis.yml index a8432d2..3425256 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ cache: directories: - "$HOME/.cache/librdkafka" before_install: -- sudo /bin/bash ./travis_install_kafka.sh +- sudo /bin/bash ./travis-install-librkafka.sh install: - make setup-ci script: diff --git a/Makefile b/Makefile index 398ac0b..329f3e6 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,7 @@ test-integration integration func: deps test-db-drop test-db-create @echo "= Running integration tests... =" @echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" @echo - @env MY_IP=${MY_IP} ginkgo -r -tags=integration --randomizeAllSpecs --randomizeSuites --skip="\[Integration\].*" . + @env MY_IP=${MY_IP} ginkgo -r -tags=integration --randomizeAllSpecs --randomizeSuites --focus="\[Integration\].*" . @echo @echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" @echo "= Integration tests finished. =" diff --git a/extensions/gcm_message_handler_test.go b/extensions/gcm_message_handler_test.go index 70c450b..f739a7c 100644 --- a/extensions/gcm_message_handler_test.go +++ b/extensions/gcm_message_handler_test.go @@ -702,7 +702,7 @@ var _ = Describe("GCM Message Handler", func() { hook.Reset() }) - Describe("Creating new handler", func() { + PDescribe("Creating new handler", func() { It("should fail when real client", func() { var err error handler, err = NewGCMMessageHandler( diff --git a/extensions/kafka_consumer_test.go b/extensions/kafka_consumer_test.go index 3fd0480..1b243c3 100644 --- a/extensions/kafka_consumer_test.go +++ b/extensions/kafka_consumer_test.go @@ -319,7 +319,7 @@ var _ = Describe("Kafka Extension", func() { }) }) - Describe("ConsumeLoop", func() { + PDescribe("ConsumeLoop", func() { It("should consume message and add it to msgChan", func() { stopChannel := make(chan struct{}) client, err := NewKafkaConsumer(config, logger, &stopChannel) diff --git a/extensions/pg_test.go b/extensions/pg_test.go index 9f2f807..2aa64c4 100644 --- a/extensions/pg_test.go +++ b/extensions/pg_test.go @@ -159,7 +159,7 @@ var _ = Describe("PG Extension", func() { }) Describe("[Integration]", func() { - Describe("Creating new client", func() { + PDescribe("Creating new client", func() { It("should return connected client", func() { client, err := NewPGClient("push.db", config) Expect(err).NotTo(HaveOccurred()) diff --git a/feedback/kafka_consumer_test.go b/feedback/kafka_consumer_test.go index 1c3932c..75c5426 100644 --- a/feedback/kafka_consumer_test.go +++ b/feedback/kafka_consumer_test.go @@ -297,7 +297,7 @@ var _ = Describe("Kafka Consumer", func() { }) }) - Describe("[Integration2]", func() { + Describe("[Integration]", func() { var config *viper.Viper var err error diff --git a/feedback/listener_test.go b/feedback/listener_test.go index 089746b..324f58b 100644 --- a/feedback/listener_test.go +++ b/feedback/listener_test.go @@ -114,7 +114,7 @@ var _ = Describe("Feedback Listener", func() { } }) - Describe("[Integration2]", func() { + Describe("[Integration]", func() { Describe("Create a new instance of listener", func() { var logger *logrus.Logger diff --git a/travis_install_kafka.sh b/travis-install-librkafka.sh similarity index 100% rename from travis_install_kafka.sh rename to travis-install-librkafka.sh