Skip to content

Commit

Permalink
chore: simplify testing
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Nov 1, 2023
1 parent 67d5bd6 commit ac79357
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ toml::

test::
@echo "Running testsuite"
CGO_ENABLED=0 go test $(BUILD_TAGS),test ./...
CGO_ENABLED=0 go test $(BUILD_TAGS) ./...

porcelain::
gofmt -w -l $$(find . -name '*.go')
Expand Down
16 changes: 12 additions & 4 deletions charger/ocpp_timeout.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
//go:build !test

package charger

import "time"
import (
"testing"
"time"
)

const (
var (
ocppConnectTimeout = 5 * time.Minute
ocppTimeout = 2 * time.Minute
)

func init() {
if testing.Testing() {
ocppConnectTimeout = 1 * time.Second
ocppTimeout = 1 * time.Second
}
}
10 changes: 0 additions & 10 deletions charger/ocpp_timeouttest.go

This file was deleted.

10 changes: 0 additions & 10 deletions charger/tags_test.go

This file was deleted.

0 comments on commit ac79357

Please sign in to comment.