Skip to content

Commit

Permalink
fix: Increase api timeout limit to 120s
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jin <lei.jin@lacework.net>
  • Loading branch information
leijin-lw committed Sep 5, 2024
1 parent 5eed888 commit 4067cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
)

const (
defaultTimeout = 60 * time.Second
defaultTLSTimeout = 63 * time.Second
defaultTimeout = 120 * time.Second
defaultTLSTimeout = 123 * time.Second
)

type Client struct {
Expand Down
8 changes: 2 additions & 6 deletions integration/container_vulnerability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ func _TestContainerVulnerabilityCommandScanFailOnSeverity(t *testing.T) {
"STDERR doesn't match")
}

// Disabled due to the api timeout issue
// TODO: re-enable when timeout is fixed
func _TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) {
func TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) {
home := createTOMLConfigFromCIvars()
defer os.RemoveAll(home)
_, err, exitcode := LaceworkCLIWithHome(home,
Expand All @@ -235,9 +233,7 @@ func _TestContainerVulnerabilityCommandScanFailOnFixable(t *testing.T) {
"STDERR doesn't match")
}

// Disabled due to the api timeout issue
// TODO: re-enable when timeout is fixed
func _TestContainerVulnerabilityCommandScanHumanReadablePollGenerateHtml(t *testing.T) {
func TestContainerVulnerabilityCommandScanHumanReadablePollGenerateHtml(t *testing.T) {
// create a temporal directory to check that the HTML file is deployed
home := createTOMLConfigFromCIvars()
defer os.RemoveAll(home)
Expand Down

0 comments on commit 4067cb5

Please sign in to comment.