Skip to content

Commit

Permalink
fix: build test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
honeyn303 committed Jun 3, 2024
1 parent 0dfce94 commit 08b4deb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Configure an offline yarn mirror in the data folder
yarn-offline-mirror ".yarn-local-mirror"
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

# Always look into the cache first before fetching online
--install.prefer-offline true

# Disable interactive and progress logs as yarn install is now
# managed by Bazel and we are piping the logs from the underlying
# process running bazel into the parent one running kbn
--install.non-interactive true
--install.no-progress true
"--install.no-progress" true
"--install.non-interactive" true
"--install.prefer-offline" true
yarn-offline-mirror ".yarn-local-mirror"
yarn-path ".yarn/releases/yarn-1.22.19.cjs"
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Gemini Connector', () => {
test('config validation passes when only required fields are provided', () => {
const config: Config = {
apiUrl:
'https://us-central1-aiplatform.googleapis.com/v1/projects/${this.gcpProjectID}/locations/${this.gcpRegion}/publishers/google/models/${currentModel}:generateContent',
`https://us-central1-aiplatform.googleapis.com/v1/projects/test-gcpProject/locations/us-central-1/publishers/google/models/${DEFAULT_GEMINI_MODEL}:generateContent`,
defaultModel: DEFAULT_GEMINI_MODEL,
gcpRegion: 'us-central-1',
gcpProjectID: 'test-gcpProject',
Expand All @@ -61,7 +61,7 @@ describe('Gemini Connector', () => {
expect(() => {
configValidator(config, { configurationUtilities });
}).toThrowErrorMatchingInlineSnapshot(
'"Error configuring Google Gemini action: Error: URL Error: Invalid URL: example.com/do-something"'
`"Error configuring Google Gemini action: Error: URL Error: Invalid URL: example.com/do-something"`
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const configValidator = (configObject: Config, validatorServices: Validat
i18n.translate('xpack.stackConnectors.gemini.configurationErrorApiProvider', {
defaultMessage: 'Error configuring Google Gemini action: {err}',
values: {
err,
err: err.toString(),
},
})
);
Expand Down

0 comments on commit 08b4deb

Please sign in to comment.