update compliance url

Signed-off-by: David Wertenteil <dwertent@armosec.io>
This commit is contained in:
David Wertenteil
2023-02-06 13:30:24 +02:00
parent 129b0f3ee3
commit a45ee8ed42
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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