fixed tests

incremented version number
This commit is contained in:
Tobias Trabelsi 2022-08-06 16:47:00 +02:00
parent e1266ebf64
commit bc6261d444
No known key found for this signature in database
GPG key ID: FF0C2839718CAF2E
4 changed files with 8 additions and 10 deletions

View file

@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
GOFMT ?= gofmt -s GOFMT ?= gofmt -s
VERSION = 0.7.0 VERSION = 0.7.1
test: fmt-check test: fmt-check
go test -i $(TEST) || exit 1 go test -i $(TEST) || exit 1

View file

@ -17,7 +17,7 @@ terraform {
required_providers { required_providers {
gitea = { gitea = {
source = "Lerentis/gitea" source = "Lerentis/gitea"
version = "0.7.0" version = "0.7.1"
} }
} }
} }

View file

@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
gitea = { gitea = {
source = "terraform.local/lerentis/gitea" source = "terraform.local/lerentis/gitea"
version = "0.7.0" version = "0.7.1"
} }
} }
} }

View file

@ -5,29 +5,27 @@ import (
"testing" "testing"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
) )
var testAccProviders map[string]terraform.ResourceProvider var testAccProviders map[string]*schema.Provider
var testAccProvider *schema.Provider var testAccProvider *schema.Provider
func init() { func init() {
testAccProvider = Provider().(*schema.Provider) testAccProvider = Provider()
testAccProviders = map[string]terraform.ResourceProvider{ testAccProviders = map[string]*schema.Provider{
"gitea": testAccProvider, "gitea": testAccProvider,
} }
} }
func TestProvider(t *testing.T) { func TestProvider(t *testing.T) {
if err := Provider().(*schema.Provider).InternalValidate(); err != nil { if err := Provider().InternalValidate(); err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
} }
} }
func TestProvider_impl(t *testing.T) { func TestProvider_impl(t *testing.T) {
var _ terraform.ResourceProvider = Provider() var _ *schema.Provider = Provider()
} }
func testAccPreCheck(t *testing.T) { func testAccPreCheck(t *testing.T) {
if v := os.Getenv("GITEA_TOKEN"); v == "" { if v := os.Getenv("GITEA_TOKEN"); v == "" {
t.Fatal("GITEA_TOKEN must be set for acceptance tests") t.Fatal("GITEA_TOKEN must be set for acceptance tests")