Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade heroku-go #169

Merged
merged 1 commit into from
Jan 31, 2019
Merged

upgrade heroku-go #169

merged 1 commit into from
Jan 31, 2019

Conversation

shawncatz
Copy link
Contributor

@shawncatz shawncatz commented Jan 31, 2019

NOTE: while working on this, I noticed an issue with the way we reference buildpacks, this may break. I'd like reviewers thoughts on how to change this (a buildpack sub resource, checking if the value is a URL)
(I made a change this in my other PR, but was ruminating as I was pulling those changes here and I see issues potentially with people mixing Buildpack Registry names and URLs for custom buildpacks, so the resource may need to change to support them separately)

Break out the heroku-go vendor update from #167

NOTE: while working on this, I noticed an issue with the way we reference buildpacks, this may break
@shawncatz
Copy link
Contributor Author

@davidji99 @mars

@mars
Copy link
Member

mars commented Jan 31, 2019

Nice @shawncatz 🙌

Yes indeed, thanks for bringing up buildpack URLs 🆚 names. I created #170 to track that.

When you say that you "fixed this in my other PR", what do you mean?

@shawncatz
Copy link
Contributor Author

sorry, I misspoke, didn't mean fixed, just meant that I made the change to make the tests pass... but we still need to work out how we want to handle buildpack URLs vs names

@mars
Copy link
Member

mars commented Jan 31, 2019

The fact that “All checks have passed” above does not really mean the tests pass. Many are skipped for PR’s, only run by Hashicorp’s CI to gate release.

I’ve started a local run of full acceptance tests to confirm this PR is okay.

@shawncatz
Copy link
Contributor Author

Yes, of course, I understand

@davidji99
Copy link
Collaborator

Okay cool, we can merge this in then look at #167.

@mars
Copy link
Member

mars commented Jan 31, 2019

The run finished in about 1h 50m, and failed because some tests errored or skipped due to misconfiguration on my part. (Result output pasted below.)

I'm going to try to fix my mis-configs and get this to pass today.

Not sure what the HEROKU_SLUG_ID requirements are, so will figure that out and update the TESTING docs with the info.

$ HEROKU_API_KEY=xxxxx \
  [email protected] \
  HEROKU_SPACES_ORGANIZATION=xxxxx \
  HEROKU_ORGANIZATION=xxxxx \
  HEROKU_SLUG_ID=xxxxx \
  make testacc \
  TEST="./heroku/" \
  TESTARGS=''

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./heroku/ -v  -timeout 120m -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=test"
=== RUN   TestAccDatasourceHerokuAddon_Basic
--- PASS: TestAccDatasourceHerokuAddon_Basic (12.23s)
=== RUN   TestAccDatasourceHerokuApp_Basic
--- PASS: TestAccDatasourceHerokuApp_Basic (11.46s)
=== RUN   TestAccDatasourceHerokuApp_Advanced
--- PASS: TestAccDatasourceHerokuApp_Advanced (495.65s)
=== RUN   TestAccDatasourceHerokuSpacePeeringInfo_Basic
--- PASS: TestAccDatasourceHerokuSpacePeeringInfo_Basic (438.59s)
=== RUN   TestAccDatasourceHerokuSpace_Basic
--- PASS: TestAccDatasourceHerokuSpace_Basic (462.78s)
=== RUN   TestAccHerokuAccountFeature_importBasic
--- PASS: TestAccHerokuAccountFeature_importBasic (1.08s)
=== RUN   TestAccHerokuAddonAttachment_importBasic
--- PASS: TestAccHerokuAddonAttachment_importBasic (10.63s)
=== RUN   TestAccHerokuAddon_importBasic
--- PASS: TestAccHerokuAddon_importBasic (11.64s)
=== RUN   TestAccHerokuAppFeature_importBasic
--- PASS: TestAccHerokuAppFeature_importBasic (8.60s)
=== RUN   TestAccHerokuAppRelease_importBasic
--- FAIL: TestAccHerokuAppRelease_importBasic (7.16s)
    testing.go:518: Step 0 error: Error applying: 1 error occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-e3znw08ekt/releases: Slug not compatible with space
        
        
        
        
