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

INTMDB-242: Fixes the bug when if you don set public/private key it would fail for getting realm client #519

Merged
merged 6 commits into from
Aug 20, 2021

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Aug 18, 2021

Description

Fixes a bug when if you don't set a public/private key, if you terraform plan with provider mongodbatlas downloaded, it would fail because of bad challenge, it happens because it tries to get a token with empty public/private keys

Results of Acceptance Tests

Resource

make testacc TESTARGS='-run=TestAccResourceMongoDBAtlasEventTrigger'           
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... | grep -v /integration-testing) -v -parallel 20 -run=TestAccResourceMongoDBAtlasEventTrigger -timeout 300m -cover -ldflags="-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=acc'"
?       github.com/mongodb/terraform-provider-mongodbatlas      [no test files]
=== RUN   TestAccResourceMongoDBAtlasEventTriggerDatabase_basic
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerDatabase_basic
=== RUN   TestAccResourceMongoDBAtlasEventTriggerDatabase_eventProccesor
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerDatabase_eventProccesor
=== RUN   TestAccResourceMongoDBAtlasEventTriggerAuth_basic
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerAuth_basic
=== RUN   TestAccResourceMongoDBAtlasEventTriggerAuth_eventProcessor
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerAuth_eventProcessor
=== RUN   TestAccResourceMongoDBAtlasEventTriggerSchedule_basic
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerSchedule_basic
=== RUN   TestAccResourceMongoDBAtlasEventTriggerSchedule_eventProcessor
=== PAUSE TestAccResourceMongoDBAtlasEventTriggerSchedule_eventProcessor
=== CONT  TestAccResourceMongoDBAtlasEventTriggerDatabase_basic
=== CONT  TestAccResourceMongoDBAtlasEventTriggerSchedule_basic
=== CONT  TestAccResourceMongoDBAtlasEventTriggerAuth_basic
=== CONT  TestAccResourceMongoDBAtlasEventTriggerAuth_eventProcessor
=== CONT  TestAccResourceMongoDBAtlasEventTriggerSchedule_eventProcessor
=== CONT  TestAccResourceMongoDBAtlasEventTriggerDatabase_eventProccesor
--- PASS: TestAccResourceMongoDBAtlasEventTriggerDatabase_eventProccesor (39.07s)
--- PASS: TestAccResourceMongoDBAtlasEventTriggerDatabase_basic (39.13s)
--- PASS: TestAccResourceMongoDBAtlasEventTriggerAuth_basic (39.31s)
--- PASS: TestAccResourceMongoDBAtlasEventTriggerSchedule_eventProcessor (39.34s)
--- PASS: TestAccResourceMongoDBAtlasEventTriggerSchedule_basic (39.40s)
--- PASS: TestAccResourceMongoDBAtlasEventTriggerAuth_eventProcessor (40.24s)
PASS
coverage: 5.7% of statements
ok      github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 40.587s coverage: 5.7% of statements
?       github.com/mongodb/terraform-provider-mongodbatlas/version      [no test files]

Datasource(s)

 make testacc TESTARGS='-run=TestAccDataSourceMongoDBAtlasEventTrigger'              [9:16:26]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... | grep -v /integration-testing) -v -parallel 20 -run=TestAccDataSourceMongoDBAtlasEventTrigger -timeout 300m -cover -ldflags="-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=acc'"
?       github.com/mongodb/terraform-provider-mongodbatlas      [no test files]
=== RUN   TestAccDataSourceMongoDBAtlasEventTrigger_basic
--- PASS: TestAccDataSourceMongoDBAtlasEventTrigger_basic (32.42s)
=== RUN   TestAccDataSourceMongoDBAtlasEventTriggers_basic
=== PAUSE TestAccDataSourceMongoDBAtlasEventTriggers_basic
=== CONT  TestAccDataSourceMongoDBAtlasEventTriggers_basic
--- PASS: TestAccDataSourceMongoDBAtlasEventTriggers_basic (26.76s)
PASS
coverage: 5.6% of statements
ok      github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 59.542s coverage: 5.6% of statements
?       github.com/mongodb/terraform-provider-mongodbatlas/version      [no test files]

Link to any related issue(s):
#512

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the Terraform contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

LGTM! still needs APIx and DOU review

mongodbatlas/config.go Outdated Show resolved Hide resolved
mongodbatlas/config.go Outdated Show resolved Hide resolved
mongodbatlas/config.go Outdated Show resolved Hide resolved
mongodbatlas/config.go Show resolved Hide resolved
Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@thetonymaster thetonymaster left a comment

Choose a reason for hiding this comment

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

LGTM

@coderGo93 coderGo93 added the run-testacc To run acceptance tests label Aug 19, 2021
@coderGo93 coderGo93 merged commit 870d61e into master Aug 20, 2021
@coderGo93 coderGo93 deleted the INTMDB-242 branch August 20, 2021 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-testacc To run acceptance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants