Skip to content

Commit ff613fd

Browse files
Emyrkjaaydenh
authored andcommitted
test: add unit test for workspace ban role
1 parent cccdf1e commit ff613fd

File tree

2 files changed

+191
-0
lines changed

2 files changed

+191
-0
lines changed

.cursorignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
2+
/offlinedocs

sample.json

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
{
3+
"name": "coder_image",
4+
"type": "string",
5+
"form_control": "radio",
6+
"display_name": "Coder Image",
7+
"description": "The Docker image used to run your workspace. Choose between nix and non-nix images.",
8+
"default": "codercom/oss-dogfood:latest",
9+
"icon": "",
10+
"options": [
11+
{
12+
"name": "Dogfood (Default)",
13+
"description": "",
14+
"value": "codercom/oss-dogfood:latest",
15+
"icon": "/icon/coder.svg"
16+
},
17+
{
18+
"name": "Dogfood Nix (Experimental)",
19+
"description": "",
20+
"value": "codercom/oss-dogfood-nix:latest",
21+
"icon": "/icon/nix.svg"
22+
}
23+
],
24+
"order": 1,
25+
"mutable": true,
26+
"diagnostics": [
27+
{
28+
"severity": "error|warning",
29+
"summary": "short version of the error",
30+
"detail": "detailed version of the error",
31+
"subject": {
32+
"filename": "docker-compose.yml",
33+
"start": 1,
34+
"end": 1
35+
},
36+
"context": {
37+
"filename": "docker-compose.yml",
38+
"start": 1,
39+
"end": 1
40+
},
41+
"expression": "",
42+
"extra": {}
43+
}
44+
],
45+
},
46+
{
47+
"name": "jetbrains_ide",
48+
"type": "string",
49+
"form_control": "dropdown",
50+
"display_name": "JetBrains IDE",
51+
"description": "",
52+
"default": "GO",
53+
"icon": "/icon/gateway.svg",
54+
"options": [
55+
{
56+
"name": "GoLand",
57+
"description": "",
58+
"value": "GO",
59+
"icon": "/icon/goland.svg"
60+
},
61+
{
62+
"name": "WebStorm",
63+
"description": "",
64+
"value": "WS",
65+
"icon": "/icon/webstorm.svg"
66+
}
67+
],
68+
"order": 2,
69+
"mutable": true,
70+
"diagnostics": [
71+
{
72+
"severity": "error|warning",
73+
"summary": "short version of the error",
74+
"detail": "detailed version of the error",
75+
"subject": {
76+
"filename": "docker-compose.yml",
77+
"start": 1,
78+
"end": 1
79+
},
80+
"context": {
81+
"filename": "docker-compose.yml",
82+
"start": 1,
83+
"end": 1
84+
},
85+
"expression": "",
86+
"extra": {}
87+
}
88+
],
89+
},
90+
{
91+
"name": "region",
92+
"type": "string",
93+
"form_control": "radio",
94+
"description": "",
95+
"default": "us-pittsburgh",
96+
"icon": "/emojis/1f30e.png",
97+
"required": true,
98+
"options": [
99+
{
100+
"name": "Pittsburgh",
101+
"description": "",
102+
"value": "us-pittsburgh",
103+
"icon": "/emojis/1f1fa-1f1f8.png"
104+
},
105+
{
106+
"name": "Helsinki",
107+
"description": "",
108+
"value": "eu-helsinki",
109+
"icon": "/emojis/1f1eb-1f1ee.png"
110+
},
111+
{
112+
"name": "Sydney",
113+
"description": "",
114+
"value": "ap-sydney",
115+
"icon": "/emojis/1f1e6-1f1fa.png"
116+
},
117+
{
118+
"name": "São Paulo",
119+
"description": "",
120+
"value": "sa-saopaulo",
121+
"icon": "/emojis/1f1e7-1f1f7.png"
122+
},
123+
{
124+
"name": "Cape Town",
125+
"description": "",
126+
"value": "za-cpt",
127+
"icon": "/emojis/1f1ff-1f1e6.png"
128+
}
129+
],
130+
"order": 3,
131+
"mutable": true,
132+
"diagnostics": [
133+
{
134+
"severity": "error|warning",
135+
"summary": "short version of the error",
136+
"detail": "detailed version of the error",
137+
"subject": {
138+
"filename": "docker-compose.yml",
139+
"start": 1,
140+
"end": 1
141+
},
142+
"context": {
143+
"filename": "docker-compose.yml",
144+
"start": 1,
145+
"end": 1
146+
},
147+
"expression": "",
148+
"extra": {}
149+
}
150+
],
151+
},
152+
{
153+
"name": "memory_usage_threshold",
154+
"display_name": "Memory Usage Threshold",
155+
"type": "number",
156+
"form_control": "input",
157+
"description": "The memory usage threshold used in resources monitoring to trigger notifications.",
158+
"value": 80,
159+
"default": 80,
160+
"order": 3,
161+
"mutable": true,
162+
"diagnostics": [
163+
{
164+
"severity": "error|warning",
165+
"summary": "short version of the error",
166+
"detail": "detailed version of the error",
167+
"subject": {
168+
"filename": "docker-compose.yml",
169+
"start": 1,
170+
"end": 1
171+
},
172+
"context": {
173+
"filename": "docker-compose.yml",
174+
"start": 1,
175+
"end": 1
176+
},
177+
"expression": "",
178+
"extra": {}
179+
}
180+
],
181+
},
182+
"diagnostics": [
183+
{
184+
"severity": "error|warning",
185+
"summary": "short version of the error",
186+
"detail": "detailed version of the error"
187+
}
188+
]
189+
}

0 commit comments

Comments
 (0)