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

Commitec3bac6

Browse files
committed
Appeasing the linter
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent7e404b0 commitec3bac6

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

‎coderd/database/dbauthz/dbauthz_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
25672567
ID:uuid.New(),
25682568
Health:database.WorkspaceAppHealthDisabled,
25692569
SharingLevel:database.AppSharingLevelOwner,
2570+
CORSBehavior:database.AppCorsBehaviorSimple,
25702571
}).Asserts(rbac.ResourceSystem,policy.ActionCreate)
25712572
}))
25722573
s.Run("InsertWorkspaceResourceMetadata",s.Subtest(func(db database.Store,check*expects) {

‎coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ func WorkspaceApp(t testing.TB, db database.Store, orig database.WorkspaceApp) d
618618
Health:takeFirst(orig.Health,database.WorkspaceAppHealthHealthy),
619619
DisplayOrder:takeFirst(orig.DisplayOrder,1),
620620
Hidden:orig.Hidden,
621+
CORSBehavior:takeFirst(orig.CORSBehavior,database.AppCorsBehaviorSimple),
621622
})
622623
require.NoError(t,err,"insert app")
623624
returnresource

‎coderd/database/dbmem/dbmem.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8154,6 +8154,10 @@ func (q *FakeQuerier) InsertWorkspaceApp(_ context.Context, arg database.InsertW
81548154
arg.SharingLevel=database.AppSharingLevelOwner
81558155
}
81568156

8157+
ifarg.CORSBehavior=="" {
8158+
arg.CORSBehavior=database.AppCorsBehaviorSimple
8159+
}
8160+
81578161
// nolint:gosimple
81588162
workspaceApp:= database.WorkspaceApp{
81598163
ID:arg.ID,

‎coderd/workspaceapps/apptest/setup.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ import (
3232
)
3333

3434
const (
35-
proxyTestAgentName="agent-name"
36-
proxyTestAppNameFake="test-app-fake"
37-
proxyTestAppNameOwner="test-app-owner"
38-
proxyTestAppNameAuthenticated="test-app-authenticated"
39-
proxyTestAppNamePublic="test-app-public"
35+
proxyTestAgentName="agent-name"
36+
proxyTestAppNameFake="test-app-fake"
37+
proxyTestAppNameOwner="test-app-owner"
38+
proxyTestAppNameAuthenticated="test-app-authenticated"
39+
proxyTestAppNamePublic="test-app-public"
40+
// nolint:gosec // Not a secret
4041
proxyTestAppNameAuthenticatedCORSPassthru="test-app-authenticated-cors-passthru"
4142
proxyTestAppNamePublicCORSPassthru="test-app-public-cors-passthru"
4243
proxyTestAppNameAuthenticatedCORSDefault="test-app-authenticated-cors-default"

‎coderd/workspaceapps/db_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,12 @@ func Test_ResolveRequest(t *testing.T) {
280280
RegisteredClaims: jwtutils.RegisteredClaims{
281281
Expiry:jwt.NewNumericDate(token.Expiry.Time()),
282282
},
283-
Request:req,
284-
UserID:me.ID,
285-
WorkspaceID:workspace.ID,
286-
AgentID:agentID,
287-
AppURL:appURL,
283+
Request:req,
284+
UserID:me.ID,
285+
WorkspaceID:workspace.ID,
286+
AgentID:agentID,
287+
AppURL:appURL,
288+
CORSBehavior:token.CORSBehavior,
288289
},token)
289290
require.NotZero(t,token.Expiry)
290291
require.WithinDuration(t,time.Now().Add(workspaceapps.DefaultTokenExpiry),token.Expiry.Time(),time.Minute)

‎provisioner/terraform/resources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
439439
corsBehavior=proto.AppCORSBehavior_PASSTHRU
440440
default:
441441
corsBehavior=proto.AppCORSBehavior_SIMPLE
442-
logger.Debug(ctx,"CORS behaviornot set, defaulting to 'simple'")
442+
logger.Debug(ctx,"cors_behaviornot set, defaulting to 'simple'",slog.F("address",convertAddressToLabel(resource.Address)))
443443
}
444444

445445
for_,agents:=rangeresourceAgents {

‎provisionersdk/proto/provisioner.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎provisionersdk/proto/provisioner_drpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp