Skip to content

Commit

Permalink
Add public constants for results spreadsheet (#2447)
Browse files Browse the repository at this point in the history
  • Loading branch information
shirmoran authored Sep 17, 2024
1 parent cefd414 commit 36e01aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions cmd/certsuite/upload/results_spreadsheet/const.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package resultsspreadsheet

const (
ConclusionSheetName = "conclusions"
RawResultsSheetName = "raw results"

categoryConclusionsCol = "Category"
workloadVersionConclusionsCol = "Workload Version"
ocpVersionConclusionsCol = "OCP Version"
workloadNameConclusionsCol = "Workload Name"
WorkloadNameConclusionsCol = "Workload Name"
resultsConclusionsCol = "Results"
workloadNameRawResultsCol = "CNFName"
workloadTypeRawResultsCol = "CNFType"
operatorVersionRawResultsCol = "OperatorVersion"
cellContentLimit = 50000

workloadNameRawResultsCol = "CNFName"
workloadTypeRawResultsCol = "CNFType"
operatorVersionRawResultsCol = "OperatorVersion"

cellContentLimit = 50000
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

var stringToPointer = func(s string) *string { return &s }
var conclusionSheetHeaders = []string{categoryConclusionsCol, workloadVersionConclusionsCol, ocpVersionConclusionsCol, workloadNameConclusionsCol, resultsConclusionsCol}
var conclusionSheetHeaders = []string{categoryConclusionsCol, workloadVersionConclusionsCol, ocpVersionConclusionsCol, WorkloadNameConclusionsCol, resultsConclusionsCol}

var (
resultsFilePath string
Expand Down Expand Up @@ -268,7 +268,7 @@ func createConclusionsSheet(sheetsService *sheets.Service, driveService *drive.S
case ocpVersionConclusionsCol:
curCellData.UserEnteredValue.StringValue = stringToPointer(ocpVersion + " ")

case workloadNameConclusionsCol:
case WorkloadNameConclusionsCol:
curCellData.UserEnteredValue.StringValue = &workloadName

case resultsConclusionsCol:
Expand All @@ -292,7 +292,7 @@ func createConclusionsSheet(sheetsService *sheets.Service, driveService *drive.S

conclusionSheet := &sheets.Sheet{
Properties: &sheets.SheetProperties{
Title: "conclusions",
Title: ConclusionSheetName,
GridProperties: &sheets.GridProperties{FrozenRowCount: 1},
},
Data: []*sheets.GridData{{RowData: conclusionsSheetRows}},
Expand All @@ -311,7 +311,7 @@ func createRawResultsSheet(fp string) (*sheets.Sheet, error) {

rawResultsSheet := &sheets.Sheet{
Properties: &sheets.SheetProperties{
Title: "raw results",
Title: RawResultsSheetName,
GridProperties: &sheets.GridProperties{FrozenRowCount: 1},
},
Data: []*sheets.GridData{{RowData: rows}},
Expand Down

0 comments on commit 36e01aa

Please sign in to comment.