From a45ee8ed42bdb301e6de3ad41a00ff70da4e9049 Mon Sep 17 00:00:00 2001 From: David Wertenteil Date: Mon, 6 Feb 2023 13:30:24 +0200 Subject: [PATCH] update compliance url Signed-off-by: David Wertenteil --- core/pkg/resultshandling/reporter/v2/reporteventreceiver.go | 2 +- .../resultshandling/reporter/v2/reporteventreceiver_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go b/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go index 89517bab..d55449fb 100644 --- a/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go +++ b/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go @@ -271,7 +271,7 @@ func (report *ReportEventReceiver) addPathURL(urlObj *url.URL) { if report.customerAdminEMail != "" || report.token == "" { // data has been submitted switch report.submitContext { case SubmitContextScan: - urlObj.Path = fmt.Sprintf("config-scanning/%s", report.clusterName) + urlObj.Path = fmt.Sprintf("compliance/%s", report.clusterName) case SubmitContextRBAC: urlObj.Path = "rbac-visualizer" case SubmitContextRepository: diff --git a/core/pkg/resultshandling/reporter/v2/reporteventreceiver_test.go b/core/pkg/resultshandling/reporter/v2/reporteventreceiver_test.go index b15ab166..39f215a8 100644 --- a/core/pkg/resultshandling/reporter/v2/reporteventreceiver_test.go +++ b/core/pkg/resultshandling/reporter/v2/reporteventreceiver_test.go @@ -33,7 +33,7 @@ func TestReportEventReceiver_addPathURL(t *testing.T) { want: &url.URL{ Scheme: "https", Host: "localhost:8080", - Path: "config-scanning/test", + Path: "compliance/test", }, }, } @@ -59,7 +59,7 @@ func TestGetURL(t *testing.T) { "", SubmitContextScan, ) - assert.Equal(t, "https://cloud.armosec.io/config-scanning/test?utm_campaign=Submit&utm_medium=CLI&utm_source=GitHub", reporter.GetURL()) + assert.Equal(t, "https://cloud.armosec.io/compliance/test?utm_campaign=Submit&utm_medium=CLI&utm_source=GitHub", reporter.GetURL()) } // Test rbac submit and registered url