Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
0
Merge Requests
0
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
Rafael Monnerat
slapos.toolbox
Commits
40244ea6
Commit
40244ea6
authored
Oct 25, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: test on update Account now checks .htpasswd
parent
f1249e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
slapos/runner/runnertest.py
slapos/runner/runnertest.py
+8
-7
No files found.
slapos/runner/runnertest.py
View file @
40244ea6
...
...
@@ -17,6 +17,7 @@ from slapos.runner.utils import (getProfilePath, getSession, isInstanceRunning,
from
slapos.runner.process
import
killRunningProcess
,
isRunning
from
slapos.runner
import
views
import
slapos.slap
from
slapos.htpasswd
import
HtpasswdFile
#Helpers
...
...
@@ -210,15 +211,15 @@ class SlaprunnerTestCase(unittest.TestCase):
def
test_updateAccount
(
self
):
"""test Update accound, this needs the user to log in"""
self
.
setAccount
()
htpasswd
=
os
.
path
.
join
(
self
.
app
.
config
[
'etc_dir'
],
'.htpasswd'
)
import
pdb
;
pdb
.
set_trace
()
assert
self
.
users
[
0
]
in
open
(
htpasswd
).
read
()
response
=
loadJson
(
self
.
updateAccount
(
self
.
updateUser
,
self
.
rcode
))
self
.
assertEqual
(
response
[
'code'
],
1
)
#result = self.logout()
#assert "<h2>Login to Slapos Web Runner</h2>" in result.data
#retry login with new values
#response = loadJson(self.login(self.updateUser[0], self.updateUser[1]))
#self.assertEqual(response['result'], "")
#log out now!
#self.logout()
import
pdb
;
pdb
.
set_trace
()
encode
=
HtpasswdFile
(
htpasswd
,
False
)
encode
.
update
(
self
.
updateUser
[
0
],
self
.
updateUser
[
1
])
assert
self
.
updateUser
[
0
]
in
open
(
htpasswd
).
read
()
def
test_startProxy
(
self
):
"""Test slapproxy"""
...
...
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