-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests that highlight known issues in the destroy mechanism
- Loading branch information
1 parent
598648b
commit e448e0c
Showing
10 changed files
with
220 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ackruntime/testdata/mainbundle/test/auth-provider-w-data/auth-provider-w-data.tfstack.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
required_providers { | ||
testing = { | ||
source = "hashicorp/testing" | ||
version = "0.1.0" | ||
} | ||
} | ||
|
||
provider "testing" "main" {} | ||
|
||
provider "testing" "credentialed" { | ||
config { | ||
authentication = component.load.credentials | ||
} | ||
} | ||
|
||
component "load" { | ||
source = "./load" | ||
|
||
providers = { | ||
testing = provider.testing.main | ||
} | ||
} | ||
|
||
component "create" { | ||
source = "./create" | ||
|
||
providers = { | ||
testing = provider.testing.credentialed | ||
} | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
internal/stacks/stackruntime/testdata/mainbundle/test/auth-provider-w-data/create/create.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
resource "testing_resource" "resource" { | ||
id = "resource" | ||
} |
8 changes: 8 additions & 0 deletions
8
internal/stacks/stackruntime/testdata/mainbundle/test/auth-provider-w-data/load/load.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
data "testing_data_source" "credentials" { | ||
id = "credentials" | ||
} | ||
|
||
output "credentials" { | ||
value = data.testing_data_source.credentials.value | ||
sensitive = true | ||
} |
31 changes: 31 additions & 0 deletions
31
...ks/stackruntime/testdata/mainbundle/test/auth-provider-w-data/removed/removed.tfstack.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
required_providers { | ||
testing = { | ||
source = "hashicorp/testing" | ||
version = "0.1.0" | ||
} | ||
} | ||
|
||
provider "testing" "main" {} | ||
|
||
provider "testing" "credentialed" { | ||
config { | ||
authentication = component.load.credentials | ||
} | ||
} | ||
|
||
component "load" { | ||
source = "../load" | ||
|
||
providers = { | ||
testing = provider.testing.main | ||
} | ||
} | ||
|
||
removed { | ||
source = "../create" | ||
from = component.create | ||
providers = { | ||
testing = provider.testing.credentialed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters