test(server): consolidate agent activity opt-in coverage (#9988)
This commit is contained in:
1 parent
9867eb1239
commit
94d1fa7ff2
4 files changed
+7
-21
No files matched your search
@@ -14,7 +14,6 @@ import * as BootService from "../cloud/bootService.ts";
|
||||
import {
|
||||
acquireRelayClientForLink,
|
||||
headlessSessionConfig,
|
||||
isPublishAgentActivityEnabledValue,
|
||||
reportCloudDisconnectResults,
|
||||
} from "./connect.ts";
|
||||
import { recoverServiceOnboardingOffer } from "./service.ts";
|
||||
@@ -190,10 +189,3 @@ it.effect("keeps disconnect causes in structured logs and out of console warning
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
it("treats only the literal 'true' as publish-enabled", () => {
|
||||
assert.equal(isPublishAgentActivityEnabledValue("true"), true);
|
||||
assert.equal(isPublishAgentActivityEnabledValue("false"), false);
|
||||
assert.equal(isPublishAgentActivityEnabledValue(null), false);
|
||||
assert.equal(isPublishAgentActivityEnabledValue("TRUE"), false);
|
||||
});
|
||||
@@ -144,10 +144,6 @@ function stringToBytes(value: string): Uint8Array {
|
||||
return new TextEncoder().encode(value);
|
||||
}
|
||||
|
||||
export function isPublishAgentActivityEnabledValue(value: string | null): boolean {
|
||||
return isAgentActivityPublishingEnabledValue(value);
|
||||
}
|
||||
|
||||
interface CloudCliStatus {
|
||||
readonly desired: boolean;
|
||||
readonly authenticated: boolean;
|
||||
@@ -573,7 +569,7 @@ const connectStatusCommand = Command.make("status", {
|
||||
linked: Option.isSome(cloudUserId),
|
||||
cloudUserId: Option.isSome(cloudUserId) ? bytesToString(cloudUserId.value) : null,
|
||||
relayUrl: Option.isSome(relayUrl) ? bytesToString(relayUrl.value) : null,
|
||||
publishAgentActivity: isPublishAgentActivityEnabledValue(
|
||||
publishAgentActivity: isAgentActivityPublishingEnabledValue(
|
||||
Option.isSome(publishAgentActivity) ? bytesToString(publishAgentActivity.value) : null,
|
||||
),
|
||||
relayClient: executable,
|
||||
|
||||
Reference in new issue
Block a user