Skip to content

Commit 47e31b6

Browse files
Merge pull request #448 from adobe-apiplatform/feature/test-rework
Test rework
2 parents 2ba4dff + 3df3e10 commit 47e31b6

File tree

258 files changed

+331
-11210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+331
-11210
lines changed

.appveyor/build.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
if ($env:python.endswith("36-x64")) {
2+
$ldapver="cp36-cp36m"
23
$pycmd = "${env:python}\python.exe"
34
& $pycmd -m venv venv
45
} else {
6+
$ldapver="cp27-cp27m"
57
$venvcmd = "${env:python}\Scripts\virtualenv.exe"
68
& $venvcmd venv
79
}
810
.\venv\Scripts\activate.ps1
11+
pip install external\okta-0.0.3.1-py2.py3-none-any.whl
12+
pip install external\pyldap-2.4.45-${ldapver}-win_amd64.whl
13+
pip install -e .
14+
pip install -e .[test]
15+
pip install -e .[setup]
16+
17+
if ($env:python.endswith("36-x64")) {
18+
pip uninstall -y enum34
19+
}
20+
921
make 2>&1
1022
dir dist
1123
mkdir release

.appveyor/test.ps1

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.\venv\Scripts\activate.ps1
2+
python setup.py test
3+
exit $LASTEXITCODE

.travis.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ matrix:
99
python:
1010
- 3.6
1111
install:
12-
- ".travis/install-ubuntu.sh"
12+
- .travis/install-ubuntu.sh
1313
script:
14-
- ".travis/build-py36.sh"
15-
- ".travis/release.sh"
14+
- .travis/build-py36.sh
15+
- .travis/release.sh
16+
- python setup.py test
1617
- env: IMG="ubuntu1604"
1718
python:
1819
- 2.7
1920
install:
20-
- ".travis/install-ubuntu.sh"
21+
- .travis/install-ubuntu.sh
2122
script:
22-
- ".travis/build-py27.sh"
23-
- ".travis/release.sh"
23+
- .travis/build-py27.sh
24+
- .travis/release.sh
25+
- python setup.py test
2426
- env: OS="centos:7" IMG="centos7" SH="docker exec -t ${IMG} bash -c"
2527
services:
2628
- docker
@@ -50,6 +52,8 @@ matrix:
5052
script:
5153
- $SH .travis/build-py27.sh
5254
- $SH .travis/release.sh
55+
- $SH "python setup.py test"
56+
5357
deploy:
5458
provider: releases
5559
api_key:

.travis/build-py27.sh

+5
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
#!/usr/bin/env bash
2+
pip install --upgrade pip setuptools
3+
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
4+
pip install -e .
5+
pip install -e .[test]
6+
pip install -e .[setup]
27
make

.travis/build-py36-centos.sh

+3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ virtualenv venv -p /usr/bin/python3.6
33
source venv/bin/activate
44
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
55
pip install -e .
6+
pip install -e .[test]
7+
pip install -e .[setup]
68
pip uninstall -y enum34
79
make
810
pwd
911
.travis/release.sh
12+
python setup.py test

.travis/build-py36.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
33
pip install -e .
4+
pip install -e .[test]
5+
pip install -e .[setup]
46
pip uninstall -y enum34
57
make

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ install:
99
build_script:
1010
- ps: .appveyor\build.ps1
1111

12+
test_script:
13+
- ps: .appveyor\test.ps1
14+
1215
artifacts:
1316
- path: release/*.zip
1417
name: Zips

nose.cfg

-3
This file was deleted.

setup.cfg

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[aliases]
2-
test=nosetests
2+
test=pytest
33

4-
[nosetests]
5-
verbosity=3
6-
with-doctest=1
4+
[tool:pytest]
5+
addopts = --cov=user_sync

setup.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
import sys
22-
2321
from setuptools import setup
2422

2523
version_namespace = {}
2624
with open('user_sync/version.py') as f:
2725
exec(f.read(), version_namespace)
2826

27+
test_deps = ['mock', 'pytest', 'pytest-cov']
28+
setup_deps = ['pytest-runner']
29+
2930
setup(name='user-sync',
3031
version=version_namespace['__version__'],
3132
description='Application for synchronizing customer directories with the Adobe Enterprise Admin Console',
@@ -55,19 +56,18 @@
5556
'umapi-client>=2.11',
5657
],
5758
extras_require={
58-
':sys_platform=="linux" or sys_platform=="linux2"':[
59+
':sys_platform=="linux" or sys_platform=="linux2"': [
5960
'secretstorage',
6061
'dbus-python'
6162
],
62-
':sys_platform=="win32"':[
63+
':sys_platform=="win32"': [
6364
'pywin32-ctypes'
64-
]
65+
],
66+
'test': test_deps,
67+
'setup': setup_deps,
6568
},
66-
setup_requires=['nose>=1.0'],
67-
tests_require=[
68-
'mock',
69-
'nose>=1.0',
70-
],
69+
setup_requires=setup_deps,
70+
tests_require=test_deps,
7171
entry_points={
7272
'console_scripts': [
7373
'user_sync = user_sync.app:main'

test_framework/Makefile

-21
This file was deleted.

test_framework/README.md

-104
This file was deleted.

test_framework/setup.py

-57
This file was deleted.

test_framework/tests/01 - config/01 - Default config file/description.txt

-10
This file was deleted.

0 commit comments

Comments
 (0)