=== RUN   TestAccHerokuApp_importBasic
--- PASS: TestAccHerokuApp_importBasic (8.44s)
=== RUN   TestAccHerokuApp_importOrganization
--- PASS: TestAccHerokuApp_importOrganization (11.33s)
=== RUN   TestAccHerokuBuild_importBasic
--- PASS: TestAccHerokuBuild_importBasic (24.18s)
=== RUN   TestAccHerokuBuild_importAllOpts
--- PASS: TestAccHerokuBuild_importAllOpts (34.47s)
=== RUN   TestAccHerokuBuild_importWithFileUrl
--- PASS: TestAccHerokuBuild_importWithFileUrl (18.12s)
=== RUN   TestAccHerokuCert_importBasic
--- PASS: TestAccHerokuCert_importBasic (12.41s)
=== RUN   TestAccHerokuDomain_importBasic
--- PASS: TestAccHerokuDomain_importBasic (13.60s)
=== RUN   TestAccHerokuDrain_importBasic
--- PASS: TestAccHerokuDrain_importBasic (10.31s)
=== RUN   TestAccHerokuFormation_importBasic
--- FAIL: TestAccHerokuFormation_importBasic (10.08s)
    testing.go:518: Step 0 error: Error applying: 2 errors occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-xjref7fruh/releases: Slug not compatible with space
        
        
        	* heroku_formation.foobar-web: 1 error occurred:
        	* heroku_formation.foobar-web: Patch https://api.heroku.com/apps/tftest-xjref7fruh/formation/web: Couldn't find that process type (web).
        
        
        
        
=== RUN   TestAccHerokuPipelineCoupling_importBasic
--- PASS: TestAccHerokuPipelineCoupling_importBasic (10.37s)
=== RUN   TestAccHerokuPipeline_importBasic
--- PASS: TestAccHerokuPipeline_importBasic (1.56s)
=== RUN   TestAccHerokuSlug_importBasic
--- PASS: TestAccHerokuSlug_importBasic (8.79s)
=== RUN   TestAccHerokuSlug_importAllOpts
--- PASS: TestAccHerokuSlug_importAllOpts (8.73s)
=== RUN   TestAccHerokuSlug_importWithFileUrl
--- PASS: TestAccHerokuSlug_importWithFileUrl (9.24s)
=== RUN   TestAccHerokuSpaceAppAccess_importBasic
--- FAIL: TestAccHerokuSpaceAppAccess_importBasic (0.00s)
    config.go:71: stopping test: config [HEROKU_NON_ADMIN_TEST_USER] must be set
=== RUN   TestAccHerokuTeamCollaborator_importBasic
--- FAIL: TestAccHerokuTeamCollaborator_importBasic (0.00s)
    config.go:71: stopping test: config [HEROKU_TEST_USER] must be set
=== RUN   TestAccHerokuTeamMember_importBasic
--- FAIL: TestAccHerokuTeamMember_importBasic (0.00s)
    config.go:71: stopping test: config [HEROKU_TEST_USER] must be set
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestProviderConfigureUsesHeadersForClient
--- PASS: TestProviderConfigureUsesHeadersForClient (0.00s)
=== RUN   TestAccHerokuAccountFeature_Basic
--- PASS: TestAccHerokuAccountFeature_Basic (1.46s)
=== RUN   TestAccHerokuAddonAttachment_Basic
--- PASS: TestAccHerokuAddonAttachment_Basic (10.51s)
=== RUN   TestAccHerokuAddonAttachment_Named
--- PASS: TestAccHerokuAddonAttachment_Named (10.38s)
=== RUN   TestAccHerokuAddon_Basic
--- PASS: TestAccHerokuAddon_Basic (9.72s)
=== RUN   TestAccHerokuAddon_noPlan
--- PASS: TestAccHerokuAddon_noPlan (11.82s)
=== RUN   TestAccHerokuAddon_Disappears
--- PASS: TestAccHerokuAddon_Disappears (9.14s)
=== RUN   TestAccHerokuAppFeature
--- PASS: TestAccHerokuAppFeature (10.38s)
=== RUN   TestAccHerokuAppRelease_Basic
--- FAIL: TestAccHerokuAppRelease_Basic (7.09s)
    testing.go:518: Step 0 error: Error applying: 1 error occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-pk6f1o7bh1/releases: Slug not compatible with space
        
        
        
        
