Skip to content

Commit

Permalink
Assert no fatal or panics either. Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean-Coakley committed Feb 24, 2023
1 parent a080690 commit 8fe68bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ build: ## Build agent executable
GOWORK=off CGO_ENABLED=0 go build -ldflags=${LDFLAGS} -o ./build/nginx-agent

deps: ## Update dependencies in vendor folders
cd sdk && go mod tidy && go mod vendor && make generate && go mod tidy && go mod vendor
cd sdk && go mod tidy && go mod vendor && make generate && go mod tidy && go mod vendor
cd test/integration && go mod tidy && go mod vendor
cd test/performance && go mod tidy && go mod vendor
go mod tidy && go mod vendor && go mod download && go work sync
Expand Down
4 changes: 3 additions & 1 deletion test/integration/utils/test_container_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func SetupTestContainerWithAgent(t *testing.T) *testcontainers.DockerContainer {
return testContainer
}

// SetupTestContainerWithAgent sets up a container with nginx installed
// SetupTestContainerWithoutAgent sets up a container with nginx installed
func SetupTestContainerWithoutAgent(t *testing.T) *testcontainers.DockerContainer {
ctx := context.Background()
comp, err := compose.NewDockerCompose(os.Getenv("DOCKER_COMPOSE_FILE"))
Expand Down Expand Up @@ -75,4 +75,6 @@ func TestAgentHasNoErrorLogs(t *testing.T, agentContainer *testcontainers.Docker

assert.NotEmpty(t, agentLogContent, "agent log file empty")
assert.NotContains(t, string(agentLogContent), "level=error", "agent log file contains logs at error level")
assert.NotContains(t, string(agentLogContent), "level=panic", "agent log file contains logs at panic level")
assert.NotContains(t, string(agentLogContent), "level=fatal", "agent log file contains logs at fatal level")
}

0 comments on commit 8fe68bf

Please sign in to comment.