Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2023-07-11 21:26:30 +0300
committerJohn Cai <jcai@gitlab.com>2023-07-13 23:27:04 +0300
commitc2e1af4cbead2d3c6fa14878860cfb8eaac9ae5a (patch)
tree4bab872ac31cea5ecf0fbe5454809ed2bf49d9b7 /internal/testhelper/testserver/gitaly.go
parent134d4077537e30d72a7b61805c99660eb66bef22 (diff)
operations: Pass in SigingKey
In order to make use of the SigningKey in the gitaly config, we need to pass it through to the operations service via service dependencies.
Diffstat (limited to 'internal/testhelper/testserver/gitaly.go')
-rw-r--r--internal/testhelper/testserver/gitaly.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/testhelper/testserver/gitaly.go b/internal/testhelper/testserver/gitaly.go
index 1b62c903f..a0c156e10 100644
--- a/internal/testhelper/testserver/gitaly.go
+++ b/internal/testhelper/testserver/gitaly.go
@@ -271,6 +271,7 @@ type gitalyServerDeps struct {
housekeepingManager housekeeping.Manager
backupSink backup.Sink
backupLocator backup.Locator
+ signingKey string
}
func (gsd *gitalyServerDeps) createDependencies(tb testing.TB, cfg config.Cfg) *service.Dependencies {
@@ -362,6 +363,10 @@ func (gsd *gitalyServerDeps) createDependencies(tb testing.TB, cfg config.Cfg) *
tb.Cleanup(partitionManager.Stop)
}
+ if gsd.signingKey != "" {
+ cfg.Git.SigningKey = gsd.signingKey
+ }
+
return &service.Dependencies{
Cfg: cfg,
ClientPool: gsd.conns,
@@ -494,3 +499,12 @@ func WithBackupLocator(backupLocator backup.Locator) GitalyServerOpt {
return deps
}
}
+
+// WithSigningKey sets the signing key path that will be used for Gitaly
+// services.
+func WithSigningKey(signingKey string) GitalyServerOpt {
+ return func(deps gitalyServerDeps) gitalyServerDeps {
+ deps.signingKey = signingKey
+ return deps
+ }
+}