Initial commit: NetMesh smart ops platform with 3D topology, inspection reports, RCA and AI ops assistant
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
This commit is contained in:
48
electron/bridges/sshAuthHelper.userConfiguredKey.test.cjs
Normal file
48
electron/bridges/sshAuthHelper.userConfiguredKey.test.cjs
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
const test = require("node:test");
|
||||
const assert = require("node:assert/strict");
|
||||
|
||||
const { hasUserConfiguredKey } = require("./sshAuthHelper.cjs");
|
||||
|
||||
test("hasUserConfiguredKey is true for inline private key material", () => {
|
||||
assert.equal(hasUserConfiguredKey({ privateKey: "-----BEGIN OPENSSH PRIVATE KEY-----" }), true);
|
||||
});
|
||||
|
||||
test("hasUserConfiguredKey is false for empty or whitespace inline keys", () => {
|
||||
assert.equal(hasUserConfiguredKey({ privateKey: "" }), false);
|
||||
assert.equal(hasUserConfiguredKey({ privateKey: " " }), false);
|
||||
assert.equal(hasUserConfiguredKey({}), false);
|
||||
});
|
||||
|
||||
test("hasUserConfiguredKey is true for Keychain reference identity file paths", () => {
|
||||
assert.equal(
|
||||
hasUserConfiguredKey({ identityFilePaths: ["/Users/alice/.ssh/id_ed25519"] }),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test("hasUserConfiguredKey is false for empty identity file path lists", () => {
|
||||
assert.equal(hasUserConfiguredKey({ identityFilePaths: [] }), false);
|
||||
assert.equal(hasUserConfiguredKey({ identityFilePaths: null }), false);
|
||||
});
|
||||
|
||||
test("hasUserConfiguredKey prefers explicit inline key over empty paths", () => {
|
||||
assert.equal(
|
||||
hasUserConfiguredKey({
|
||||
privateKey: "-----BEGIN OPENSSH PRIVATE KEY-----",
|
||||
identityFilePaths: [],
|
||||
}),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test("isPasswordProvided accepts whitespace-only passwords (#2036)", () => {
|
||||
const { isPasswordProvided } = require("./sshAuthHelper.cjs");
|
||||
assert.equal(isPasswordProvided(""), false);
|
||||
assert.equal(isPasswordProvided(" "), true);
|
||||
assert.equal(isPasswordProvided(" "), true);
|
||||
assert.equal(isPasswordProvided("secret"), true);
|
||||
assert.equal(isPasswordProvided(null), false);
|
||||
assert.equal(isPasswordProvided(undefined), false);
|
||||
});
|
||||
Reference in New Issue
Block a user