Skip to content

Commit

Permalink
Changes for changing the resolution message
Browse files Browse the repository at this point in the history
Signed-off-by: sandhi <sagarwal@progress.com>
  • Loading branch information
sandhi18 committed Jul 11, 2023
1 parent 1abad73 commit f1c4826
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ const (

PORT_REACHABLE_SUCCESS_MSG = "The %s service running at %s:%d is reachable"
PORT_REACHABLE_ERROR_MSG = "The %s service running at %s:%d is not reachable"
PORT_REACHABLE_RESOLUTION_MSG = "Check your firewall settings to provide access to %d port on %s"
PORT_REACHABLE_RESOLUTION_MSG = "Check your firewall settings and provide access to port %d on %s"
)
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const (
"passed": false,
"success_msg": "",
"error_msg": "The <protocol> service running at <destination_node_ip>:<destination_node_port> is not reachable from <source_ip>",
"resolution_msg": "Check your firewall settings to provide access to <destination_node_port> port at <destination_node_ip> from <source_node_ip>"
"resolution_msg": "Check your firewall settings and provide access to port <destination_node_port> on <destination_node_ip> from <source_node_ip>"
}
]
}
Expand Down Expand Up @@ -122,15 +122,15 @@ const (
"passed": false,
"success_msg": "",
"error_msg": "The <protocol> service running at <destination_node_ip>:<destination_node_port> is not reachable from <source_ip>",
"resolution_msg": "Check your firewall settings to provide access to <destination_node_port> port at <destination_node_ip> from <source_node_ip>",
"resolution_msg": "Check your firewall settings and provide access to port <destination_node_port> on <destination_node_ip> from <source_node_ip>",
"skipped": false
},
{
"title": "Check for reachability of service at destination port",
"passed": false,
"success_msg": "",
"error_msg": "The <protocol> service running at <destination_node_ip>:<destination_node_port> is not reachable from <source_ip>",
"resolution_msg": "Check your firewall settings to provide access to <destination_node_port> port at <destination_node_ip> from <source_node_ip>",
"resolution_msg": "Check your firewall settings and provide access to port <destination_node_port> on <destination_node_ip> from <source_node_ip>",
"skipped": false
}
],
Expand Down Expand Up @@ -326,10 +326,10 @@ func TestFirewallCheck_Run(t *testing.T) {
Certificate: certificatelist,
},
},
response: "Internal Server Error",
httpStatusCode: http.StatusInternalServerError,
isError: true,
invalidParseResponse: false,
response: "Internal Server Error",
httpStatusCode: http.StatusInternalServerError,
isError: true,
invalidParseResponse: false,
requiredStatusResponse: `{"error":{"code":500,"message":"Internal Server Error"}}`,
},
{
Expand Down Expand Up @@ -360,10 +360,10 @@ func TestFirewallCheck_Run(t *testing.T) {
Certificate: certificatelist,
},
},
response: "source_node_ip, destination_node_ip, destination_service_port or destination_service_protocol cannot be empty",
httpStatusCode: http.StatusBadRequest,
isError: true,
invalidParseResponse: true,
response: "source_node_ip, destination_node_ip, destination_service_port or destination_service_protocol cannot be empty",
httpStatusCode: http.StatusBadRequest,
isError: true,
invalidParseResponse: true,
requiredStatusResponse: `{"error":{"code":400,"message":"source_node_ip, destination_node_ip, destination_service_port or destination_service_protocol cannot be empty"}}`,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func GetFirewallErrorMsg(service, destinationIP, destinationPort, sourceIP strin
}

func GetFirewallResolutionMsg(destinationIP, destinationPort, sourceIP string) string {
return fmt.Sprintf("Check your firewall settings to provide access on %s port at %s from %s", destinationPort, destinationIP, sourceIP)
return fmt.Sprintf("Check your firewall settings and provide access to port %s on %s from %s", destinationPort, destinationIP, sourceIP)
}

func createFirewallCheck(passed bool, successMsg, errorMsg, resolutionMsg string) models.Checks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
"passed": false,
"success_msg": "",
"error_msg": "The tcp service running at ANY_IP:7433 is not reachable",
"resolution_msg": "Check your firewall settings to provide access to 7433 port at 13.39.148.115"
"resolution_msg": "Check your firewall settings and provide access to port 7433 on 13.39.148.115"
}
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func makeSet(reqNodes []string, isAfterDeployment bool) (map[string]int, error)
func (fq *FqdnService) MakeConcurrentCalls(url string, client *http.Client, setNodes map[string]int) error {
fq.log.Debug("Making Concurrent Calls...")
fqdnResultChan := make(chan string)
minNumberOfCalls := 3 * len(setNodes)
minNumberOfCalls := 5 * len(setNodes)
for i := 0; i < minNumberOfCalls; i++ {
go func(fqdnResultChan chan string) {
res, err := client.Get(url)
Expand Down

0 comments on commit f1c4826

Please sign in to comment.