Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesverdad committed Jun 10, 2020
1 parent a1fa38a commit a87912f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dghubble/sling v1.1.0/go.mod h1:ZcPRuLm0qrcULW2gOrjXrAWgf76sahqSyxXyVOvkunE=
github.com/dghubble/sling v1.3.0 h1:pZHjCJq4zJvc6qVQ5wN1jo5oNZlNE0+8T/h0XeXBUKU=
github.com/dghubble/sling v1.3.0/go.mod h1:XXShWaBWKzNLhu2OxikSNFrlsvowtz4kyRuXUG7oQKY=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
Expand Down Expand Up @@ -109,7 +108,6 @@ github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/jianyuan/go-sentry v1.2.0/go.mod h1:IlgHIblLdlWCnqpIxFV4bnLb4fgg9xFfDd41p6kRc/Y=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
Expand Down Expand Up @@ -151,6 +149,7 @@ github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI=
Expand All @@ -163,6 +162,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
Expand Down Expand Up @@ -270,6 +270,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
Empty file modified sentry/import_sentry_project_rule.go
100755 → 100644
Empty file.
Empty file modified sentry/resource_sentry_project_rule.go
100755 → 100644
Empty file.
53 changes: 26 additions & 27 deletions sentry/resource_sentry_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ func TestAccSentryProject_basic(t *testing.T) {

testAccSentryProjectUpdateConfig := fmt.Sprintf(`
resource "sentry_team" "test_team" {
organization = "%s"
name = "Test team"
organization = "%s"
name = "Test team"
}
resource "sentry_project" "test_project" {
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project changed"
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project changed"
slug = "%s"
allowed_domains = ["www.canva.com", "www.canva.cn"]
grouping_enhancements = "function:panic_handler ^-group"
slug = "%s"
platform = "go"
platform = "go"
}
`, testOrganization, testOrganization, newProjectSlug)

Expand All @@ -52,7 +51,6 @@ func TestAccSentryProject_basic(t *testing.T) {
SlugPresent: true,
AllowedDomains: []string{"*"},
GroupingEnhancements: "",
SlugPresent: true,
Platform: "go",
}),
),
Expand Down Expand Up @@ -208,6 +206,7 @@ func testAccCheckSentryProjectAttributes(proj *sentryclient.Project, want *testA
}
} else {
return fmt.Errorf("want: %v, get: %v", want.AllowedDomains, proj.AllowedDomains)
}

if want.Platform != "" && proj.Platform != want.Platform {
return fmt.Errorf("got Platform %q; want %q", proj.Platform, want.Platform)
Expand All @@ -219,42 +218,42 @@ func testAccCheckSentryProjectAttributes(proj *sentryclient.Project, want *testA

var testAccSentryProjectConfig = fmt.Sprintf(`
resource "sentry_team" "test_team" {
organization = "%s"
name = "Test team"
organization = "%s"
name = "Test team"
}
resource "sentry_project" "test_project" {
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
platform = "go"
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
platform = "go"
}
`, testOrganization, testOrganization)

var testAccSentryProjectRemoveKeyConfig = fmt.Sprintf(`
resource "sentry_team" "test_team" {
organization = "%s"
name = "Test team"
organization = "%s"
name = "Test team"
}
resource "sentry_project" "test_project_remove_key" {
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
remove_default_key = true
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
remove_default_key = true
}
`, testOrganization, testOrganization)

var testAccSentryProjectRemoveRuleConfig = fmt.Sprintf(`
resource "sentry_team" "test_team" {
organization = "%s"
name = "Test team"
organization = "%s"
name = "Test team"
}
resource "sentry_project" "test_project_remove_rule" {
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
remove_default_rule = true
organization = "%s"
team = "${sentry_team.test_team.id}"
name = "Test project"
remove_default_rule = true
}
`, testOrganization, testOrganization)
`, testOrganization, testOrganization)

0 comments on commit a87912f

Please sign in to comment.