Skip to content

Commit

Permalink
Merge pull request #1016 from simonbaird/add-missing-test-tags
Browse files Browse the repository at this point in the history
Add missing test tags
  • Loading branch information
lcarva authored Sep 27, 2023
2 parents 605c0fb + a272992 commit a3769a9
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ clean: ## Delete build output

.PHONY: test
test: generate ## Run all unit tests
@echo "Unit tests:"
@go test -race -covermode=atomic -coverprofile=coverage-unit.out -timeout 500ms -tags=unit ./...
@go test -race -covermode=atomic -coverprofile=coverage-integration.out -timeout 15s -tags=integration ./...
@echo "Integration tests:"
@go test -race -covermode=atomic -coverprofile=coverage-integration.out -timeout 15s -tags=integration ./... | grep -v '\[no test files\]'
# Given the nature of generative tests the test timeout is increased from 500ms
# to 30s to accommodate many samples being generated and test cases being run.
@go test -race -covermode=atomic -coverprofile=coverage-generative.out -timeout 30s -tags=generative ./...
@echo "Generative tests:"
@go test -race -covermode=atomic -coverprofile=coverage-generative.out -timeout 30s -tags=generative ./... | grep -v '\[no test files\]'

ACCEPTANCE_TIMEOUT:=20m
.ONESHELL:
Expand Down
2 changes: 2 additions & 0 deletions acceptance/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package cli

import (
Expand Down
2 changes: 2 additions & 0 deletions acceptance/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package kubernetes

import (
Expand Down
2 changes: 2 additions & 0 deletions acceptance/log/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

// Package log forwards logs to testing.T.Log* methods
package log

Expand Down
2 changes: 2 additions & 0 deletions acceptance/testenv/testenv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package testenv

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/initialize/init_policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package initialize

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/inspect/inspect_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package inspect

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/applicationsnapshot/attestation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package applicationsnapshot

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/applicationsnapshot/junit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package applicationsnapshot

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/definition/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package definition

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/definition/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package definition

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/fetchers/oci/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package oci

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/fetchers/oci/files/olm_manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package files

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/fetchers/oci/files/rhmanifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package files

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/format/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package format

import (
Expand Down
3 changes: 3 additions & 0 deletions internal/lint/testdata/returns/07_a_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
//
// SPDX-License-Identifier: Apache-2.0

// Not really...
//go:build unit

package something

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/opa/inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package opa

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/opa/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package opa

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/opa/rule/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package rule

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:build unit

package version

import (
Expand Down

0 comments on commit a3769a9

Please sign in to comment.