Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
d017682b
Commit
d017682b
authored
Nov 21, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests to not depend on removed archived support
parent
2ad58e73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
main_test.go
main_test.go
+8
-3
No files found.
main_test.go
View file @
d017682b
...
...
@@ -523,10 +523,15 @@ func testAuthServer(url *regexp.Regexp, code int, body interface{}) *httptest.Se
}
func
newUpstreamConfig
(
authBackend
string
)
*
config
.
Config
{
cwd
,
err
:=
os
.
Getwd
()
if
err
!=
nil
{
panic
(
err
)
}
return
&
config
.
Config
{
Version
:
"123"
,
DocumentRoot
:
testDocumentRoot
,
Backend
:
helper
.
URLMustParse
(
authBackend
),
RepoPath
:
path
.
Join
(
cwd
,
testRepoRoot
),
}
}
...
...
@@ -685,7 +690,7 @@ func (dl DownloadContext) ExpectHeader(path, header, value string) {
func
TestBlobDownload
(
t
*
testing
.
T
)
{
// Prepare test server and "all-ok" auth backend
ts
:=
archiveOKServer
(
t
,
""
)
ts
:=
testhelper
.
TestServerWithHandler
(
regexp
.
MustCompile
(
"."
),
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{}
)
defer
ts
.
Close
()
ws
:=
startWorkhorseServer
(
ts
.
URL
)
defer
ws
.
Close
()
...
...
@@ -755,8 +760,8 @@ func TestPrivateBlobDownload(t *testing.T) {
return
}
// for authorized .../repository/archive.zip reply
the same way archiveOKServer does.
aok
:=
archiveOKServer
(
t
,
""
)
// for authorized .../repository/archive.zip reply
with 200 OK
aok
:=
testhelper
.
TestServerWithHandler
(
regexp
.
MustCompile
(
"."
),
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{}
)
defer
aok
.
Close
()
aokurl
,
err
:=
url
.
Parse
(
aok
.
URL
)
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment