updated GHA #11

Merged
lerentis merged 2 commits from bugifx/#10-updates into main 2022-08-06 15:08:03 +00:00
4 changed files with 8 additions and 10 deletions
Showing only changes of commit bc6261d444 - Show all commits

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")