From 48a13a87f7b63405747f4b64a51228a26f6d2861 Mon Sep 17 00:00:00 2001 From: Timo Reymann Date: Sat, 7 Jan 2023 13:36:55 +0100 Subject: [PATCH] chore: Add examples and use them for testing --- {tests => examples}/http-no-routes-json/README.md | 0 {tests => examples}/http-no-routes-json/main.tf | 0 {tests => examples}/http-no-routes-json/petstore.yml | 0 {tests => examples}/http-no-routes-yaml/README.md | 0 {tests => examples}/http-no-routes-yaml/main.tf | 0 {tests => examples}/http-no-routes-yaml/petstore.yml | 0 {tests => examples}/http-routes-json-with-stage/README.md | 0 {tests => examples}/http-routes-json-with-stage/main.tf | 0 {tests => examples}/http-routes-json-with-stage/outputs.tf | 0 .../http-routes-json-with-stage/petstore.json | 0 {tests => examples}/http-routes-json/README.md | 0 {tests => examples}/http-routes-json/main.tf | 0 {tests => examples}/http-routes-json/outputs.tf | 0 {tests => examples}/http-routes-json/petstore.json | 0 {tests => examples}/http-routes-json/petstore.updated.json | 0 {tests => examples}/http-routes-json/variables.tf | 0 tests/no_routes_test.go | 4 ++-- tests/routes_test.go | 6 +++--- 18 files changed, 5 insertions(+), 5 deletions(-) rename {tests => examples}/http-no-routes-json/README.md (100%) rename {tests => examples}/http-no-routes-json/main.tf (100%) rename {tests => examples}/http-no-routes-json/petstore.yml (100%) rename {tests => examples}/http-no-routes-yaml/README.md (100%) rename {tests => examples}/http-no-routes-yaml/main.tf (100%) rename {tests => examples}/http-no-routes-yaml/petstore.yml (100%) rename {tests => examples}/http-routes-json-with-stage/README.md (100%) rename {tests => examples}/http-routes-json-with-stage/main.tf (100%) rename {tests => examples}/http-routes-json-with-stage/outputs.tf (100%) rename {tests => examples}/http-routes-json-with-stage/petstore.json (100%) rename {tests => examples}/http-routes-json/README.md (100%) rename {tests => examples}/http-routes-json/main.tf (100%) rename {tests => examples}/http-routes-json/outputs.tf (100%) rename {tests => examples}/http-routes-json/petstore.json (100%) rename {tests => examples}/http-routes-json/petstore.updated.json (100%) rename {tests => examples}/http-routes-json/variables.tf (100%) diff --git a/tests/http-no-routes-json/README.md b/examples/http-no-routes-json/README.md similarity index 100% rename from tests/http-no-routes-json/README.md rename to examples/http-no-routes-json/README.md diff --git a/tests/http-no-routes-json/main.tf b/examples/http-no-routes-json/main.tf similarity index 100% rename from tests/http-no-routes-json/main.tf rename to examples/http-no-routes-json/main.tf diff --git a/tests/http-no-routes-json/petstore.yml b/examples/http-no-routes-json/petstore.yml similarity index 100% rename from tests/http-no-routes-json/petstore.yml rename to examples/http-no-routes-json/petstore.yml diff --git a/tests/http-no-routes-yaml/README.md b/examples/http-no-routes-yaml/README.md similarity index 100% rename from tests/http-no-routes-yaml/README.md rename to examples/http-no-routes-yaml/README.md diff --git a/tests/http-no-routes-yaml/main.tf b/examples/http-no-routes-yaml/main.tf similarity index 100% rename from tests/http-no-routes-yaml/main.tf rename to examples/http-no-routes-yaml/main.tf diff --git a/tests/http-no-routes-yaml/petstore.yml b/examples/http-no-routes-yaml/petstore.yml similarity index 100% rename from tests/http-no-routes-yaml/petstore.yml rename to examples/http-no-routes-yaml/petstore.yml diff --git a/tests/http-routes-json-with-stage/README.md b/examples/http-routes-json-with-stage/README.md similarity index 100% rename from tests/http-routes-json-with-stage/README.md rename to examples/http-routes-json-with-stage/README.md diff --git a/tests/http-routes-json-with-stage/main.tf b/examples/http-routes-json-with-stage/main.tf similarity index 100% rename from tests/http-routes-json-with-stage/main.tf rename to examples/http-routes-json-with-stage/main.tf diff --git a/tests/http-routes-json-with-stage/outputs.tf b/examples/http-routes-json-with-stage/outputs.tf similarity index 100% rename from tests/http-routes-json-with-stage/outputs.tf rename to examples/http-routes-json-with-stage/outputs.tf diff --git a/tests/http-routes-json-with-stage/petstore.json b/examples/http-routes-json-with-stage/petstore.json similarity index 100% rename from tests/http-routes-json-with-stage/petstore.json rename to examples/http-routes-json-with-stage/petstore.json diff --git a/tests/http-routes-json/README.md b/examples/http-routes-json/README.md similarity index 100% rename from tests/http-routes-json/README.md rename to examples/http-routes-json/README.md diff --git a/tests/http-routes-json/main.tf b/examples/http-routes-json/main.tf similarity index 100% rename from tests/http-routes-json/main.tf rename to examples/http-routes-json/main.tf diff --git a/tests/http-routes-json/outputs.tf b/examples/http-routes-json/outputs.tf similarity index 100% rename from tests/http-routes-json/outputs.tf rename to examples/http-routes-json/outputs.tf diff --git a/tests/http-routes-json/petstore.json b/examples/http-routes-json/petstore.json similarity index 100% rename from tests/http-routes-json/petstore.json rename to examples/http-routes-json/petstore.json diff --git a/tests/http-routes-json/petstore.updated.json b/examples/http-routes-json/petstore.updated.json similarity index 100% rename from tests/http-routes-json/petstore.updated.json rename to examples/http-routes-json/petstore.updated.json diff --git a/tests/http-routes-json/variables.tf b/examples/http-routes-json/variables.tf similarity index 100% rename from tests/http-routes-json/variables.tf rename to examples/http-routes-json/variables.tf diff --git a/tests/no_routes_test.go b/tests/no_routes_test.go index 7da9831..10ce6cd 100644 --- a/tests/no_routes_test.go +++ b/tests/no_routes_test.go @@ -8,7 +8,7 @@ import ( func TestNoRoutesYAML(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ - TerraformDir: "http-no-routes-yaml", + TerraformDir: "../examples/http-no-routes-yaml", Vars: map[string]interface{}{}, }) @@ -19,7 +19,7 @@ func TestNoRoutesYAML(t *testing.T) { func TestNoRoutesJSON(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ - TerraformDir: "http-no-routes-json", + TerraformDir: "../examples/http-no-routes-json", Vars: map[string]interface{}{}, }) diff --git a/tests/routes_test.go b/tests/routes_test.go index 89ab6e8..312ca48 100644 --- a/tests/routes_test.go +++ b/tests/routes_test.go @@ -8,7 +8,7 @@ import ( func TestRoutesJSON(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ - TerraformDir: "http-routes-json", + TerraformDir: "../examples/http-routes-json", Vars: map[string]interface{}{}, }) @@ -22,7 +22,7 @@ func TestRoutesJSON(t *testing.T) { func TestRoutesJSONUpdateIdempotent(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ - TerraformDir: "http-routes-json", + TerraformDir: "../examples/http-routes-json", Vars: map[string]interface{}{}, }) terraformOptionsUpdate := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ @@ -46,7 +46,7 @@ func TestRoutesJSONUpdateIdempotent(t *testing.T) { func TestRoutesJSONWithStage(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ - TerraformDir: "http-routes-json-with-stage", + TerraformDir: "../examples/http-routes-json-with-stage", Vars: map[string]interface{}{}, })