Skip to content

Commit

Permalink
fix: make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Jun 11, 2024
1 parent 2992689 commit c1851a0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/cockroachdb/cockroachdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cockroachdb_test
import (
"context"
"errors"
"fmt"
"net/url"
"strings"
"testing"
Expand Down Expand Up @@ -149,7 +148,6 @@ func (suite *AuthNSuite) TestQuery() {

// TestWithWaitStrategyAndDeadline covers a previous regression, container creation needs to fail to cover that path.
func (suite *AuthNSuite) TestWithWaitStrategyAndDeadline() {
contextDeadlineExceeded := fmt.Errorf("failed to start container: context deadline exceeded")
nodeStartUpCompleted := "node startup completed"

suite.Run("Expected Failure To Run", func() {
Expand All @@ -159,7 +157,7 @@ func (suite *AuthNSuite) TestWithWaitStrategyAndDeadline() {
suite.opts = append(suite.opts, testcontainers.WithWaitStrategyAndDeadline(time.Millisecond*250, wait.ForLog("Won't Exist In Logs")))
container, err := cockroachdb.RunContainer(ctx, suite.opts...)

suite.Require().Error(err, contextDeadlineExceeded)
suite.Require().ErrorIs(err, context.DeadlineExceeded)
suite.T().Cleanup(func() {
if container != nil {
err := container.Terminate(ctx)
Expand All @@ -175,7 +173,7 @@ func (suite *AuthNSuite) TestWithWaitStrategyAndDeadline() {
suite.opts = append(suite.opts, testcontainers.WithWaitStrategyAndDeadline(time.Millisecond*20, wait.ForLog(nodeStartUpCompleted)))
container, err := cockroachdb.RunContainer(ctx, suite.opts...)

suite.Require().Error(err, contextDeadlineExceeded)
suite.Require().ErrorIs(err, context.DeadlineExceeded)
suite.T().Cleanup(func() {
if container != nil {
err := container.Terminate(ctx)
Expand Down

0 comments on commit c1851a0

Please sign in to comment.