Skip to content

Commit

Permalink
Replacing alias in example code (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendbennett committed Jan 11, 2024
1 parent ed9d236 commit 9bdf445
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Example usage of [BoolValueExact](https://pkg.go.dev/github.com/hashicorp/terraf
func TestExpectKnownValue_CheckPlan_Bool(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
bool_attribute = true
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Example usage of [Float64ValueExact](https://pkg.go.dev/github.com/hashicorp/ter
func TestExpectKnownValue_CheckPlan_Float64(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
float_attribute = 1.23
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Example usage of [Int64ValueExact](https://pkg.go.dev/github.com/hashicorp/terra
func TestExpectKnownValue_CheckPlan_Int64(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
int_attribute = 123
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Example usage of [ListElementsExact](https://pkg.go.dev/github.com/hashicorp/ter
func TestExpectKnownValue_CheckPlan_ListElements(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
list_attribute = [
Expand All @@ -33,7 +33,7 @@ func TestExpectKnownValue_CheckPlan_ListElements(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand All @@ -58,9 +58,9 @@ Example usage of [ListValueExact](https://pkg.go.dev/github.com/hashicorp/terraf
func TestExpectKnownValue_CheckPlan_List(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
list_attribute = [
Expand All @@ -69,7 +69,7 @@ func TestExpectKnownValue_CheckPlan_List(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down Expand Up @@ -97,9 +97,9 @@ Example usage of [ListValuePartialMatch](https://pkg.go.dev/github.com/hashicorp
func TestExpectKnownValue_CheckPlan_ListPartial(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
list_attribute = [
Expand All @@ -108,7 +108,7 @@ func TestExpectKnownValue_CheckPlan_ListPartial(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Example usage of [MapElementsExact](https://pkg.go.dev/github.com/hashicorp/terr
func TestExpectKnownValue_CheckPlan_MapElements(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
map_attribute = {
Expand All @@ -33,7 +33,7 @@ func TestExpectKnownValue_CheckPlan_MapElements(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand All @@ -58,9 +58,9 @@ Example usage of [MapValueExact](https://pkg.go.dev/github.com/hashicorp/terrafo
func TestExpectKnownValue_CheckPlan_Map(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
map_attribute = {
Expand All @@ -69,7 +69,7 @@ func TestExpectKnownValue_CheckPlan_Map(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down Expand Up @@ -99,9 +99,9 @@ In this example, only the element associated with `key1` within the map is check
func TestExpectKnownValue_CheckPlan_MapPartial(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
map_attribute = {
Expand All @@ -110,7 +110,7 @@ func TestExpectKnownValue_CheckPlan_MapPartial(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ func TestExpectKnownValue_CheckPlan_Number(t *testing.T) {
t.Errorf("%s", err)
}

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
number_attribute = 123
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Example usage of [ObjectElementsExact](https://pkg.go.dev/github.com/hashicorp/t
func TestExpectKnownValue_CheckPlan_ObjectElements(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
object_attribute = {
Expand All @@ -33,7 +33,7 @@ func TestExpectKnownValue_CheckPlan_ObjectElements(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand All @@ -58,9 +58,9 @@ Example usage of [ObjectValueExact](https://pkg.go.dev/github.com/hashicorp/terr
func TestExpectKnownValue_CheckPlan_Object(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
object_attribute = {
Expand All @@ -69,7 +69,7 @@ func TestExpectKnownValue_CheckPlan_Object(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down Expand Up @@ -99,9 +99,9 @@ In this example, only the attribute value associated with the attribute name `at
func TestExpectKnownValue_CheckPlan_ObjectPartial(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
object_attribute = {
Expand All @@ -110,7 +110,7 @@ func TestExpectKnownValue_CheckPlan_ObjectPartial(t *testing.T) {
}
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Example usage of [SetElementsExact](https://pkg.go.dev/github.com/hashicorp/terr
func TestExpectKnownValue_CheckPlan_SetElements(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
set_attribute = [
Expand All @@ -33,7 +33,7 @@ func TestExpectKnownValue_CheckPlan_SetElements(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand All @@ -58,9 +58,9 @@ Example usage of [SetValueExact](https://pkg.go.dev/github.com/hashicorp/terrafo
func TestExpectKnownValue_CheckPlan_Set(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
set_attribute = [
Expand All @@ -69,7 +69,7 @@ func TestExpectKnownValue_CheckPlan_Set(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down Expand Up @@ -97,9 +97,9 @@ Example usage of [SetValuePartialMatch](https://pkg.go.dev/github.com/hashicorp/
func TestExpectKnownValue_CheckPlan_SetPartial(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
set_attribute = [
Expand All @@ -108,7 +108,7 @@ func TestExpectKnownValue_CheckPlan_SetPartial(t *testing.T) {
]
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Example usage of [StringValueExact](https://pkg.go.dev/github.com/hashicorp/terr
func TestExpectKnownValue_CheckPlan_String(t *testing.T) {
t.Parallel()

r.Test(t, r.TestCase{
resource.Test(t, resource.TestCase{
// Provider definition omitted.
Steps: []r.TestStep{
Steps: []resource.TestStep{
{
Config: `resource "test_resource" "one" {
string_attribute = "str"
}
`,
ConfigPlanChecks: r.ConfigPlanChecks{
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectKnownValue(
"test_resource.one",
Expand Down

0 comments on commit 9bdf445

Please sign in to comment.