From 8fda9c96a6e94db526028c6ff92ea6003a7ceb60 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 14 Oct 2021 14:10:27 +0200 Subject: [PATCH] examples: removing the old test functionality --- examples/README.md | 2 +- examples/examples_test.go | 61 --------------------------------------- examples/go.mod | 5 ---- 3 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 examples/examples_test.go delete mode 100644 examples/go.mod diff --git a/examples/README.md b/examples/README.md index ff1be3f74fdd..e91e1c1dd048 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,3 +1,3 @@ ## Examples -This folder contains examples of using [Terraform's Azure Provider](https://terraform.io/docs/providers/azurerm/index.html) to provision resources in Azure - in which the examples are grouped by the service, for example Virtual Networks or Virtual Machines. +This folder contains examples of using [Terraform's Azure Provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) to provision resources in Azure - in which the examples are grouped by the service, for example Virtual Networks or Virtual Machines. diff --git a/examples/examples_test.go b/examples/examples_test.go deleted file mode 100644 index 402d45ddffa2..000000000000 --- a/examples/examples_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package examples - -import ( - "fmt" - "log" - "os" - "strings" - "testing" - - "github.com/tombuildsstuff/terraform-configuration-tester/locator" - "github.com/tombuildsstuff/terraform-configuration-tester/runner" -) - -func TestRunExamples(t *testing.T) { - if os.Getenv("TF_EXAMPLE_TEST") == "" { - log.Printf("`TF_EXAMPLE_TEST` is not set - skipping") - t.Skip() - } - - examplesDirectory := "./" - directories := locator.DiscoverExamples(examplesDirectory) - - input := runner.TestRunInput{ - // TODO: from Environment Variables in the future - ProviderVersion: "1.23.0", - ProviderName: "azurerm", - TerraformVersion: "0.11.13", - AvailableVariables: []runner.AvailableVariable{ - { - Name: "prefix", - Generate: true, - }, - { - Name: "location", - EnvKeyName: "ARM_LOCATION", - }, - { - Name: "alt_location", - EnvKeyName: "ARM_LOCATION_ALT", - }, - { - Name: "kubernetes_client_id", - EnvKeyName: "ARM_CLIENT_ID", - }, - { - Name: "kubernetes_client_secret", - EnvKeyName: "ARM_CLIENT_SECRET", - }, - }, - } - - for _, directoryPath := range directories { - shortDirName := strings.Replace(directoryPath, examplesDirectory, "", -1) - testName := fmt.Sprintf("examples/%s", shortDirName) - t.Run(testName, func(t *testing.T) { - if err := input.Run(directoryPath); err != nil { - t.Fatalf("Error running %q: %s", shortDirName, err) - } - }) - } -} diff --git a/examples/go.mod b/examples/go.mod deleted file mode 100644 index 3853212dee31..000000000000 --- a/examples/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/terraform-providers/terraform-provider-azurerm/examples - -require github.com/tombuildsstuff/terraform-configuration-tester v0.0.0-20190313185320-aaea37c43183 - -go 1.13