Skip to content

Commit

Permalink
migrate noop test back in-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMacNaughton committed May 20, 2019
1 parent e5ba296 commit befe91b
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 5 deletions.
1 change: 0 additions & 1 deletion test-requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ target_deploy_status:
workload-status: active
workload-status-message: icmp ok, local hostname ok, dns ok
configure:
- zaza.openstack.charm_tests.noop.setup.basic_setup
- zaza.charm_tests.noop.setup.basic_setup
tests:
- zaza.openstack.charm_tests.noop.tests.NoopTest
- zaza.charm_tests.noop.tests.NoopTest
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ commands = sphinx-build -W -b html -d {toxinidir}/doc/build/doctrees . {toxinidi
[testenv:func]
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
{envdir}/bin/python3 setup.py install
functest-run-suite --keep-model

[testenv:func-travis]
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
# sudo back to ourself to activate lxd group membership executable search path
whitelist_externals = sudo
passenv = USER
Expand Down
15 changes: 15 additions & 0 deletions zaza/charm_tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2018 Canonical Ltd.
#
# 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.

"""Collection of modules for testing a specific application."""
15 changes: 15 additions & 0 deletions zaza/charm_tests/noop/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2018 Canonical Ltd.
#
# 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.

"""Collection of code for validating Zaza."""
22 changes: 22 additions & 0 deletions zaza/charm_tests/noop/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2018 Canonical Ltd.
#
# 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.

"""Code for validating Zaza configure function loader."""

import logging


def basic_setup():
"""Run setup."""
logging.info('OK')
33 changes: 33 additions & 0 deletions zaza/charm_tests/noop/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python3

# Copyright 2018 Canonical Ltd.
#
# 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.

"""Code for validating Zaza test class loader."""

import logging
import unittest


class NoopTest(unittest.TestCase):
"""Code for validating Zaza test class loader."""

@classmethod
def setUpClass(cls):
"""Run class setup for noop tests."""
super(NoopTest, cls).setUpClass()

def test_foo(self):
"""foo."""
logging.info('bar')

0 comments on commit befe91b

Please sign in to comment.