Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
dc5330c5
Commit
dc5330c5
authored
Nov 11, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/dufs: fix misconfiguration preventing uploading in /pub
This have been a regression when upgrading to v0.40.0
parent
9e1071da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
software/dufs/buildout.hash.cfg
software/dufs/buildout.hash.cfg
+1
-1
software/dufs/instance.cfg.in
software/dufs/instance.cfg.in
+1
-1
software/dufs/test/test.py
software/dufs/test/test.py
+14
-12
No files found.
software/dufs/buildout.hash.cfg
View file @
dc5330c5
...
...
@@ -15,4 +15,4 @@
[instance.cfg.in]
filename = instance.cfg.in
md5sum =
c1c5db680dee5cfe5334cedae4b7fc51
md5sum =
765bb15f322f5566a66d15baa8c68f9a
software/dufs/instance.cfg.in
View file @
dc5330c5
...
...
@@ -159,7 +159,7 @@ command-line =
--render-try-index
--allow-all
--auth-method basic
--auth ${admin-password:user}:${admin-password:passwd-sha512-crypt}@/:rw
--auth ${admin-password:user}:${admin-password:passwd-sha512-crypt}@/:rw
,/pub:rw
--auth @/pub
--tls-cert ${dufs-certificate:cert-file}
--tls-key ${dufs-certificate:key-file}
...
...
software/dufs/test/test.py
View file @
dc5330c5
...
...
@@ -139,19 +139,21 @@ class TestFileServer(SlapOSInstanceTestCase):
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
def
test_upload_file
(
self
):
resp
=
requests
.
put
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
data
=
io
.
BytesIO
(
b'hello'
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
created
)
for
path
in
'hello.txt'
,
'pub/hello.txt'
,
'create/intermediate/paths'
:
with
self
.
subTest
(
path
):
resp
=
requests
.
put
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
path
),
data
=
io
.
BytesIO
(
b'hello'
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
created
)
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
text
,
'hello'
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
path
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
text
,
'hello'
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
def
test_renew_certificate
(
self
):
def
_getpeercert
():
...
...
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