-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1 Problem: The issue is that there does not exist any test automation for continuous integration via Travis. Analysis: This initiates the test automation via Travis. This is a very vanilla setup with no entrypoint and only minimal items for tox to work with both commands that are in the .travis_yml file. This includes the setup for travis and the basic framework around getting .rpm and .deb installed via test automation in the framework. Tests: There exists a f5_cccl/test/test_f5_cccl.py which is a basic test to validate that there exists a __version__ variable.
- Loading branch information
Showing
8 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Headline or summary of the issue you are fixing | ||
|
||
# Using the Fixes #<issueid> will close the issue on commit to repo | ||
Issues: | ||
Fixes #<issueid> | ||
|
||
# Describe the issue that this change addresses | ||
Problem: | ||
|
||
# Describe the change itself and why you made the changes you did | ||
Analysis: | ||
|
||
# Describe the tests you ran and/or created to test this change | ||
Tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
sudo: true | ||
env: | ||
global: | ||
- REPO="f5-cccl" | ||
- PKG_VERSION=$(python -c "import f5_cccl; print f5_cccl.__version__") | ||
# services: # needed for later work to build .deb and .rpm natively | ||
# - docker | ||
before_install: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Travis F5 Openstack" | ||
- git fetch --depth=100 | ||
install: | ||
- pip install tox | ||
- pip install -r requirements.test.txt | ||
- pip install -r requirements.docs.txt | ||
- python ./setup.py install | ||
script: | ||
- tox -e flake | ||
- tox -e unit | ||
before_deploy: PKG_VERSION=$(python -c "import f5; print(f5_cccl.__version__)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2017 F5 Networks Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
__version__ = '0.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2017 F5 Networks Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
import f5_cccl | ||
|
||
|
||
def test_version(): | ||
assert isinstance(f5_cccl.__version__, str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-e . | ||
|
||
# Docs requirements | ||
Sphinx>=1.4.1 | ||
six>=1.10.0 | ||
sphinx_rtd_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Install this directory (will use setup.py and therefore install_requires). | ||
-e . | ||
# Test Requirements | ||
mock==2.0.0 | ||
pytest==3.0.5 | ||
pytest-cov>=2.2.1 | ||
python-coveralls==2.7.0 | ||
pyOpenSSL==16.2.0 | ||
requests-mock==1.2.0 | ||
flake8 | ||
netaddr | ||
q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright 2014 F5 Networks Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
import f5_cccl | ||
|
||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
install_requires = [] | ||
print('install_requires', install_requires) | ||
setup( | ||
name='f5-cccl', | ||
description='F5 Networks Common Controller Core Library', | ||
license='Apache License, Version 2.0', | ||
version=f5_cccl.__version__, | ||
author='F5 Networks', | ||
url='https://github.com/f5devcentral/f5-cccl', | ||
keywords=['F5', 'big-ip'], | ||
install_requires=install_requires, | ||
packages=find_packages( | ||
exclude=["*.test", "*.test.*", "test.*", "test_*", "test", "test*"] | ||
), | ||
data_files=[], | ||
classifiers=[ | ||
], | ||
entry_points={} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[tox] | ||
envlist = | ||
unit | ||
flake | ||
coveralls | ||
docs | ||
|
||
[testenv] | ||
basepython = | ||
unit: python | ||
flake: python | ||
coveralls: python | ||
docs: python | ||
passenv = COVERALLS_REPO_TOKEN | ||
deps = | ||
-rrequirements.test.txt | ||
|
||
commands = | ||
# Misc tests | ||
flake: flake8 {posargs:.} | ||
unit: py.test f5_cccl/ | ||
coveralls: coveralls | ||
docs: bash ./devtools/bin/build-docs.sh | ||
usedevelop = true | ||
|
||
[flake8] | ||
exclude = docs/conf.py,docs/userguide/code_example.py,docs/conf.py,.tox,.git,__pycache__,build,*.pyc,docs,devtools,*.tmpl |