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
bc4d61e2
Commit
bc4d61e2
authored
Nov 21, 2022
by
Jérome Perrin
Committed by
Alain Takoudjou
Jan 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests to not depend on removed archived support
parent
e90a9588
Changes
1
Hide 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 @
bc4d61e2
...
...
@@ -581,10 +581,15 @@ func testAuthServer(url *regexp.Regexp, params url.Values, code int, body interf
}
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
),
}
}
...
...
@@ -743,7 +748,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
()
...
...
@@ -813,8 +818,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