Skip to content

Commit

Permalink
Clean acceptances tests
Browse files Browse the repository at this point in the history
Signed-off-by: disaster37 <[email protected]>
  • Loading branch information
disaster37 committed Sep 3, 2021
1 parent 4298660 commit 55d5ca6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
8 changes: 5 additions & 3 deletions es/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/sirupsen/logrus"
prefixed "github.com/x-cray/logrus-prefixed-formatter"
easy "github.com/t-tomalak/logrus-easy-formatter"
)

var testAccProviders map[string]*schema.Provider
Expand All @@ -15,8 +15,10 @@ var testAccProvider *schema.Provider
func init() {

// Init logger
logrus.SetFormatter(new(prefixed.TextFormatter))
logrus.SetLevel(logrus.DebugLevel)
logrus.SetFormatter(&easy.Formatter{
LogFormat: "[%lvl%] %msg%\n",
})
//logrus.SetLevel(logrus.DebugLevel)

// Init provider
testAccProvider = Provider()
Expand Down
7 changes: 3 additions & 4 deletions es/resource_elasticsearch_index_lifecycle_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ func TestAccElasticsearchIndexLifecyclePolicy(t *testing.T) {
),
},
{
ResourceName: "elasticsearch_index_lifecycle_policy.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"policy"},
ResourceName: "elasticsearch_index_lifecycle_policy.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down
7 changes: 3 additions & 4 deletions es/resource_elasticsearch_security_role_mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ func TestAccElasticsearchSecurityRoleMapping(t *testing.T) {
),
},
{
ResourceName: "elasticsearch_role_mapping.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"metadata", "rules"},
ResourceName: "elasticsearch_role_mapping.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down
7 changes: 3 additions & 4 deletions es/resource_elasticsearch_security_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ func TestAccElasticsearchSecurityRole(t *testing.T) {
),
},
{
ResourceName: "elasticsearch_role.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"indices", "metadata"},
ResourceName: "elasticsearch_role.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion es/resource_elasticsearch_security_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestAccElasticsearchSecurityUser(t *testing.T) {
ResourceName: "elasticsearch_user.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"metadata", "password", "password_hash"},
ImportStateVerifyIgnore: []string{"password", "password_hash"},
},
},
})
Expand Down
7 changes: 3 additions & 4 deletions es/resource_elasticsearch_snapshot_lifecycle_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ func TestAccElasticsearchSnapshotLifecyclePolicy(t *testing.T) {
),
},
{
ResourceName: "elasticsearch_snapshot_lifecycle_policy.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"configs", "retention"},
ResourceName: "elasticsearch_snapshot_lifecycle_policy.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down
7 changes: 3 additions & 4 deletions es/resource_elasticsearch_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ func TestAccElasticsearchWatcher(t *testing.T) {
),
},
{
ResourceName: "elasticsearch_watcher.test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"trigger", "input", "condition", "actions", "metadata"},
ResourceName: "elasticsearch_watcher.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down

0 comments on commit 55d5ca6

Please sign in to comment.