=== RUN   TestAccHerokuAppRelease_OrgBasic
--- FAIL: TestAccHerokuAppRelease_OrgBasic (9.66s)
    testing.go:518: Step 0 error: Error applying: 1 error occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-wopsbn1yoc/releases: Slug not compatible with space
        
        
        
        
=== RUN   TestAccHerokuApp_Basic
--- PASS: TestAccHerokuApp_Basic (7.95s)
=== RUN   TestAccHerokuApp_Disappears
--- PASS: TestAccHerokuApp_Disappears (6.73s)
=== RUN   TestAccHerokuApp_Change
--- PASS: TestAccHerokuApp_Change (10.62s)
=== RUN   TestAccHerokuApp_NukeVars
--- PASS: TestAccHerokuApp_NukeVars (10.58s)
=== RUN   TestAccHerokuApp_Buildpacks
--- PASS: TestAccHerokuApp_Buildpacks (13.40s)
=== RUN   TestAccHerokuApp_ExternallySetBuildpacks
--- PASS: TestAccHerokuApp_ExternallySetBuildpacks (9.52s)
=== RUN   TestAccHerokuApp_ACM
--- PASS: TestAccHerokuApp_ACM (17.00s)
=== RUN   TestAccHerokuApp_Organization
--- PASS: TestAccHerokuApp_Organization (10.95s)
=== RUN   TestAccHerokuApp_Space
--- PASS: TestAccHerokuApp_Space (448.85s)
=== RUN   TestAccHerokuApp_Space_Internal
--- PASS: TestAccHerokuApp_Space_Internal (469.95s)
=== RUN   TestAccHerokuApp_EmptyConfigVars
--- PASS: TestAccHerokuApp_EmptyConfigVars (7.86s)
=== RUN   TestAccHerokuApp_SensitiveConfigVars
--- PASS: TestAccHerokuApp_SensitiveConfigVars (16.44s)
=== RUN   TestAccHerokuBuild_Basic
--- PASS: TestAccHerokuBuild_Basic (24.00s)
=== RUN   TestAccHerokuBuild_InsecureUrl
--- PASS: TestAccHerokuBuild_InsecureUrl (0.00s)
=== RUN   TestAccHerokuBuild_NoSource
--- PASS: TestAccHerokuBuild_NoSource (7.00s)
=== RUN   TestAccHerokuBuild_AllOpts
--- PASS: TestAccHerokuBuild_AllOpts (34.17s)
=== RUN   TestAccHerokuBuild_LocalSourceTarball
--- PASS: TestAccHerokuBuild_LocalSourceTarball (36.25s)
=== RUN   TestAccHerokuBuild_LocalSourceTarball_SetChecksum
--- PASS: TestAccHerokuBuild_LocalSourceTarball_SetChecksum (6.96s)
=== RUN   TestAccHerokuBuild_LocalSourceTarball_AllOpts
--- PASS: TestAccHerokuBuild_LocalSourceTarball_AllOpts (24.90s)
=== RUN   TestAccHerokuBuild_LocalSourceDirectory
--- PASS: TestAccHerokuBuild_LocalSourceDirectory (29.26s)
=== RUN   TestAccHerokuCert_EU
--- PASS: TestAccHerokuCert_EU (43.79s)
=== RUN   TestAccHerokuCert_US
--- PASS: TestAccHerokuCert_US (41.76s)
=== RUN   TestAccHerokuDomain_Basic
--- PASS: TestAccHerokuDomain_Basic (13.54s)
=== RUN   TestAccHerokuDrain_Basic
--- PASS: TestAccHerokuDrain_Basic (9.36s)
=== RUN   TestAccHerokuFormationSingleUpdate_WithOrg
--- FAIL: TestAccHerokuFormationSingleUpdate_WithOrg (10.05s)
    testing.go:518: Step 0 error: Error applying: 2 errors occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-r7y4db3k3i/releases: Slug not compatible with space
        
        
        	* heroku_formation.foobar-web: 1 error occurred:
        	* heroku_formation.foobar-web: Patch https://api.heroku.com/apps/tftest-r7y4db3k3i/formation/web: Couldn't find that process type (web).
        
        
        
        
