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

Test Case Provider Switch #4135

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

edwardfeng-db
Copy link
Contributor

Changes

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@edwardfeng-db edwardfeng-db requested review from a team as code owners October 22, 2024 05:47
@edwardfeng-db edwardfeng-db requested review from hectorcast-db and removed request for a team October 22, 2024 05:47
@@ -127,23 +135,23 @@ func getDataSourceName(dataSourceFunc func() datasource.DataSource) string {
}

// GetSdkV2ResourcesToRemove is a helper function to get the list of resources that are migrated away from sdkv2 to plugin framework
func GetSdkV2ResourcesToRemove() []string {
func GetSdkV2ResourcesToRemove(ctx context.Context) []string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use the context passed through for getting the names

useSdkV2 := os.Getenv("USE_SDK_V2_RESOURCES")
if useSdkV2 == "" {
return []string{}
useSdkV2Ctx := ctx.Value("USE_SDK_V2_RESOURCES")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

key should be a separate type

@@ -60,15 +60,15 @@ func GetProviderServer(ctx context.Context, options ...ServerOption) (tfprotov6.
}
sdkPluginProvider := serverOptions.sdkV2Provider
if sdkPluginProvider == nil {
sdkPluginProvider = sdkv2.DatabricksProvider()
sdkPluginProvider = sdkv2.DatabricksProvider(ctx)
}
pluginFrameworkProvider := serverOptions.pluginFrameworkProvider
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can provide own options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant