Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ec4646

Browse files
test: add tests for 'hidden' field
1 parent45fe802 commit2ec4646

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎coderd/agentapi/manifest_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ func TestGetManifest(t *testing.T) {
8787
Subdomain:false,
8888
SharingLevel:database.AppSharingLevelPublic,
8989
Health:database.WorkspaceAppHealthDisabled,
90+
Hidden:false,
9091
},
9192
{
9293
ID:uuid.New(),
@@ -102,6 +103,7 @@ func TestGetManifest(t *testing.T) {
102103
HealthcheckUrl:"http://localhost:4321/health",
103104
HealthcheckInterval:20,
104105
HealthcheckThreshold:5,
106+
Hidden:true,
105107
},
106108
}
107109
scripts= []database.WorkspaceAgentScript{
@@ -182,6 +184,7 @@ func TestGetManifest(t *testing.T) {
182184
Threshold:apps[0].HealthcheckThreshold,
183185
},
184186
Health:agentproto.WorkspaceApp_HEALTHY,
187+
Hidden:false,
185188
},
186189
{
187190
Id:apps[1].ID[:],
@@ -200,6 +203,7 @@ func TestGetManifest(t *testing.T) {
200203
Threshold:0,
201204
},
202205
Health:agentproto.WorkspaceApp_DISABLED,
206+
Hidden:false,
203207
},
204208
{
205209
Id:apps[2].ID[:],
@@ -218,6 +222,7 @@ func TestGetManifest(t *testing.T) {
218222
Threshold:apps[2].HealthcheckThreshold,
219223
},
220224
Health:agentproto.WorkspaceApp_UNHEALTHY,
225+
Hidden:true,
221226
},
222227
}
223228
protoScripts= []*agentproto.WorkspaceAgentScript{

‎codersdk/agentsdk/convert_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func TestManifest(t *testing.T) {
4444
Threshold:55555666,
4545
},
4646
Health:codersdk.WorkspaceAppHealthHealthy,
47+
Hidden:false,
4748
},
4849
{
4950
ID:uuid.New(),
@@ -62,6 +63,7 @@ func TestManifest(t *testing.T) {
6263
Threshold:22555666,
6364
},
6465
Health:codersdk.WorkspaceAppHealthInitializing,
66+
Hidden:true,
6567
},
6668
},
6769
DERPMap:&tailcfg.DERPMap{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp