diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-11-08 18:24:31 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-11-20 13:07:13 +0300 |
commit | a874e075ed161671d4eb91a57e0dd4d9b2e4a610 (patch) | |
tree | ed5bf9af1edbdf47d954ba27c0c9ef15f2720483 /internal/praefect/replicator_test.go | |
parent | 9191f8f0f17d3b7a958424f91527aa8d8b4c3fcb (diff) |
Unbound initialization and validation funcs from global Config
In order to remove dependency on the global config.Config var we
need to break dependencies between Config and it's initialization
and validation functions. Most of them now represented as a methods
on the config.Cfg type. It allows us to setup required Cfg struct
for the tests to run without need to sync changes done on the
shared global Config var. The tests that were heavily dependent
on the Config var now depend on the struct initialized inside
the test instead.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2699
Blocks: https://gitlab.com/gitlab-org/gitaly/-/issues/3166
Diffstat (limited to 'internal/praefect/replicator_test.go')
-rw-r--r-- | internal/praefect/replicator_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go index 2629cad84..d51d98202 100644 --- a/internal/praefect/replicator_test.go +++ b/internal/praefect/replicator_test.go @@ -979,7 +979,7 @@ func runFullGitalyServer(t *testing.T) (string, func()) { t.Fatal(err) } //listen on internal socket - internalListener, err := net.Listen("unix", gitaly_config.GitalyInternalSocketPath()) + internalListener, err := net.Listen("unix", gitaly_config.Config.GitalyInternalSocketPath()) require.NoError(t, err) go server.Serve(listener) @@ -995,7 +995,7 @@ func runFullGitalyServer(t *testing.T) (string, func()) { // are the only ones needed for replication func newReplicationService(tb testing.TB) (*grpc.Server, string) { socketName := testhelper.GetTemporaryGitalySocketFileName() - internalSocketName := gitaly_config.GitalyInternalSocketPath() + internalSocketName := gitaly_config.Config.GitalyInternalSocketPath() require.NoError(tb, os.RemoveAll(internalSocketName)) svr := testhelper.NewTestGrpcServer(tb, nil, nil) |