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

🎉 🪟 [Connector Builder] Resolve manifest before converting to builder form values #21898

Merged
merged 4 commits into from
Jan 27, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
lmossman committed Jan 27, 2023
commit d579c3447d6cde7bc7ac3362387baaf7f56cb521
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ describe("Conversion throws error when", () => {
await expect(convert).rejects.toThrow("api_token value must be of the form {{ config[");
});

it("manifest has an OAuthAuthenticator with a refresh_request_body containing non-string values", () => {
it("manifest has an OAuthAuthenticator with a refresh_request_body containing non-string values", async () => {
const convert = () => {
const manifest: ConnectorManifest = {
...baseManifest,
@@ -155,9 +155,9 @@ describe("Conversion throws error when", () => {
}),
],
};
convertToBuilderFormValues(manifest, DEFAULT_BUILDER_FORM_VALUES);
return convertToBuilderFormValues(noOpResolve, manifest, DEFAULT_BUILDER_FORM_VALUES);
};
expect(convert).toThrow("OAuthAuthenticator contains a refresh_request_body with non-string values");
await expect(convert).rejects.toThrow("OAuthAuthenticator contains a refresh_request_body with non-string values");
});
});

@@ -418,7 +418,7 @@ describe("Conversion successfully results in", () => {
});
});

it("OAuth authenticator refresh_request_body converted to array", () => {
it("OAuth authenticator refresh_request_body converted to array", async () => {
const manifest: ConnectorManifest = {
...baseManifest,
streams: [
@@ -442,7 +442,7 @@ describe("Conversion successfully results in", () => {
}),
],
};
const formValues = convertToBuilderFormValues(manifest, DEFAULT_BUILDER_FORM_VALUES);
const formValues = await convertToBuilderFormValues(noOpResolve, manifest, DEFAULT_BUILDER_FORM_VALUES);
expect(formValues.global.authenticator).toEqual({
type: "OAuthAuthenticator",
client_id: "{{ config['client_id'] }}",