From 5254aadd1f7de9bdc48fcf0e0e944a9ac02f6c38 Mon Sep 17 00:00:00 2001 From: TimHuynh Date: Fri, 17 Jan 2025 12:13:04 -0600 Subject: [PATCH] resolve conflicts with buildkite --- compiler/types/yaml/test_report.go | 40 ------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 compiler/types/yaml/test_report.go diff --git a/compiler/types/yaml/test_report.go b/compiler/types/yaml/test_report.go deleted file mode 100644 index 038db367c..000000000 --- a/compiler/types/yaml/test_report.go +++ /dev/null @@ -1,40 +0,0 @@ -package yaml - -import "github.com/go-vela/server/compiler/types/pipeline" - -// TestReport represents the structure for test report configuration. -type TestReport struct { - Results []string `yaml:"results,omitempty" json:"results,omitempty"` - Attachments []string `yaml:"attachments,omitempty" json:"attachments,omitempty"` -} - -// ToPipeline converts the TestReport type -// to a pipeline TestReport type. -func (t *TestReport) ToPipeline() *pipeline.TestReport { - return &pipeline.TestReport{ - Results: t.Results, - Attachments: t.Attachments, - } -} - -// UnmarshalYAML implements the Unmarshaler interface for the TestReport type. -func (t *TestReport) UnmarshalYAML(unmarshal func(interface{}) error) error { - // test report we try unmarshalling to - testReport := new(struct { - Results []string `yaml:"results,omitempty" json:"results,omitempty"` - Attachments []string `yaml:"attachments,omitempty" json:"attachments,omitempty"` - }) - - // attempt to unmarshal test report type - err := unmarshal(testReport) - if err != nil { - return err - } - - // set the results field - t.Results = testReport.Results - // set the attachments field - t.Attachments = testReport.Attachments - - return nil -}