Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
  • Loading branch information
St0rmingBr4in committed Oct 12, 2022
1 parent b9ef776 commit ce10246
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions manifest/test/acceptance/datasource_resource_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"testing"

"github.com/hashicorp/go-hclog"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-provider-kubernetes/manifest/provider"
"github.com/hashicorp/terraform-provider-kubernetes/manifest/test/helper/kubernetes"

tfstatehelper "github.com/hashicorp/terraform-provider-kubernetes/manifest/test/helper/state"
)

func TestDataSourceKubernetesResource_ConfigMap(t *testing.T) {
func TestDataSourceKubernetesResourceStatus_ConfigMap(t *testing.T) {
ctx := context.Background()

reattachInfo, err := provider.ServeTest(ctx, hclog.Default(), t)
Expand Down Expand Up @@ -65,7 +64,7 @@ func TestDataSourceKubernetesResource_ConfigMap(t *testing.T) {
defer func() {
step2.Destroy(ctx)
step2.Close()
k8shelper.AssertNamespacedResourceDoesNotExist(t, "v1", "deployments", namespace, name2)
k8shelper.AssertNamespacedResourceDoesNotExist(t, "v1", "deployments", namespace, name)
}()

tfconfig = loadTerraformConfig(t, "datasource-resource-status/step2.tf", tfvars)
Expand All @@ -77,7 +76,7 @@ func TestDataSourceKubernetesResource_ConfigMap(t *testing.T) {
if err != nil {
t.Fatalf("Failed to retrieve terraform state: %q", err)
}
tfstate := tfstatehelper.NewHelper(s2)
tfstate = tfstatehelper.NewHelper(s2)

// check that the data source has the status field defined
tfstate.AssertAttributeNotEmpty(t, "data.kubernetes_resource.test_deploy.object.status")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ resource "kubernetes_deployment" "test_deploy" {
container {
image = "nginx:1.21.6"
name = "test"
}
}
}
}
Expand Down

0 comments on commit ce10246

Please # to comment.