Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
59834a17
Commit
59834a17
authored
Jun 30, 2021
by
Lisa Casino
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos/collect: fix test
parent
3cea76c1
Pipeline
#16374
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
slapos/tests/test_collect.py
slapos/tests/test_collect.py
+8
-6
No files found.
slapos/tests/test_collect.py
View file @
59834a17
...
@@ -569,11 +569,12 @@ class TestCollectSnapshot(unittest.TestCase):
...
@@ -569,11 +569,12 @@ class TestCollectSnapshot(unittest.TestCase):
date
=
datetime
.
utcnow
().
date
()
date
=
datetime
.
utcnow
().
date
()
time
=
datetime
.
utcnow
().
time
().
strftime
(
"%H:%M:%S"
)
time
=
datetime
.
utcnow
().
time
().
strftime
(
"%H:%M:%S"
)
time_earlier
=
(
datetime
.
utcnow
()
-
\
datetime_earlier
=
datetime
.
utcnow
()
-
timedelta
(
hours
=
3
)
timedelta
(
hours
=
3
)).
time
().
strftime
(
"%H:%M:%S"
)
date_earlier
=
datetime_earlier
.
date
()
time_earlier
=
datetime_earlier
.
time
().
strftime
(
"%H:%M:%S"
)
database
.
connect
()
database
.
connect
()
database
.
inserFolderSnapshot
(
'fakeuser0'
,
'1.0'
,
date
,
time_earlier
)
database
.
inserFolderSnapshot
(
'fakeuser0'
,
'1.0'
,
date
_earlier
,
time_earlier
)
database
.
commit
()
database
.
commit
()
database
.
close
()
database
.
close
()
...
@@ -583,11 +584,12 @@ class TestCollectSnapshot(unittest.TestCase):
...
@@ -583,11 +584,12 @@ class TestCollectSnapshot(unittest.TestCase):
user
.
_insertDiskSnapShot
(
database
,
date
,
time
)
user
.
_insertDiskSnapShot
(
database
,
date
,
time
)
update_folder_size_call
.
assert_called_once
()
update_folder_size_call
.
assert_called_once
()
time_earlier
=
(
datetime
.
utcnow
()
-
\
datetime_earlier
=
datetime
.
utcnow
()
-
timedelta
(
minutes
=
10
)
timedelta
(
minutes
=
10
)).
time
().
strftime
(
"%H:%M:%S"
)
date_earlier
=
datetime_earlier
.
date
()
time_earlier
=
datetime_earlier
.
time
().
strftime
(
"%H:%M:%S"
)
database
.
connect
()
database
.
connect
()
database
.
inserFolderSnapshot
(
'fakeuser0'
,
'1.0'
,
date
,
time_earlier
)
database
.
inserFolderSnapshot
(
'fakeuser0'
,
'1.0'
,
date
_earlier
,
time_earlier
)
database
.
commit
()
database
.
commit
()
database
.
close
()
database
.
close
()
...
...
Lisa Casino
@lisa.casino
mentioned in merge request
!311 (merged)
·
Jun 30, 2021
mentioned in merge request
!311 (merged)
mentioned in merge request !311
Toggle commit list
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