=== RUN   TestAccHerokuFormationUpdateFreeDyno
--- FAIL: TestAccHerokuFormationUpdateFreeDyno (7.36s)
    testing.go:518: Step 0 error: Error applying: 2 errors occurred:
        	* heroku_app_release.foobar-release: 1 error occurred:
        	* heroku_app_release.foobar-release: Post https://api.heroku.com/apps/tftest-wxo298wd4l/releases: Slug not compatible with space
        
        
        	* heroku_formation.foobar-web: 1 error occurred:
        	* heroku_formation.foobar-web: Patch https://api.heroku.com/apps/tftest-wxo298wd4l/formation/web: Couldn't find that process type (web).
        
        
        
        
=== RUN   TestAccHerokuPipelineCoupling_Basic
--- PASS: TestAccHerokuPipelineCoupling_Basic (10.12s)
=== RUN   TestAccHerokuPipeline_Basic
--- PASS: TestAccHerokuPipeline_Basic (2.27s)
=== RUN   TestAccHerokuSlug_Basic
--- PASS: TestAccHerokuSlug_Basic (8.68s)
=== RUN   TestAccHerokuSlug_NoFile
--- PASS: TestAccHerokuSlug_NoFile (6.99s)
=== RUN   TestAccHerokuSlug_AllOpts
--- PASS: TestAccHerokuSlug_AllOpts (8.70s)
=== RUN   TestAccHerokuSlug_WithFile
--- PASS: TestAccHerokuSlug_WithFile (10.48s)
=== RUN   TestAccHerokuSlug_WithRemoteFile
--- PASS: TestAccHerokuSlug_WithRemoteFile (9.03s)
=== RUN   TestAccHerokuSlug_WithInsecureRemoteFile
--- PASS: TestAccHerokuSlug_WithInsecureRemoteFile (0.00s)
=== RUN   TestAccHerokuSlug_WithFile_InPrivateSpace
--- PASS: TestAccHerokuSlug_WithFile_InPrivateSpace (450.71s)
=== RUN   TestAccHerokuSpaceAppAccess_Basic
--- FAIL: TestAccHerokuSpaceAppAccess_Basic (0.00s)
    config.go:71: stopping test: config [HEROKU_NON_ADMIN_TEST_USER] must be set
=== RUN   TestAccHerokuSpaceInboundRuleset_Basic
--- PASS: TestAccHerokuSpaceInboundRuleset_Basic (459.73s)
=== RUN   TestAccHerokuSpace_Basic
--- PASS: TestAccHerokuSpace_Basic (459.80s)
=== RUN   TestAccHerokuSpace_Shield
--- PASS: TestAccHerokuSpace_Shield (468.71s)
=== RUN   TestAccHerokuSpace_IPRange
--- PASS: TestAccHerokuSpace_IPRange (439.58s)
=== RUN   TestAccHerokuVPNConnection_basic
--- PASS: TestAccHerokuVPNConnection_basic (869.66s)
=== RUN   TestAccHerokuTeamCollaborator_Org
--- SKIP: TestAccHerokuTeamCollaborator_Org (0.00s)
    config.go:62: skipping test: config [HEROKU_TEST_USER] not set
=== RUN   TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org
--- SKIP: TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org (0.00s)
    config.go:62: skipping test: config [HEROKU_TEST_USER] not set
=== RUN   TestAccHerokuTeamMember_Org
--- SKIP: TestAccHerokuTeamMember_Org (0.00s)
    config.go:62: skipping test: config [HEROKU_TEST_USER] not set
