-
Notifications
You must be signed in to change notification settings - Fork 148
Node: Add CI support for server modules #2472
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
82bbe94
Node: add server modules CI support
tjzhang-BQ aa82897
adding changelog, update indent, addressing comments
tjzhang-BQ 4cdf0cc
address comments
tjzhang-BQ 9f23326
enable cluster mode
tjzhang-BQ 5dfd4ae
linting test file
tjzhang-BQ ffa46f7
testing tls flag
tjzhang-BQ 89378b1
testing useTLS override
tjzhang-BQ a76a4cf
update cluster shard count
tjzhang-BQ 4e27882
test creating cluster directly
tjzhang-BQ b0f9cc6
test creating cluster with --cluster_mode off
tjzhang-BQ e0b361b
try parsing tls flag
Yury-Fridlyand 3e2126a
try to fix CI
Yury-Fridlyand fbceed7
try to fix CI
Yury-Fridlyand 80ad0ab
try to fix CI
Yury-Fridlyand 6c4fb2a
update node in ci
Yury-Fridlyand af75a94
fix parsing tls
Yury-Fridlyand 21a512a
uncommenting AWS ACTIONS & updating test case
cyip10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /** | ||
| * Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 | ||
| */ | ||
| import { | ||
| afterAll, | ||
| afterEach, | ||
| beforeAll, | ||
| describe, | ||
| expect, | ||
| it, | ||
| } from "@jest/globals"; | ||
| import { GlideClusterClient, InfoOptions, ProtocolVersion } from ".."; | ||
| import { ValkeyCluster } from "../../utils/TestUtils"; | ||
| import { | ||
| flushAndCloseClient, | ||
| getClientConfigurationOption, | ||
| getServerVersion, | ||
| parseCommandLineArgs, | ||
| parseEndpoints, | ||
| } from "./TestUtilities"; | ||
|
|
||
| const TIMEOUT = 50000; | ||
| describe("GlideJson", () => { | ||
| const testsFailed = 0; | ||
| let cluster: ValkeyCluster; | ||
| let client: GlideClusterClient; | ||
| beforeAll(async () => { | ||
| const clusterAddresses = parseCommandLineArgs()["cluster-endpoints"]; | ||
| cluster = await ValkeyCluster.initFromExistingCluster( | ||
| true, | ||
| parseEndpoints(clusterAddresses), | ||
| getServerVersion, | ||
| ); | ||
| }, 20000); | ||
|
|
||
| afterEach(async () => { | ||
| await flushAndCloseClient(true, cluster.getAddresses(), client); | ||
| }); | ||
|
|
||
| afterAll(async () => { | ||
| if (testsFailed === 0) { | ||
| await cluster.close(); | ||
| } | ||
| }, TIMEOUT); | ||
|
|
||
| it.each([ProtocolVersion.RESP2, ProtocolVersion.RESP3])( | ||
| "ServerModules check modules loaded", | ||
| async (protocol) => { | ||
| client = await GlideClusterClient.createClient( | ||
| getClientConfigurationOption(cluster.getAddresses(), protocol, { | ||
| useTLS: true, | ||
tjzhang-BQ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }), | ||
| ); | ||
| const info = await client.info({ | ||
| sections: [InfoOptions.Modules], | ||
| route: "randomNode", | ||
| }); | ||
| expect(info).toContain("Modules"); | ||
| //expect(info).toContain("# search_index_stats"); | ||
tjzhang-BQ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| ); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -387,6 +387,7 @@ export const getClientConfigurationOption = ( | |
| port, | ||
| })), | ||
| protocol, | ||
| useTLS: parseCommandLineArgs()["tls"] == "true", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok - this will work - not sure why we don't check addresses here too, rather than getting command-line parameters in each test separately. Will clean this up in a follow-up PR |
||
| ...configOverrides, | ||
| }; | ||
| }; | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.