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
4cb92622
Commit
4cb92622
authored
Jan 11, 2024
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests
parent
6dcb097b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
main_test.go
main_test.go
+1
-2
No files found.
main_test.go
View file @
4cb92622
...
@@ -776,7 +776,7 @@ func TestBlobDownload(t *testing.T) {
...
@@ -776,7 +776,7 @@ func TestBlobDownload(t *testing.T) {
func
TestDeniedBlobDownload
(
t
*
testing
.
T
)
{
func
TestDeniedBlobDownload
(
t
*
testing
.
T
)
{
// Prepare test server and "all-deny" auth backend
// Prepare test server and "all-deny" auth backend
ts
:=
testAuthServer
(
nil
,
403
,
"Access denied"
)
ts
:=
testAuthServer
(
nil
,
nil
,
403
,
"Access denied"
)
defer
ts
.
Close
()
defer
ts
.
Close
()
ws
:=
startWorkhorseServer
(
ts
.
URL
)
ws
:=
startWorkhorseServer
(
ts
.
URL
)
defer
ws
.
Close
()
defer
ws
.
Close
()
...
@@ -792,7 +792,6 @@ func TestPrivateBlobDownload(t *testing.T) {
...
@@ -792,7 +792,6 @@ func TestPrivateBlobDownload(t *testing.T) {
// Prepare test server and auth backend:
// Prepare test server and auth backend:
// access is ok if token is provided either via query or via header
// access is ok if token is provided either via query or via header
ts
:=
testhelper
.
TestServerWithHandler
(
nil
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
ts
:=
testhelper
.
TestServerWithHandler
(
nil
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
log
.
Println
(
"UPSTREAM"
,
r
.
Method
,
r
.
URL
)
gitfetch
:=
(
strings
.
HasSuffix
(
r
.
URL
.
Path
,
"/info/refs"
)
&&
r
.
URL
.
RawQuery
==
"service=git-upload-pack"
)
gitfetch
:=
(
strings
.
HasSuffix
(
r
.
URL
.
Path
,
"/info/refs"
)
&&
r
.
URL
.
RawQuery
==
"service=git-upload-pack"
)
token1
:=
r
.
URL
.
Query
()
.
Get
(
"aaa_token"
)
token1
:=
r
.
URL
.
Query
()
.
Get
(
"aaa_token"
)
token2
:=
r
.
Header
.
Get
(
"BBB-TOKEN"
)
token2
:=
r
.
Header
.
Get
(
"BBB-TOKEN"
)
...
...
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