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

Fix Test connection for data source #5958

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/plugins/data_source/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export class DataSourcePlugin implements Plugin<DataSourcePluginSetup, DataSourc
router,
dataSourceService,
cryptographyServiceSetup,
authRegistryPromise
authRegistryPromise,
customApiSchemaRegistryPromise
);

const registerCredentialProvider = (method: AuthenticationMethod) => {
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/data_source/server/routes/test_connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import { DataSourceConnectionValidator } from './data_source_connection_validato
import { DataSourceServiceSetup } from '../data_source_service';
import { CryptographyServiceSetup } from '../cryptography_service';
import { IAuthenticationMethodRegistery } from '../auth_registry';
import { CustomApiSchemaRegistry } from '../schema_registry';

export const registerTestConnectionRoute = async (
router: IRouter,
dataSourceServiceSetup: DataSourceServiceSetup,
cryptography: CryptographyServiceSetup,
authRegistryPromise: Promise<IAuthenticationMethodRegistery>
authRegistryPromise: Promise<IAuthenticationMethodRegistery>,
customApiSchemaRegistryPromise: Promise<CustomApiSchemaRegistry>
) => {
const authRegistry = await authRegistryPromise;
router.post(
Expand Down Expand Up @@ -66,6 +68,7 @@ export const registerTestConnectionRoute = async (
cryptography,
dataSourceId,
testClientDataSourceAttr: dataSourceAttr as DataSourceAttributes,
customApiSchemaRegistryPromise,
request,
authRegistry,
}
Expand Down
Loading