Browse Source

Add .gitreview and clean up repo

Add src/README.md placeholder to prevent inheritence of the
lower layer readme file in the built charm.

Add src/tox.ini and test-requirements for Amulet prep.

Update metadata.yaml for series.

Update tox.ini to minimize and clarify pep8 ignores.

Resolve flake8/pbr test-requirements version range conflict.

Remove legacy lint and test targets from Makefile, ensuring
these tests will execute via tox.  Trusty test runners have
no py35 interpreter, and would have failed in running both
py34 and py35 in succession as it was defined.

Update src/layer.yaml repo value to point to official location
and remove unnecessary options.

Change-Id: Ia663fda7761dca6dc08583314f00beedf1db60cc
changes/57/350257/7
Ryan Beisner 6 years ago
parent
commit
88b5bd5490
  1. 4
      .gitreview
  2. 7
      Makefile
  3. 1
      src/README.md
  4. 6
      src/layer.yaml
  5. 4
      src/metadata.yaml
  6. 20
      src/test-requirements.txt
  7. 1
      src/tests/README.md
  8. 54
      src/tox.ini
  9. 3
      test-requirements.txt
  10. 5
      tox.ini

4
.gitreview

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/charm-barbican.git

7
Makefile

@ -6,10 +6,3 @@ clean:
build: clean
LAYER_PATH=$(LAYER_PATH) tox -e build
lint:
@tox -e pep8
test:
@echo Starting unit tests...
@tox -e py34,py35

1
src/README.md

@ -0,0 +1 @@
# Write me

6
src/layer.yaml

@ -4,8 +4,4 @@ includes:
- interface:rabbitmq
- interface:keystone
- interface:barbican-hsm
options:
basic:
use_venv: True
include_system_packages: True
repo: git@github.com:openstack-charmers/charm-barbican.git
repo: https://github.com/openstack/charm-barbican

4
src/metadata.yaml

@ -7,6 +7,10 @@ description: |
being useful for all environments, including large ephemeral Clouds
tags:
- openstack
series:
# Trusty disabled pending https://bugs.launchpad.net/bugs/1609498
# - trusty
- xenial
subordinate: false
provides:
secret-store:

20
src/test-requirements.txt

@ -0,0 +1,20 @@
# charm-proof
charm-tools>=2.0.0
# amulet deployment helpers
bzr+lp:charm-helpers#egg=charmhelpers
# BEGIN: Amulet OpenStack Charm Helper Requirements
# Liberty client lower constraints
amulet>=1.14.3,<2.0
bundletester>=0.6.1,<1.0
python-keystoneclient>=1.7.1,<2.0
python-designateclient>=1.5,<2.0
python-cinderclient>=1.4.0,<2.0
python-glanceclient>=1.1.0,<2.0
python-heatclient>=0.8.0,<1.0
python-neutronclient>=3.1.0,<4.0
python-novaclient>=2.30.1,<3.0
python-openstackclient>=1.7.0,<2.0
python-swiftclient>=2.6.0,<3.0
pika>=0.10.0,<1.0
distro-info
# END: Amulet OpenStack Charm Helper Requirements

1
src/tests/README.md

@ -0,0 +1 @@
TODO: write Amulet tests.

54
src/tox.ini

@ -0,0 +1,54 @@
[tox]
envlist = pep8
skipsdist = True
[testenv]
envdir = .tox/py27
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
AMULET_SETUP_TIMEOUT=2700
passenv = HOME TERM AMULET_HTTP_PROXY AMULET_OS_VIP
deps = -r{toxinidir}/test-requirements.txt
install_command =
pip install --allow-unverified python-apt {opts} {packages}
[testenv:pep8]
basepython = python2.7
commands = charm-proof
[testenv:func27-noop]
# DRY RUN - For Debug
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
[testenv:func27]
# Charm Functional Test
# Run all gate tests which are +x (expected to always pass)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
[testenv:func27-smoke]
# Charm Functional Test
# Run a specific test as an Amulet smoke test (expected to always pass)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy
[testenv:func27-dfs]
# Charm Functional Test
# Run all deploy-from-source tests which are +x (may not always pass!)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
[testenv:func27-dev]
# Charm Functional Test
# Run all development test targets which are +x (may not always pass!)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
[testenv:venv]
commands = {posargs}

3
test-requirements.txt

@ -1,4 +1,5 @@
flake8>=2.2.4,<=2.4.1
# Lint and unit test requirements
flake8
os-testr>=0.4.1
charms.reactive
mock>=1.2

5
tox.ini

@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = generate
envlist = pep8,py34,py35
skip_missing_interpreters = True
[testenv]
@ -41,4 +41,5 @@ commands = flake8 {posargs} src unit_tests
commands = {posargs}
[flake8]
ignore = E402,E226
# E402 ignore necessary for path append before sys module import in actions
ignore = E402

Loading…
Cancel
Save