Compare commits
1 Commits
fix/dns-ti
...
fix/make-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2819c34d9 |
4
Makefile
4
Makefile
@@ -18,7 +18,7 @@ fmt:
|
|||||||
goimports -w .
|
goimports -w .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v -race -cover ./...
|
go test -v -race -cover -timeout 30s ./...
|
||||||
|
|
||||||
# Check runs all validation without making changes
|
# Check runs all validation without making changes
|
||||||
# Used by CI and Docker build - fails if anything is wrong
|
# Used by CI and Docker build - fails if anything is wrong
|
||||||
@@ -28,7 +28,7 @@ check:
|
|||||||
@echo "==> Running linter..."
|
@echo "==> Running linter..."
|
||||||
golangci-lint run --config .golangci.yml ./...
|
golangci-lint run --config .golangci.yml ./...
|
||||||
@echo "==> Running tests..."
|
@echo "==> Running tests..."
|
||||||
go test -v -race ./...
|
go test -v -race -short -timeout 30s ./...
|
||||||
@echo "==> Building..."
|
@echo "==> Building..."
|
||||||
go build -ldflags "$(LDFLAGS)" -o /dev/null ./cmd/dnswatcher
|
go build -ldflags "$(LDFLAGS)" -o /dev/null ./cmd/dnswatcher
|
||||||
@echo "==> All checks passed!"
|
@echo "==> All checks passed!"
|
||||||
|
|||||||
@@ -34,8 +34,12 @@ func newTestResolver(t *testing.T) *resolver.Resolver {
|
|||||||
func testContext(t *testing.T) context.Context {
|
func testContext(t *testing.T) context.Context {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping integration test requiring real DNS")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(
|
ctx, cancel := context.WithTimeout(
|
||||||
context.Background(), 60*time.Second,
|
context.Background(), 15*time.Second,
|
||||||
)
|
)
|
||||||
t.Cleanup(cancel)
|
t.Cleanup(cancel)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user