Skip to content

Commit 36e01aa

Browse files
authored
Add public constants for results spreadsheet (redhat-best-practices-for-k8s#2447)
1 parent cefd414 commit 36e01aa

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
package resultsspreadsheet
22

33
const (
4+
ConclusionSheetName = "conclusions"
5+
RawResultsSheetName = "raw results"
6+
47
categoryConclusionsCol = "Category"
58
workloadVersionConclusionsCol = "Workload Version"
69
ocpVersionConclusionsCol = "OCP Version"
7-
workloadNameConclusionsCol = "Workload Name"
10+
WorkloadNameConclusionsCol = "Workload Name"
811
resultsConclusionsCol = "Results"
9-
workloadNameRawResultsCol = "CNFName"
10-
workloadTypeRawResultsCol = "CNFType"
11-
operatorVersionRawResultsCol = "OperatorVersion"
12-
cellContentLimit = 50000
12+
13+
workloadNameRawResultsCol = "CNFName"
14+
workloadTypeRawResultsCol = "CNFType"
15+
operatorVersionRawResultsCol = "OperatorVersion"
16+
17+
cellContentLimit = 50000
1318
)

cmd/certsuite/upload/results_spreadsheet/results_spreadsheet.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

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

2323
var (
2424
resultsFilePath string
@@ -268,7 +268,7 @@ func createConclusionsSheet(sheetsService *sheets.Service, driveService *drive.S
268268
case ocpVersionConclusionsCol:
269269
curCellData.UserEnteredValue.StringValue = stringToPointer(ocpVersion + " ")
270270

271-
case workloadNameConclusionsCol:
271+
case WorkloadNameConclusionsCol:
272272
curCellData.UserEnteredValue.StringValue = &workloadName
273273

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

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

312312
rawResultsSheet := &sheets.Sheet{
313313
Properties: &sheets.SheetProperties{
314-
Title: "raw results",
314+
Title: RawResultsSheetName,
315315
GridProperties: &sheets.GridProperties{FrozenRowCount: 1},
316316
},
317317
Data: []*sheets.GridData{{RowData: rows}},

0 commit comments

Comments
 (0)