From 6131001ca72dd79bff96d0e0e84cb9c470b8b605 Mon Sep 17 00:00:00 2001 From: Orel Misan Date: Mon, 13 Nov 2023 10:22:52 +0200 Subject: [PATCH] Reporter: Rename node output Rename `node` output field to `vmUnderTestActualNodeName` in order to align it with the DPDK checkup. Signed-off-by: Orel Misan --- pkg/internal/reporter/reporter.go | 8 ++++---- pkg/internal/reporter/reporter_test.go | 8 ++++---- pkg/internal/status/status.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/internal/reporter/reporter.go b/pkg/internal/reporter/reporter.go index 557dabce..cc2d7a71 100644 --- a/pkg/internal/reporter/reporter.go +++ b/pkg/internal/reporter/reporter.go @@ -30,8 +30,8 @@ import ( ) const ( - NodeKey = "node" - OslatMaxLatencyKey = "oslatMaxLatencyMicroSeconds" + VMUnderTestActualNodeNameKey = "vmUnderTestActualNodeName" + OslatMaxLatencyKey = "oslatMaxLatencyMicroSeconds" ) type Reporter struct { @@ -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 diff --git a/pkg/internal/reporter/reporter_test.go b/pkg/internal/reporter/reporter_test.go index 9c11ee05..d2ef4713 100644 --- a/pkg/internal/reporter/reporter_test.go +++ b/pkg/internal/reporter/reporter_test.go @@ -52,7 +52,7 @@ func TestReportShouldSucceed(t *testing.T) { func TestReportShouldSuccessfullyReportResults(t *testing.T) { const ( - expectedNodeName = "rt-node" + expectedVMUnderTestActualNodeName = "rt-node" ) const ( @@ -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)) @@ -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()), } diff --git a/pkg/internal/status/status.go b/pkg/internal/status/status.go index 49c7a7e9..588480f3 100644 --- a/pkg/internal/status/status.go +++ b/pkg/internal/status/status.go @@ -26,8 +26,8 @@ import ( ) type Results struct { - Node string - OslatMaxLatency time.Duration + VMUnderTestActualNodeName string + OslatMaxLatency time.Duration } type Status struct {