diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-06 23:53:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 23:53:55 +0800 |
commit | 2b3655fa118abaa33a0e064233fdc8c670487c62 (patch) | |
tree | c160e5aaa886e920f4cef8bd2bb29a002e6399fe /internal/conf/mocks.go | |
parent | ca2f7a7e1610fd8e99649dc1ed2058c2f362c57d (diff) |
lfs: add tests to batch endpoint (#6073)
Diffstat (limited to 'internal/conf/mocks.go')
-rw-r--r-- | internal/conf/mocks.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/conf/mocks.go b/internal/conf/mocks.go new file mode 100644 index 00000000..1f8e16f2 --- /dev/null +++ b/internal/conf/mocks.go @@ -0,0 +1,17 @@ +// Copyright 2020 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package conf + +import ( + "testing" +) + +func SetMockServer(t *testing.T, opts ServerOpts) { + before := Server + Server = opts + t.Cleanup(func() { + Server = before + }) +} |