From 8ee95df32f884eaa7e0d7526b574ef91db652e25 Mon Sep 17 00:00:00 2001 From: Michal Kuratczyk Date: Thu, 5 Dec 2024 00:56:28 +0100 Subject: [PATCH] Remove a few tests This is a very simple condtion at startup so these tests are hard to justify --- cmd/cmd_suite_test.go | 13 ------------- cmd/cmd_test.go | 32 -------------------------------- 2 files changed, 45 deletions(-) delete mode 100644 cmd/cmd_suite_test.go delete mode 100644 cmd/cmd_test.go diff --git a/cmd/cmd_suite_test.go b/cmd/cmd_suite_test.go deleted file mode 100644 index 3b54986..0000000 --- a/cmd/cmd_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package cmd_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestCmd(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CMD Suite") -} diff --git a/cmd/cmd_test.go b/cmd/cmd_test.go deleted file mode 100644 index 82a7861..0000000 --- a/cmd/cmd_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package cmd - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("end-to-end latency uses nanoseconds only if we have both publishers and consumers", Serial, func() { - It("should use nanoseconds when no -x / -y flags are used", func() { - args := []string{"amqp", "-C", "0", "-D", "0", "-t", "/topic/foobar", "-T", "/topic/foobar"} - rootCmd := RootCmd() - rootCmd.SetArgs(args) - _ = rootCmd.Execute() - Expect(cfg.UseMillis).To(BeFalse()) - }) - - It("should use millseconds when there are no publishers", func() { - args := []string{"amqp", "-x", "0", "-D", "0", "-T", "/topic/foobar"} - rootCmd := RootCmd() - rootCmd.SetArgs(args) - _ = rootCmd.Execute() - Expect(cfg.UseMillis).To(BeTrue()) - }) - - It("should use millseconds when there are no consumers", func() { - args := []string{"amqp", "-y", "0", "-C", "0", "-t", "/topic/foobar"} - rootCmd := RootCmd() - rootCmd.SetArgs(args) - _ = rootCmd.Execute() - Expect(cfg.UseMillis).To(BeTrue()) - }) -})