Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
85b25d3c
Commit
85b25d3c
authored
Dec 19, 2017
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update paver to current master hash
parent
5de2dbaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
pavelib/paver_tests/test_database.py
+7
-10
requirements/edx/paver.txt
+1
-1
scripts/jenkins-common.sh
+2
-0
No files found.
pavelib/paver_tests/test_database.py
View file @
85b25d3c
"""
Tests for the Paver commands for updating test databases
"""
import
unittest
import
os
from
unittest
import
TestCase
import
boto
from
moto
import
mock_s3
from
mock
import
patch
from
common.test.utils
import
MockS3Mixin
from
pavelib.database
import
verify_fingerprint_in_bucket
class
TestPaverDatabaseTasks
(
unittest
.
TestCase
):
class
TestPaverDatabaseTasks
(
MockS3Mixin
,
TestCase
):
"""Tests for the Database cache file manipulation."""
def
setUp
(
self
):
super
(
TestPaverDatabaseTasks
,
self
)
.
setUp
()
self
.
conn
=
boto
.
connect_s3
()
conn
.
create_bucket
(
'moto_test_bucket'
)
self
.
bucket
=
conn
.
get_bucket
(
'moto_test_bucket'
)
self
.
conn
.
create_bucket
(
'moto_test_bucket'
)
self
.
bucket
=
self
.
conn
.
get_bucket
(
'moto_test_bucket'
)
@mock_s3
@patch.dict
(
os
.
environ
,
{
'DB_CACHE_S3_BUCKET'
:
'moto_test_bucket'
})
def
test_fingerprint_in_bucket
(
self
):
key
=
boto
.
s3
.
key
.
Key
(
bucket
=
self
.
bucket
,
name
=
'testfile.zip'
)
key
.
set_contents_from_string
(
'this is a test'
)
self
.
assertTrue
(
verify_fingerprint_in_bucket
(
'testfile'
))
@mock_s3
@patch.dict
(
os
.
environ
,
{
'DB_CACHE_S3_BUCKET'
:
'moto_test_bucket'
})
def
test_fingerprint_not_in_bucket
(
self
):
key
=
boto
.
s3
.
key
.
Key
(
bucket
=
self
.
bucket
,
name
=
'testfile.zip'
)
...
...
requirements/edx/paver.txt
View file @
85b25d3c
# Requirements to run and test Paver
Paver==1.2.4
git+https://github.com/jzoldak/paver.git@b72ccd7b638c1e07105d04f670170b3a37095d10#egg=Paver==1.2.4a
libsass==0.10.0
markupsafe
-r base_common.txt
scripts/jenkins-common.sh
View file @
85b25d3c
...
...
@@ -70,3 +70,5 @@ export PAVER_TIMER_LOG="test_root/log/timing.paver.$TIMESTAMP.log"
export
ANSIBLE_TIMER_LOG
=
"test_root/log/timing.ansible.
$TIMESTAMP
.log"
echo
"This node is
`
curl http://169.254.169.254/latest/meta-data/hostname
`
"
pip install
--upgrade
--force-reinstall
git+https://github.com/jzoldak/paver.git@b72ccd7b638c1e07105d04f670170b3a37095d10#egg
=
Paver
==
1.2.4a
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