Skip to content

Commit

Permalink
Reporter: Rename node output
Browse files Browse the repository at this point in the history
Rename `node` output field to `vmUnderTestActualNodeName`
in order to align it with the DPDK checkup.

Signed-off-by: Orel Misan <omisan@redhat.com>
  • Loading branch information
orelmisan committed Nov 13, 2023
1 parent 066aa9c commit 6131001
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pkg/internal/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
)

const (
NodeKey = "node"
OslatMaxLatencyKey = "oslatMaxLatencyMicroSeconds"
VMUnderTestActualNodeNameKey = "vmUnderTestActualNodeName"
OslatMaxLatencyKey = "oslatMaxLatencyMicroSeconds"
)

type Reporter struct {
Expand Down Expand Up @@ -62,8 +62,8 @@ func formatResults(checkupStatus status.Status) map[string]string {
}

formattedResults := map[string]string{
NodeKey: checkupStatus.Results.Node,
OslatMaxLatencyKey: fmt.Sprintf("%d", checkupStatus.Results.OslatMaxLatency.Microseconds()),
VMUnderTestActualNodeNameKey: checkupStatus.Results.VMUnderTestActualNodeName,
OslatMaxLatencyKey: fmt.Sprintf("%d", checkupStatus.Results.OslatMaxLatency.Microseconds()),
}

return formattedResults
Expand Down
8 changes: 4 additions & 4 deletions pkg/internal/reporter/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestReportShouldSucceed(t *testing.T) {

func TestReportShouldSuccessfullyReportResults(t *testing.T) {
const (
expectedNodeName = "rt-node"
expectedVMUnderTestActualNodeName = "rt-node"
)

const (
Expand All @@ -71,8 +71,8 @@ func TestReportShouldSuccessfullyReportResults(t *testing.T) {
checkupStatus.FailureReason = []string{}
checkupStatus.CompletionTimestamp = time.Now()
checkupStatus.Results = status.Results{
Node: expectedNodeName,
OslatMaxLatency: 12 * time.Microsecond,
VMUnderTestActualNodeName: expectedVMUnderTestActualNodeName,
OslatMaxLatency: 12 * time.Microsecond,
}

assert.NoError(t, testReporter.Report(checkupStatus))
Expand All @@ -82,7 +82,7 @@ func TestReportShouldSuccessfullyReportResults(t *testing.T) {
"status.failureReason": "",
"status.startTimestamp": timestamp(checkupStatus.StartTimestamp),
"status.completionTimestamp": timestamp(checkupStatus.CompletionTimestamp),
"status.result.node": checkupStatus.Results.Node,
"status.result.vmUnderTestActualNodeName": checkupStatus.Results.VMUnderTestActualNodeName,
"status.result.oslatMaxLatencyMicroSeconds": fmt.Sprintf("%d", checkupStatus.Results.OslatMaxLatency.Microseconds()),
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/internal/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
)

type Results struct {
Node string
OslatMaxLatency time.Duration
VMUnderTestActualNodeName string
OslatMaxLatency time.Duration
}

type Status struct {
Expand Down

0 comments on commit 6131001

Please sign in to comment.