=== RUN   TestValidateUUID
--- PASS: TestValidateUUID (0.00s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-heroku/heroku	6244.416s

@shawncatz
Copy link
Contributor Author

Awesome thanks for that @mars

@mars mars self-requested a review January 31, 2019 19:47
Copy link
Member

@mars mars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed-up the test params and re-ran the tests that errored or skipped in the last run. Also, opened PR #171 to clarify the test params including the slug requirements. So, with that…

The full suite passes

$ HEROKU_API_KEY=xxxxx \
  [email protected] \
  HEROKU_SPACES_ORGANIZATION=xxxxx \
  HEROKU_ORGANIZATION=xxxxx \
  HEROKU_SLUG_ID=xxxxx \
  [email protected] \
  [email protected] \
  make testacc \
  TEST="./heroku/" \
  TESTARGS='"-run=TestAccHerokuAppRelease_importBasic|TestAccHerokuFormation_importBasic|TestAccHerokuSpaceAppAccess_importBasic|TestAccHerokuTeamCollaborator_importBasic|TestAccHerokuTeamMember_importBasic|TestAccHerokuAppRelease_Basic|TestAccHerokuAppRelease_OrgBasic|TestAccHerokuFormationSingleUpdate_WithOrg|TestAccHerokuFormationUpdateFreeDyno|TestAccHerokuSpaceAppAccess_Basic|TestAccHerokuTeamCollaborator_Org|TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org|TestAccHerokuTeamMember_Org"'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./heroku/ -v "-run=TestAccHerokuAppRelease_importBasic|TestAccHerokuFormation_importBasic|TestAccHerokuSpaceAppAccess_importBasic|TestAccHerokuTeamCollaborator_importBasic|TestAccHerokuTeamMember_importBasic|TestAccHerokuAppRelease_Basic|TestAccHerokuAppRelease_OrgBasic|TestAccHerokuFormationSingleUpdate_WithOrg|TestAccHerokuFormationUpdateFreeDyno|TestAccHerokuSpaceAppAccess_Basic|TestAccHerokuTeamCollaborator_Org|TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org|TestAccHerokuTeamMember_Org" -timeout 120m -ldflags="-X=github.com/terraform-providers/terraform-provider-heroku/version.ProviderVersion=test"
=== RUN   TestAccHerokuAppRelease_importBasic
--- PASS: TestAccHerokuAppRelease_importBasic (9.28s)
=== RUN   TestAccHerokuFormation_importBasic
--- PASS: TestAccHerokuFormation_importBasic (11.79s)
=== RUN   TestAccHerokuSpaceAppAccess_importBasic
--- PASS: TestAccHerokuSpaceAppAccess_importBasic (451.47s)
=== RUN   TestAccHerokuTeamCollaborator_importBasic
--- PASS: TestAccHerokuTeamCollaborator_importBasic (13.26s)
=== RUN   TestAccHerokuTeamMember_importBasic
--- PASS: TestAccHerokuTeamMember_importBasic (1.25s)
=== RUN   TestAccHerokuAppRelease_Basic
--- PASS: TestAccHerokuAppRelease_Basic (8.68s)
=== RUN   TestAccHerokuAppRelease_OrgBasic
--- PASS: TestAccHerokuAppRelease_OrgBasic (11.83s)
=== RUN   TestAccHerokuFormationSingleUpdate_WithOrg
--- PASS: TestAccHerokuFormationSingleUpdate_WithOrg (11.68s)
=== RUN   TestAccHerokuFormationUpdateFreeDyno
--- PASS: TestAccHerokuFormationUpdateFreeDyno (8.71s)
=== RUN   TestAccHerokuSpaceAppAccess_Basic
--- PASS: TestAccHerokuSpaceAppAccess_Basic (438.80s)
=== RUN   TestAccHerokuTeamCollaborator_Org
--- PASS: TestAccHerokuTeamCollaborator_Org (12.18s)
=== RUN   TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org
--- PASS: TestAccHerokuTeamCollaboratorPermsOutOfOrder_Org (12.29s)
=== RUN   TestAccHerokuTeamMember_Org
--- PASS: TestAccHerokuTeamMember_Org (1.14s)
PASS
ok  	github.com/terraform-providers/terraform-provider-heroku/heroku	992.417s

@mars
Copy link
Member

mars commented Jan 31, 2019

Any other concerns before we merge? @davidji99 @talbright @joestump

@talbright
Copy link
Contributor

No concern...you guys are on top of things, lgtm!

@mars mars merged commit de66ab2 into heroku:master Jan 31, 2019
@shawncatz shawncatz deleted the upgrade-heroku-go branch January 31, 2019 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants