Skip to content

Commit

Permalink
e2e: some places were not using previously defined "enums". (#755)
Browse files Browse the repository at this point in the history
Signed-off-by: lucas.bruno <[email protected]>
  • Loading branch information
lucasbrunozup authored Nov 9, 2021
1 parent 822abc9 commit 77afb54
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
docker_buildx: false

- name: Run e2e test for ${{ matrix.os }}
run: go test -v ./e2e/... -failfast -race
run: go test -v ./e2e/... -timeout 60m -failfast -race
3 changes: 1 addition & 2 deletions e2e/analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package analysis_test

import (
"fmt"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -117,7 +116,7 @@ var _ = Describe("Run a complete horusec analysis", func() {
for _, tt := range testcases {
Describe(fmt.Sprintf("Running on %s codebase.", tt.Language.ToString()), func() {
session, _ = tt.RunAnalysisTestCase()
session.Wait(2 * time.Minute)
session.Wait(testutil.AverageTimeoutAnalyzeForExamplesFolder)

It("execute command without error", func() {
Expect(session.ExitCode()).To(Equal(0))
Expand Down
3 changes: 2 additions & 1 deletion e2e/commands/start/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ package start_test
import (
"strings"

"github.com/ZupIT/horusec/internal/utils/testutil"
"github.com/google/uuid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/onsi/gomega/gexec"

"github.com/ZupIT/horusec/internal/utils/testutil"
)

var _ = Describe("running binary Horusec with start parameter", func() {
Expand Down
4 changes: 3 additions & 1 deletion internal/utils/testutil/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"path/filepath"
"runtime"

"github.com/ZupIT/horusec-devkit/pkg/utils/logger/enums"

"github.com/onsi/ginkgo"
)

Expand Down Expand Up @@ -56,7 +58,7 @@ func ginkgoBuildHorusecBinary(customArgs ...string) string {
}

func setLogLevelArgsToHorusecCmd(horusecCmd ...string) []string {
return append(horusecCmd, fmt.Sprintf("%s=%s", "--log-level", "debug"))
return append(horusecCmd, fmt.Sprintf("%s=%s", GlobalFlagLogLevel, enums.DebugLevel.String()))
}

func getBinaryNameBySystem() string {
Expand Down

0 comments on commit 77afb54

Please sign in to comment.