-
Notifications
You must be signed in to change notification settings - Fork 396
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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 { |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can provide own options
Changes
Tests
make test
run locallydocs/
folderinternal/acceptance