Guest User

Untitled

a guest
Nov 14th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. func TestAccAlert_importBasic(t *testing.T) {
  2. resource.Test(t, resource.TestCase{
  3. PreCheck: func() { testAccPreCheck(t) },
  4. Providers: testAccProviders,
  5. CheckDestroy: testAccCheckItemDestroy,
  6. Steps: []resource.TestStep{
  7. {
  8. Config: testAccCheckExampleItemImporter_basic(),
  9. Check: resource.ComposeTestCheckFunc(
  10. testAccCheckExampleItemExists("example_item.test_import"),
  11. ),
  12. },
  13. {
  14. ResourceName: "example_item.test_import",
  15. ImportState: true,
  16. ImportStateVerify: true,
  17. },
  18. },
  19. })
  20. }
  21.  
  22. func testAccCheckExampleItemImporter_basic() string {
  23. return fmt.Sprintf(`
  24. resource "example_item" "test_import" {
  25. name = "test_import"
  26. description = "testing importing of a resource"
  27. tags = [
  28. "import1",
  29. "import2",
  30. "import3"
  31. ]
  32. }
  33. `)
  34. }
Add Comment
Please, Sign In to add comment