From 4c67a67b1051121442863d26bcfebde03d2f971e Mon Sep 17 00:00:00 2001 From: Eric Pinzur Date: Thu, 22 Jun 2023 15:03:49 +0200 Subject: [PATCH] removed test --- .../shared/helpers/helpers_test.go | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 tests/integration/shared/helpers/helpers_test.go diff --git a/tests/integration/shared/helpers/helpers_test.go b/tests/integration/shared/helpers/helpers_test.go deleted file mode 100644 index 0e01bfa0c..000000000 --- a/tests/integration/shared/helpers/helpers_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package helpers - -import ( - "fmt" - "io/ioutil" - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestApi(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Api Suite") -} - -var _ = Describe("DecodeAvroFromBytes", func() { - It("should decode the file as expected", func() { - schema := `{"type": "record", "name": "MyRecord", "fields": [{"name": "time", "type":"long"}, {"name": "id", "type": "long"}, {"name": "my_val", "type": "long"}]}` - - schema = `{ - "name": "MyRecord", - "type": "record", - "fields": [ - { - "name": "time", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "id", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "my_val", - "type": [ - "null", - "long" - ], - "default": null - } - ] - }` - - filePath := "../../../../testdata/avro/msg1.avro" - // time id my_val - // 10 1 5 - - fileData, err := ioutil.ReadFile(filePath) - Expect(err).ShouldNot(HaveOccurred(), fmt.Sprintf("issue finding testdata file: %s", filePath)) - - expected := map[string]interface{}{ - "time": int64(10), - "id": int64(1), - "my_val": int64(5), - } - - data, err := DecodeAvroFromBytes(schema, fileData) - Expect(err).ShouldNot(HaveOccurred()) - Expect(data).Should(BeEquivalentTo(expected)) - }) - -})