From e2f5a60654dd2cc72df1438205eda62492f2959e Mon Sep 17 00:00:00 2001 From: Tofel <20401585+Tofel@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:04:44 +0000 Subject: [PATCH] [Bot] Add automatically generated go documentation --- all_folders.json | 68 ---------------------------------- filtered_folders.json | 5 --- tools/flakeguard/reports/io.go | 3 ++ 3 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 all_folders.json delete mode 100644 filtered_folders.json diff --git a/all_folders.json b/all_folders.json deleted file mode 100644 index dd748deb3..000000000 --- a/all_folders.json +++ /dev/null @@ -1,68 +0,0 @@ -[ - { - "folder": "framework" - }, - { - "folder": "framework/examples/myprojec" - }, - { - "folder": "framework/examples/myproject_cll" - }, - { - "folder": "havoc" - }, - { - "folder": "k8s-test-runner" - }, - { - "folder": "lib" - }, - { - "folder": "lib/grafana" - }, - { - "folder": "seth" - }, - { - "folder": "seth/examples_wasp" - }, - { - "folder": "tools/asciitable" - }, - { - "folder": "tools/breakingchanges" - }, - { - "folder": "tools/citool" - }, - { - "folder": "tools/ecrimagefetcher" - }, - { - "folder": "tools/envresolve" - }, - { - "folder": "tools/flakeguard" - }, - { - "folder": "tools/ghlatestreleasechecker" - }, - { - "folder": "tools/ghsecrets" - }, - { - "folder": "tools/gotestloghelper" - }, - { - "folder": "tools/testlistgenerator" - }, - { - "folder": "tools/workflowresultparser" - }, - { - "folder": "wasp" - }, - { - "folder": "wasp/examples" - } -] diff --git a/filtered_folders.json b/filtered_folders.json deleted file mode 100644 index 1494dee74..000000000 --- a/filtered_folders.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "folder": "tools/flakeguard" - } -] diff --git a/tools/flakeguard/reports/io.go b/tools/flakeguard/reports/io.go index 4997ec436..35eb46858 100644 --- a/tools/flakeguard/reports/io.go +++ b/tools/flakeguard/reports/io.go @@ -101,6 +101,9 @@ func SaveReportNoLogs(fs FileSystem, filePath string, report TestReport) error { return fs.WriteFile(filePath, data, 0644) } +// SaveReport saves a TestReport to a specified file path in JSON format. +// It ensures the file is created or truncated and handles any errors during +// file operations, providing a reliable way to persist test results. func SaveReport(fs FileSystem, filePath string, report TestReport) error { // Open the file with truncation mode file, err := os.OpenFile(filePath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)