Skip to content

Commit 445a4fb

Browse files
test(deploy): exercise SetGitHubApp setter (P4.2b coverage)
deploy.go:414 (SetGitHubApp) was uncovered — the sqlmock tests set the minter via a struct literal. Route through h.SetGitHubApp(minter) in the test helper so the setter is exercised.
1 parent f3dd069 commit 445a4fb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/handlers/deploy_git_installation_token_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ func runApply(t *testing.T, setup func(sqlmock.Sqlmock), minter installationToke
7474
if setup != nil {
7575
setup(mock)
7676
}
77-
h := &DeployHandler{db: db, githubApp: minter}
77+
h := &DeployHandler{db: db}
78+
if minter != nil {
79+
h.SetGitHubApp(minter) // exercise the setter (not a struct-literal field write)
80+
}
7881
d := &models.Deployment{ID: uuid.New(), TeamID: team, AppID: "gitdep"}
7982
h.applyInstallationAuth(context.Background(), opts, d)
8083
}

0 commit comments

Comments
 (0)