Skip to content
TypeScript

test(server): remove Azure permissions constant snapshot (#9973)

Julius Marminge32142cff186c
diff --git a/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.test.ts b/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.test.ts
deleted file mode 100644
index 51d8f74bbc4..00000000000
--- a/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { describe, expect, it } from "vite-plus/test";
-
-import { AZURE_DEVOPS_VIEWER_PERMISSIONS } from "./AzureDevOpsPullRequestProvider.ts";
-
-describe("azure devops viewer permissions", () => {
- it("offers every action to whoever is signed in, because Azure names no permission", () => {
- // The same answer for a viewer who can write, one who can only read, and an author with read
- // access: `az repos pr show` and `az repos pr list` carry nothing about the caller's standing,
- // and an unknown permission is granted rather than guessed away. Azure refuses the ones it
- // will not allow, at the moment they are taken, in words this could not have written.
- expect(AZURE_DEVOPS_VIEWER_PERMISSIONS).toEqual({
- actions: [
- "merge",
- "ready",
- "draft",
- "close",
- "reopen",
- "enable-auto-merge",
- "disable-auto-merge",
- ],
- // False because the host itself cannot post one, not because this viewer may not.
- comment: false,
- resolve: false,
- verdicts: [],
- // True because `az repos pr reviewer` does take one, and Azure says nothing about who may.
- requestReviewers: true,
- });
- });
-});
diff --git a/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.ts b/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.ts
index 8461e57d568..3d501a32d61 100644
--- a/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.ts
+++ b/apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.ts
@@ -56,7 +56,7 @@ const CAPABILITIES: PullRequestCapabilities = {
* they try. That is the safer half of an unknown: hiding a control from someone entitled to it
* leaves them no way through and no reason given.
*/
-export const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
+const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
actions: CAPABILITIES.actions,
comment: CAPABILITIES.comment,
resolve: CAPABILITIES.review.resolve,