From 12fdbb8b598263368f531dea3a2f8c97ea043352 Mon Sep 17 00:00:00 2001 From: iyear Date: Wed, 23 Aug 2023 19:23:36 +0800 Subject: [PATCH] test(e2e): use By method to log step --- test/download_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/download_test.go b/test/download_test.go index 8d0fa544eb..27d3bbf783 100644 --- a/test/download_test.go +++ b/test/download_test.go @@ -26,7 +26,7 @@ var _ = Describe("Test tdl download", FlakeAttempts(3), func() { BeforeEach(func() { once.Do(func() { - log.Println("collect local file hashes") + By("collect local file hashes") Expect(filepath.WalkDir("testdata", func(path string, d fs.DirEntry, err error) error { if err != nil { return err @@ -44,16 +44,16 @@ var _ = Describe("Test tdl download", FlakeAttempts(3), func() { return nil })).To(Succeed()) - log.Println("upload files") + By("upload files") exec(cmd, []string{"upload", "-p", "testdata"}, true) - log.Println("export uploaded files") + By("export uploaded files") exportFile := filepath.Join(GinkgoT().TempDir(), "export.json") exec(cmd, []string{"chat", "export", "-T", "last", "-i", strconv.Itoa(len(fileHash)), "-o", exportFile}, true) exportBytes, err := os.ReadFile(exportFile) Expect(err).To(Succeed()) - log.Println("get chat id and remote file ids") + By("get chat id and remote file ids") id = gjson.GetBytes(exportBytes, "id").Int() Expect(id).NotTo(BeZero())