Skip to content

Commit

Permalink
Add separate targets for unit and acceptance tests, tag files accordi…
Browse files Browse the repository at this point in the history
…ngly
  • Loading branch information
Bogdan Guranda committed May 8, 2024
1 parent 7242ece commit 20ce086
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ lint-fix: $(GOLANGCI_LINT)

.PHONY: test
test:
go test ./... -v $(TESTARGS) -timeout 120m
go test ./... -v -tags=unit $(TESTARGS) -timeout 120m

.PHONY: acctest
acctest:
TF_ACC=1 go test ./... -v -tags=acceptance $(TESTARGS) -timeout 120m

.PHONY: plugin
plugin:
Expand Down
2 changes: 2 additions & 0 deletions internal/api/login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// SPDX-License-Identifier: MPL-2.0

//go:build unit

package api_test

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

//go:build unit

package api_test

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

//go:build unit

package api_test

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

//go:build unit

package api_test

import (
Expand Down
2 changes: 0 additions & 2 deletions internal/provider/datasource_knowledge_type_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
package provider

import (
"fmt"
"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

//lint:ignore U1000 Ignore unused function temporarily for debugging
func TestAccKnowledgeTypeDataSource(t *testing.T) {
fmt.Print("DNSAJDANSJDANSJDNAJSDNJASDNJANJSNDJASNDJA")
resource.Test(t, resource.TestCase{
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/jsonvalidator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// SPDX-License-Identifier: MPL-2.0

//go:build unit

package provider_test

import (
Expand Down

0 comments on commit 20ce086

Please sign in to comment.