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

Feature: Add new package providermeta #506

Merged

Conversation

MovieStoreGuy
Copy link
Collaborator

Context

Extends: #505

I wanted an easier way to provide the following:

  • Keep the existing behaviour for configuring the provider
  • Make it easier to test
  • Make it easier to add unit tests with locally mocked endpoints and functionality.

The new package moves all the logic that currently exists in signalfx/provider.go into the new package which makes it possible use within unit tests without causing circular import issues.

Changes

  • Moved Provider configuration into its own type MetaProviderLookup
    • These functions are okay to fail since they were originally intended to inject the required provider information without hard coding these into the tests.
  • Added lookup functions for FileMetaLookup, UserMetaLookup, and NetrcMetaLookup to align with the existing configuration process.
  • Helper functions LoadClient and LoadApplicationURL to reduce repeated code across the different resources.

@MovieStoreGuy MovieStoreGuy force-pushed the msg/port-provider-meta branch 2 times, most recently from 43df2f6 to 832066c Compare October 4, 2024 08:31
@atoulme
Copy link
Contributor

atoulme commented Oct 4, 2024

Please resolve conflicts. never mind, I merged the conflicts.

@MovieStoreGuy MovieStoreGuy merged commit 5daafaa into splunk-terraform:main Oct 7, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2024
@MovieStoreGuy MovieStoreGuy deleted the msg/port-provider-meta branch October 14, 2024 23:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants