54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
export const localSmokeFixtureProfileId = "redis-local-fixture";
|
|
export const localSmokeFixtureSearchText = "smoke:*";
|
|
|
|
export const localSmokeFixtureExpectedKeys = [
|
|
"smoke:string",
|
|
"smoke:string:ttl",
|
|
"smoke:hash",
|
|
"smoke:list",
|
|
"smoke:set",
|
|
"smoke:zset",
|
|
"smoke:stream",
|
|
] as const;
|
|
|
|
export const localSmokeFixtureCommandPresets = [
|
|
{
|
|
id: "ping",
|
|
label: "PING",
|
|
command: "PING",
|
|
summary: "Validate the desktop command bridge against the seeded fixture.",
|
|
},
|
|
{
|
|
id: "get-string",
|
|
label: "GET smoke:string",
|
|
command: "GET smoke:string",
|
|
summary: "Verify the string read path against the seeded smoke key.",
|
|
},
|
|
{
|
|
id: "ttl-string",
|
|
label: "TTL smoke:string:ttl",
|
|
command: "TTL smoke:string:ttl",
|
|
summary: "Verify the TTL path before using the inspector controls.",
|
|
},
|
|
] as const;
|
|
|
|
type LocalSmokeFixtureTarget = {
|
|
id: string;
|
|
target: {
|
|
host: string;
|
|
port: number;
|
|
database: number;
|
|
};
|
|
};
|
|
|
|
export function isLocalSmokeFixtureConnection(
|
|
connection: LocalSmokeFixtureTarget,
|
|
) {
|
|
return (
|
|
connection.id === localSmokeFixtureProfileId ||
|
|
(connection.target.host === "127.0.0.1" &&
|
|
connection.target.port === 6380 &&
|
|
connection.target.database === 0)
|
|
);
|
|
}
|