Skip to content

Commit

Permalink
Fix up the GCP and User tests (#238)
Browse files Browse the repository at this point in the history
* Update and fix tests

* Remove the extra log lines
  • Loading branch information
nmuesch authored Jun 17, 2019
1 parent 5051c71 commit 3b5b0af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions datadog/resource_datadog_integration_gcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

const testAccCheckDatadogIntegrationGCPConfig = `
resource "datadog_integration_gcp" "awesome_gcp_project_integration" {
project_id = "awesome-project-id"
project_id = "super-awesome-project-id"
private_key_id = "1234567890123456789012345678901234567890"
private_key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
client_email = "awesome-service-account@awesome-project-id.iam.gserviceaccount.com"
Expand All @@ -21,7 +21,7 @@ resource "datadog_integration_gcp" "awesome_gcp_project_integration" {
`
const testAccCheckDatadogIntegrationGCPEmptyHostFiltersConfig = `
resource "datadog_integration_gcp" "awesome_gcp_project_integration" {
project_id = "awesome-project-id"
project_id = "super-awesome-project-id"
private_key_id = "1234567890123456789012345678901234567890"
private_key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
client_email = "awesome-service-account@awesome-project-id.iam.gserviceaccount.com"
Expand All @@ -41,7 +41,7 @@ func TestAccDatadogIntegrationGCP(t *testing.T) {
checkIntegrationGCPExists,
resource.TestCheckResourceAttr(
"datadog_integration_gcp.awesome_gcp_project_integration",
"project_id", "awesome-project-id"),
"project_id", "super-awesome-project-id"),
resource.TestCheckResourceAttr(
"datadog_integration_gcp.awesome_gcp_project_integration",
"private_key_id", "1234567890123456789012345678901234567890"),
Expand All @@ -65,7 +65,7 @@ func TestAccDatadogIntegrationGCP(t *testing.T) {
checkIntegrationGCPExists,
resource.TestCheckResourceAttr(
"datadog_integration_gcp.awesome_gcp_project_integration",
"project_id", "awesome-project-id"),
"project_id", "super-awesome-project-id"),
resource.TestCheckResourceAttr(
"datadog_integration_gcp.awesome_gcp_project_integration",
"private_key_id", "1234567890123456789012345678901234567890"),
Expand Down
16 changes: 8 additions & 8 deletions datadog/resource_datadog_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func TestAccDatadogUser_Updated(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckDatadogUserExists("datadog_user.foo"),
resource.TestCheckResourceAttr(
"datadog_user.foo", "email", "test@example.com"),
"datadog_user.foo", "email", "tftestuser@example.com"),
resource.TestCheckResourceAttr(
"datadog_user.foo", "handle", "test@example.com"),
"datadog_user.foo", "handle", "tftestuser@example.com"),
resource.TestCheckResourceAttr(
"datadog_user.foo", "name", "Test User"),
resource.TestCheckResourceAttr(
Expand All @@ -38,9 +38,9 @@ func TestAccDatadogUser_Updated(t *testing.T) {
"datadog_user.foo", "disabled", "true"),
// NOTE: it's not possible ATM to update email of another user
resource.TestCheckResourceAttr(
"datadog_user.foo", "email", "test@example.com"),
"datadog_user.foo", "email", "tftestuser@example.com"),
resource.TestCheckResourceAttr(
"datadog_user.foo", "handle", "test@example.com"),
"datadog_user.foo", "handle", "tftestuser@example.com"),
resource.TestCheckResourceAttr(
"datadog_user.foo", "is_admin", "true"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -76,8 +76,8 @@ func testAccCheckDatadogUserExists(n string) resource.TestCheckFunc {

const testAccCheckDatadogUserConfigRequired = `
resource "datadog_user" "foo" {
email = "test@example.com"
handle = "test@example.com"
email = "tftestuser@example.com"
handle = "tftestuser@example.com"
name = "Test User"
}
`
Expand All @@ -86,8 +86,8 @@ const testAccCheckDatadogUserConfigUpdated = `
resource "datadog_user" "foo" {
disabled = true
// NOTE: it's not possible ATM to update email of another user
email = "test@example.com"
handle = "test@example.com"
email = "tftestuser@example.com"
handle = "tftestuser@example.com"
is_admin = true
access_role = "adm"
name = "Updated User"
Expand Down

0 comments on commit 3b5b0af

Please sign in to comment.