mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 03:28:29 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -254,7 +254,7 @@ describe("callGateway error details", () => {
|
||||
});
|
||||
|
||||
describe("callGateway password resolution", () => {
|
||||
const originalEnvPassword = process.env.CLAWDBOT_GATEWAY_PASSWORD;
|
||||
const originalEnvPassword = process.env.OPENCLAW_GATEWAY_PASSWORD;
|
||||
|
||||
beforeEach(() => {
|
||||
loadConfig.mockReset();
|
||||
@@ -264,16 +264,16 @@ describe("callGateway password resolution", () => {
|
||||
startMode = "hello";
|
||||
closeCode = 1006;
|
||||
closeReason = "";
|
||||
delete process.env.CLAWDBOT_GATEWAY_PASSWORD;
|
||||
delete process.env.OPENCLAW_GATEWAY_PASSWORD;
|
||||
resolveGatewayPort.mockReturnValue(18789);
|
||||
pickPrimaryTailnetIPv4.mockReturnValue(undefined);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
if (originalEnvPassword == null) {
|
||||
delete process.env.CLAWDBOT_GATEWAY_PASSWORD;
|
||||
delete process.env.OPENCLAW_GATEWAY_PASSWORD;
|
||||
} else {
|
||||
process.env.CLAWDBOT_GATEWAY_PASSWORD = originalEnvPassword;
|
||||
process.env.OPENCLAW_GATEWAY_PASSWORD = originalEnvPassword;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -292,7 +292,7 @@ describe("callGateway password resolution", () => {
|
||||
});
|
||||
|
||||
it("prefers env password over local config password", async () => {
|
||||
process.env.CLAWDBOT_GATEWAY_PASSWORD = "from-env";
|
||||
process.env.OPENCLAW_GATEWAY_PASSWORD = "from-env";
|
||||
loadConfig.mockReturnValue({
|
||||
gateway: {
|
||||
mode: "local",
|
||||
@@ -321,7 +321,7 @@ describe("callGateway password resolution", () => {
|
||||
});
|
||||
|
||||
it("prefers env password over remote password in remote mode", async () => {
|
||||
process.env.CLAWDBOT_GATEWAY_PASSWORD = "from-env";
|
||||
process.env.OPENCLAW_GATEWAY_PASSWORD = "from-env";
|
||||
loadConfig.mockReturnValue({
|
||||
gateway: {
|
||||
mode: "remote",
|
||||
@@ -337,7 +337,7 @@ describe("callGateway password resolution", () => {
|
||||
});
|
||||
|
||||
describe("callGateway token resolution", () => {
|
||||
const originalEnvToken = process.env.CLAWDBOT_GATEWAY_TOKEN;
|
||||
const originalEnvToken = process.env.OPENCLAW_GATEWAY_TOKEN;
|
||||
|
||||
beforeEach(() => {
|
||||
loadConfig.mockReset();
|
||||
@@ -347,21 +347,21 @@ describe("callGateway token resolution", () => {
|
||||
startMode = "hello";
|
||||
closeCode = 1006;
|
||||
closeReason = "";
|
||||
delete process.env.CLAWDBOT_GATEWAY_TOKEN;
|
||||
delete process.env.OPENCLAW_GATEWAY_TOKEN;
|
||||
resolveGatewayPort.mockReturnValue(18789);
|
||||
pickPrimaryTailnetIPv4.mockReturnValue(undefined);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
if (originalEnvToken == null) {
|
||||
delete process.env.CLAWDBOT_GATEWAY_TOKEN;
|
||||
delete process.env.OPENCLAW_GATEWAY_TOKEN;
|
||||
} else {
|
||||
process.env.CLAWDBOT_GATEWAY_TOKEN = originalEnvToken;
|
||||
process.env.OPENCLAW_GATEWAY_TOKEN = originalEnvToken;
|
||||
}
|
||||
});
|
||||
|
||||
it("uses remote token when remote mode uses url override", async () => {
|
||||
process.env.CLAWDBOT_GATEWAY_TOKEN = "env-token";
|
||||
process.env.OPENCLAW_GATEWAY_TOKEN = "env-token";
|
||||
loadConfig.mockReturnValue({
|
||||
gateway: {
|
||||
mode: "remote",
|
||||
|
||||
Reference in New Issue
Block a user