Browse Source

Move elements at the top level

changes/21/416921/1
Thomas Herve 5 years ago
parent
commit
d802d177c7
  1. 5
      .gitignore
  2. 4
      .gitreview
  3. 4
      .testr.conf
  4. 2
      README.rst
  5. 0
      heat-config-ansible/README.rst
  6. 0
      heat-config-ansible/element-deps
  7. 0
      heat-config-ansible/install.d/50-heat-config-hook-ansible
  8. 0
      heat-config-ansible/install.d/hook-ansible.py
  9. 0
      heat-config-apply-config/README.rst
  10. 0
      heat-config-apply-config/element-deps
  11. 0
      heat-config-apply-config/install.d/50-heat-config-apply-config
  12. 0
      heat-config-apply-config/install.d/hook-apply-config.py
  13. 0
      heat-config-cfn-init/README.rst
  14. 0
      heat-config-cfn-init/element-deps
  15. 0
      heat-config-cfn-init/install.d/50-heat-config-hook-cfn-init
  16. 0
      heat-config-cfn-init/install.d/hook-cfn-init.py
  17. 0
      heat-config-chef/README.rst
  18. 0
      heat-config-chef/element-deps
  19. 0
      heat-config-chef/install.d/50-heat-config-hook-chef
  20. 0
      heat-config-chef/install.d/hook-chef.py
  21. 0
      heat-config-docker-cmd/README.rst
  22. 0
      heat-config-docker-cmd/element-deps
  23. 0
      heat-config-docker-cmd/install.d/50-heat-config-hook-docker-cmd
  24. 0
      heat-config-docker-cmd/install.d/hook-docker-cmd.py
  25. 0
      heat-config-docker-cmd/os-refresh-config/configure.d/50-heat-config-docker-cmd
  26. 0
      heat-config-docker-compose/README.rst
  27. 0
      heat-config-docker-compose/element-deps
  28. 0
      heat-config-docker-compose/install.d/50-heat-config-hook-docker-compose
  29. 0
      heat-config-docker-compose/install.d/hook-docker-compose.py
  30. 0
      heat-config-docker-compose/os-refresh-config/configure.d/50-heat-config-docker-compose
  31. 0
      heat-config-hiera/README.rst
  32. 0
      heat-config-hiera/element-deps
  33. 0
      heat-config-hiera/install.d/50-heat-config-hook-hiera
  34. 0
      heat-config-hiera/install.d/hook-hiera.py
  35. 0
      heat-config-kubelet/README.rst
  36. 0
      heat-config-kubelet/element-deps
  37. 0
      heat-config-kubelet/extra-data.d/50-docker-images
  38. 0
      heat-config-kubelet/install.d/50-heat-config-kubelet
  39. 0
      heat-config-kubelet/install.d/hook-kubelet.py
  40. 0
      heat-config-kubelet/os-refresh-config/configure.d/50-heat-config-kubelet
  41. 0
      heat-config-puppet/README.rst
  42. 0
      heat-config-puppet/element-deps
  43. 0
      heat-config-puppet/install.d/50-heat-config-hook-puppet
  44. 0
      heat-config-puppet/install.d/hook-puppet.py
  45. 0
      heat-config-salt/README.rst
  46. 0
      heat-config-salt/element-deps
  47. 0
      heat-config-salt/install.d/50-heat-config-hook-salt
  48. 0
      heat-config-salt/install.d/hook-salt.py
  49. 0
      heat-config-script/README.rst
  50. 0
      heat-config-script/element-deps
  51. 0
      heat-config-script/install.d/50-heat-config-hook-script
  52. 0
      heat-config-script/install.d/hook-script.py
  53. 0
      heat-config/README.rst
  54. 0
      heat-config/bin/heat-config-notify
  55. 0
      heat-config/bin/heat-config-rebuild-deployed
  56. 0
      heat-config/element-deps
  57. 0
      heat-config/install.d/heat-config-package-install/50-heat-config-package
  58. 0
      heat-config/install.d/heat-config-source-install/50-heat-config-soure
  59. 0
      heat-config/os-apply-config/var/run/heat-config/heat-config
  60. 0
      heat-config/os-refresh-config/configure.d/55-heat-config
  61. 0
      requirements.txt
  62. 19
      test-requirements.txt
  63. 0
      tests/common.py
  64. 0
      tests/config-tool-fake.py
  65. 1
      tests/heat_config_notify.py
  66. 0
      tests/hook-fake.py
  67. 1
      tests/hook_kubelet.py
  68. 1
      tests/software_config/heat_config_notify.py
  69. 1
      tests/software_config/hook_kubelet.py
  70. 115
      tests/software_config/test_hook_atomic.py
  71. 5
      tests/test_heat_config.py
  72. 5
      tests/test_heat_config_docker_compose.py
  73. 5
      tests/test_heat_config_kubelet.py
  74. 4
      tests/test_heat_config_notify.py
  75. 5
      tests/test_hook_ansible.py
  76. 5
      tests/test_hook_apply_config.py
  77. 5
      tests/test_hook_cfn_init.py
  78. 5
      tests/test_hook_chef.py
  79. 9
      tests/test_hook_docker_cmd.py
  80. 5
      tests/test_hook_docker_compose.py
  81. 5
      tests/test_hook_hiera.py
  82. 2
      tests/test_hook_kubelet.py
  83. 5
      tests/test_hook_puppet.py
  84. 5
      tests/test_hook_salt.py
  85. 5
      tests/test_hook_script.py
  86. 22
      tox.ini

5
.gitignore

@ -0,0 +1,5 @@
*.pyc
*.swp
*~
.tox
.testrepository

4
.gitreview

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

4
.testr.conf

@ -0,0 +1,4 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

2
hot/software-config/elements/README.rst → README.rst

@ -27,7 +27,7 @@ with the following:
git clone https://git.openstack.org/openstack/heat-templates.git
git clone https://git.openstack.org/openstack/dib-utils.git
export PATH="${PWD}/dib-utils/bin:$PATH"
export ELEMENTS_PATH=tripleo-image-elements/elements:heat-templates/hot/software-config/elements
export ELEMENTS_PATH=tripleo-image-elements/elements:heat-agents/
diskimage-builder/bin/disk-image-create vm \
fedora selinux-permissive \
os-collect-config \

0
hot/software-config/elements/heat-config-ansible/README.rst → heat-config-ansible/README.rst

0
hot/software-config/elements/heat-config-ansible/element-deps → heat-config-ansible/element-deps

0
hot/software-config/elements/heat-config-ansible/install.d/50-heat-config-hook-ansible → heat-config-ansible/install.d/50-heat-config-hook-ansible

0
hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py → heat-config-ansible/install.d/hook-ansible.py

0
hot/software-config/elements/heat-config-apply-config/README.rst → heat-config-apply-config/README.rst

0
hot/software-config/elements/heat-config-apply-config/element-deps → heat-config-apply-config/element-deps

0
hot/software-config/elements/heat-config-apply-config/install.d/50-heat-config-apply-config → heat-config-apply-config/install.d/50-heat-config-apply-config

0
hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py → heat-config-apply-config/install.d/hook-apply-config.py

0
hot/software-config/elements/heat-config-cfn-init/README.rst → heat-config-cfn-init/README.rst

0
hot/software-config/elements/heat-config-cfn-init/element-deps → heat-config-cfn-init/element-deps

0
hot/software-config/elements/heat-config-cfn-init/install.d/50-heat-config-hook-cfn-init → heat-config-cfn-init/install.d/50-heat-config-hook-cfn-init

0
hot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py → heat-config-cfn-init/install.d/hook-cfn-init.py

0
hot/software-config/elements/heat-config-chef/README.rst → heat-config-chef/README.rst

0
hot/software-config/elements/heat-config-chef/element-deps → heat-config-chef/element-deps

0
hot/software-config/elements/heat-config-chef/install.d/50-heat-config-hook-chef → heat-config-chef/install.d/50-heat-config-hook-chef

0
hot/software-config/elements/heat-config-chef/install.d/hook-chef.py → heat-config-chef/install.d/hook-chef.py

0
hot/software-config/elements/heat-config-docker-cmd/README.rst → heat-config-docker-cmd/README.rst

0
hot/software-config/elements/heat-config-docker-cmd/element-deps → heat-config-docker-cmd/element-deps

0
hot/software-config/elements/heat-config-docker-cmd/install.d/50-heat-config-hook-docker-cmd → heat-config-docker-cmd/install.d/50-heat-config-hook-docker-cmd

0
hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py → heat-config-docker-cmd/install.d/hook-docker-cmd.py

0
hot/software-config/elements/heat-config-docker-cmd/os-refresh-config/configure.d/50-heat-config-docker-cmd → heat-config-docker-cmd/os-refresh-config/configure.d/50-heat-config-docker-cmd

0
hot/software-config/elements/heat-config-docker-compose/README.rst → heat-config-docker-compose/README.rst

0
hot/software-config/elements/heat-config-docker-compose/element-deps → heat-config-docker-compose/element-deps

0
hot/software-config/elements/heat-config-docker-compose/install.d/50-heat-config-hook-docker-compose → heat-config-docker-compose/install.d/50-heat-config-hook-docker-compose

0
hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py → heat-config-docker-compose/install.d/hook-docker-compose.py

0
hot/software-config/elements/heat-config-docker-compose/os-refresh-config/configure.d/50-heat-config-docker-compose → heat-config-docker-compose/os-refresh-config/configure.d/50-heat-config-docker-compose

0
hot/software-config/elements/heat-config-hiera/README.rst → heat-config-hiera/README.rst

0
hot/software-config/elements/heat-config-hiera/element-deps → heat-config-hiera/element-deps

0
hot/software-config/elements/heat-config-hiera/install.d/50-heat-config-hook-hiera → heat-config-hiera/install.d/50-heat-config-hook-hiera

0
hot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py → heat-config-hiera/install.d/hook-hiera.py

0
hot/software-config/elements/heat-config-kubelet/README.rst → heat-config-kubelet/README.rst

0
hot/software-config/elements/heat-config-kubelet/element-deps → heat-config-kubelet/element-deps

0
hot/software-config/elements/heat-config-kubelet/extra-data.d/50-docker-images → heat-config-kubelet/extra-data.d/50-docker-images

0
hot/software-config/elements/heat-config-kubelet/install.d/50-heat-config-kubelet → heat-config-kubelet/install.d/50-heat-config-kubelet

0
hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py → heat-config-kubelet/install.d/hook-kubelet.py

0
hot/software-config/elements/heat-config-kubelet/os-refresh-config/configure.d/50-heat-config-kubelet → heat-config-kubelet/os-refresh-config/configure.d/50-heat-config-kubelet

0
hot/software-config/elements/heat-config-puppet/README.rst → heat-config-puppet/README.rst

0
hot/software-config/elements/heat-config-puppet/element-deps → heat-config-puppet/element-deps

0
hot/software-config/elements/heat-config-puppet/install.d/50-heat-config-hook-puppet → heat-config-puppet/install.d/50-heat-config-hook-puppet

0
hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py → heat-config-puppet/install.d/hook-puppet.py

0
hot/software-config/elements/heat-config-salt/README.rst → heat-config-salt/README.rst

0
hot/software-config/elements/heat-config-salt/element-deps → heat-config-salt/element-deps

0
hot/software-config/elements/heat-config-salt/install.d/50-heat-config-hook-salt → heat-config-salt/install.d/50-heat-config-hook-salt

0
hot/software-config/elements/heat-config-salt/install.d/hook-salt.py → heat-config-salt/install.d/hook-salt.py

0
hot/software-config/elements/heat-config-script/README.rst → heat-config-script/README.rst

0
hot/software-config/elements/heat-config-script/element-deps → heat-config-script/element-deps

0
hot/software-config/elements/heat-config-script/install.d/50-heat-config-hook-script → heat-config-script/install.d/50-heat-config-hook-script

0
hot/software-config/elements/heat-config-script/install.d/hook-script.py → heat-config-script/install.d/hook-script.py

0
hot/software-config/elements/heat-config/README.rst → heat-config/README.rst

0
hot/software-config/elements/heat-config/bin/heat-config-notify → heat-config/bin/heat-config-notify

0
hot/software-config/elements/heat-config/bin/heat-config-rebuild-deployed → heat-config/bin/heat-config-rebuild-deployed

0
hot/software-config/elements/heat-config/element-deps → heat-config/element-deps

0
hot/software-config/elements/heat-config/install.d/heat-config-package-install/50-heat-config-package → heat-config/install.d/heat-config-package-install/50-heat-config-package

0
hot/software-config/elements/heat-config/install.d/heat-config-source-install/50-heat-config-soure → heat-config/install.d/heat-config-source-install/50-heat-config-soure

0
hot/software-config/elements/heat-config/os-apply-config/var/run/heat-config/heat-config → heat-config/os-apply-config/var/run/heat-config/heat-config

0
hot/software-config/elements/heat-config/os-refresh-config/configure.d/55-heat-config → heat-config/os-refresh-config/configure.d/55-heat-config

0
tests/software_config/__init__.py → requirements.txt

19
test-requirements.txt

@ -0,0 +1,19 @@
coverage>=3.6
discover
dpath>=1.3.2
fixtures>=0.3.14
# Hacking already pins down pep8, pyflakes and flake8
hacking>=0.10.0,<0.11
mock>=1.0
requests>=1.2.1,!=2.4.0
requests-mock>=0.4.0 # Apache-2.0
salt
testrepository>=0.0.18
testscenarios>=0.4
testtools>=0.9.34
yamllint>=1.2.0
os-apply-config
python-heatclient>=1.2.0
python-keystoneclient>=0.10.0
python-openstackclient>=2.1.0

0
tests/software_config/common.py → tests/common.py

0
tests/software_config/config-tool-fake.py → tests/config-tool-fake.py

1
tests/heat_config_notify.py

@ -0,0 +1 @@
../heat-config/bin/heat-config-notify

0
tests/software_config/hook-fake.py → tests/hook-fake.py

1
tests/hook_kubelet.py

@ -0,0 +1 @@
../heat-config-kubelet/install.d/hook-kubelet.py

1
tests/software_config/heat_config_notify.py

@ -1 +0,0 @@
../../hot/software-config/elements/heat-config/bin/heat-config-notify

1
tests/software_config/hook_kubelet.py

@ -1 +0,0 @@
../../hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py

115
tests/software_config/test_hook_atomic.py

@ -1,115 +0,0 @@
#
# 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 json
import os
import fixtures
from tests.software_config import common
class HookAtomicTest(common.RunScriptTest):
data = {
"id": "abcdef001",
"group": "atomic",
"inputs": [],
"config": {
"command": "install",
"image": "imain/atomic-install-rabbitmq"
}
}
def setUp(self):
super(HookAtomicTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/heat-container-agent',
'scripts/hooks/atomic')
self.fake_tool_path = self.relative_path(
__file__,
'config-tool-fake.py')
self.working_dir = self.useFixture(fixtures.TempDir())
self.outputs_dir = self.useFixture(fixtures.TempDir())
self.test_state_path = self.outputs_dir.join('test_state.json')
self.env = os.environ.copy()
self.env.update({
'HEAT_ATOMIC_WORKING': self.working_dir.join(),
'HEAT_ATOMIC_CMD': self.fake_tool_path,
'TEST_STATE_PATH': self.test_state_path,
})
def test_hook(self):
self.env.update({
'TEST_RESPONSE': json.dumps({
'stdout': 'Downloading xxx',
'stderr': ''
})
})
returncode, stdout, stderr = self.run_cmd(
[self.hook_path], self.env, json.dumps(self.data))
self.assertEqual(0, returncode, stderr)
self.assertEqual({
'deploy_stdout': 'Downloading xxx',
'deploy_stderr': '',
'deploy_status_code': 0
}, json.loads(stdout))
state = self.json_from_file(self.test_state_path)
self.assertEqual(
[
self.fake_tool_path,
'install',
'imain/atomic-install-rabbitmq',
'-n abcdef001',
''
],
state['args'])
def test_hook_failed(self):
self.env.update({
'TEST_RESPONSE': json.dumps({
'stdout': '',
'stderr': 'Container exists...',
'returncode': 1
})
})
returncode, stdout, stderr = self.run_cmd(
[self.hook_path], self.env, json.dumps(self.data))
self.assertEqual(0, returncode, stderr)
self.assertEqual({
'deploy_stdout': '',
'deploy_stderr': 'Container exists...',
'deploy_status_code': 1
}, json.loads(stdout))
state = self.json_from_file(self.test_state_path)
self.assertEqual(
[
self.fake_tool_path,
'install',
'imain/atomic-install-rabbitmq',
'-n abcdef001',
''
],
state['args'])

5
tests/software_config/test_heat_config.py → tests/test_heat_config.py

@ -20,7 +20,7 @@ import tempfile
import fixtures
from testtools import matchers
from tests.software_config import common
from tests import common
class HeatConfigTest(common.RunScriptTest):
@ -128,8 +128,7 @@ class HeatConfigTest(common.RunScriptTest):
self.heat_config_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config/os-refresh-config/configure.d/55-heat-config')
self.hooks_dir = self.useFixture(fixtures.TempDir())

5
tests/software_config/test_heat_config_docker_compose.py → tests/test_heat_config_docker_compose.py

@ -18,7 +18,7 @@ import tempfile
import fixtures
import yaml
from tests.software_config import common
from tests import common
class HeatConfigDockerComposeORCTest(common.RunScriptTest):
@ -72,8 +72,7 @@ class HeatConfigDockerComposeORCTest(common.RunScriptTest):
self.fake_hook_path = self.relative_path(__file__, 'hook-fake.py')
self.heat_config_docker_compose_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-docker-compose/os-refresh-config/configure.d/'
'50-heat-config-docker-compose')

5
tests/software_config/test_heat_config_kubelet.py → tests/test_heat_config_kubelet.py

@ -18,7 +18,7 @@ import tempfile
import fixtures
from testtools import matchers
from tests.software_config import common
from tests import common
class HeatConfigKubeletORCTest(common.RunScriptTest):
@ -99,8 +99,7 @@ class HeatConfigKubeletORCTest(common.RunScriptTest):
self.heat_config_kubelet_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-kubelet/os-refresh-config/configure.d/'
'50-heat-config-kubelet')

4
tests/software_config/test_heat_config_notify.py → tests/test_heat_config_notify.py

@ -18,8 +18,8 @@ import tempfile
import fixtures
import mock
from tests.software_config import common
from tests.software_config import heat_config_notify as hcn
from tests import common
from tests import heat_config_notify as hcn
class HeatConfigNotifyTest(common.RunScriptTest):

5
tests/software_config/test_hook_ansible.py → tests/test_hook_ansible.py

@ -18,7 +18,7 @@ import os
import fixtures
from tests.software_config import common
from tests import common
class HookAnsibleTest(common.RunScriptTest):
@ -62,8 +62,7 @@ class HookAnsibleTest(common.RunScriptTest):
super(HookAnsibleTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-ansible/install.d/hook-ansible.py')
self.fake_tool_path = self.relative_path(

5
tests/software_config/test_hook_apply_config.py → tests/test_hook_apply_config.py

@ -18,7 +18,7 @@ import os
import tempfile
import yaml
from tests.software_config import common
from tests import common
log = logging.getLogger('test_hook_apply_config')
@ -36,8 +36,7 @@ class HookApplyConfigTest(common.RunScriptTest):
super(HookApplyConfigTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-apply-config/install.d/hook-apply-config.py')
self.metadata_dir = self.useFixture(fixtures.TempDir())

5
tests/software_config/test_hook_cfn_init.py → tests/test_hook_cfn_init.py

@ -16,7 +16,7 @@ import os
import fixtures
from tests.software_config import common
from tests import common
class HookCfnInitTest(common.RunScriptTest):
@ -31,8 +31,7 @@ class HookCfnInitTest(common.RunScriptTest):
super(HookCfnInitTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-cfn-init/install.d/hook-cfn-init.py')
self.fake_tool_path = self.relative_path(

5
tests/software_config/test_hook_chef.py → tests/test_hook_chef.py

@ -19,7 +19,7 @@ import mock
import StringIO
import sys
from tests.software_config import common
from tests import common
log = logging.getLogger('test_hook_chef')
@ -56,8 +56,7 @@ class HookChefTest(common.RunScriptTest):
super(HookChefTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-chef/install.d/hook-chef.py')
sys.stdin = StringIO.StringIO()
sys.stdout = StringIO.StringIO()

9
tests/software_config/test_hook_docker_cmd.py → tests/test_hook_docker_cmd.py

@ -19,7 +19,7 @@ import tempfile
import fixtures
from testtools import matchers
from tests.software_config import common
from tests import common
class HookDockerCmdTest(common.RunScriptTest):
@ -55,14 +55,13 @@ class HookDockerCmdTest(common.RunScriptTest):
super(HookDockerCmdTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-docker-cmd/install.d/hook-docker-cmd.py')
self.cleanup_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements/heat-config-docker-cmd/',
'..',
'heat-config-docker-cmd/',
'os-refresh-config/configure.d/50-heat-config-docker-cmd')
self.fake_tool_path = self.relative_path(

5
tests/software_config/test_hook_docker_compose.py → tests/test_hook_docker_compose.py

@ -16,7 +16,7 @@ import os
import fixtures
from tests.software_config import common
from tests import common
class HookDockerComposeTest(common.RunScriptTest):
@ -72,8 +72,7 @@ class HookDockerComposeTest(common.RunScriptTest):
super(HookDockerComposeTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-docker-compose/install.d/hook-docker-compose.py')
self.fake_tool_path = self.relative_path(

5
tests/software_config/test_hook_hiera.py → tests/test_hook_hiera.py

@ -18,7 +18,7 @@ import os
import tempfile
import yaml
from tests.software_config import common
from tests import common
log = logging.getLogger('test_hook_hiera_config')
@ -51,8 +51,7 @@ class HookHieraTest(common.RunScriptTest):
super(HookHieraTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-hiera/install.d/hook-hiera.py')
self.hieradata_dir = self.useFixture(fixtures.TempDir()).join()

2
tests/software_config/test_hook_kubelet.py → tests/test_hook_kubelet.py

@ -16,7 +16,7 @@ import mock
import re
import testtools
from tests.software_config import hook_kubelet
from tests import hook_kubelet
class HookKubeletTest(testtools.TestCase):

5
tests/software_config/test_hook_puppet.py → tests/test_hook_puppet.py

@ -17,7 +17,7 @@ import os
import fixtures
from tests.software_config import common
from tests import common
class HookPuppetTest(common.RunScriptTest):
@ -48,8 +48,7 @@ class HookPuppetTest(common.RunScriptTest):
super(HookPuppetTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-puppet/install.d/hook-puppet.py')
self.fake_tool_path = self.relative_path(

5
tests/software_config/test_hook_salt.py → tests/test_hook_salt.py

@ -17,7 +17,7 @@ import logging
import os
import yaml
from tests.software_config import common
from tests import common
log = logging.getLogger('test_hook_salt')
@ -64,8 +64,7 @@ class HookSaltTest(common.RunScriptTest):
super(HookSaltTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-salt/install.d/hook-salt.py')
self.working_dir = self.useFixture(fixtures.TempDir())

5
tests/software_config/test_hook_script.py → tests/test_hook_script.py

@ -16,7 +16,7 @@ import os
import fixtures
from tests.software_config import common
from tests import common
class HookScriptTest(common.RunScriptTest):
@ -25,8 +25,7 @@ class HookScriptTest(common.RunScriptTest):
super(HookScriptTest, self).setUp()
self.hook_path = self.relative_path(
__file__,
'../..',
'hot/software-config/elements',
'..',
'heat-config-script/install.d/hook-script.py')
self.fake_tool_path = self.relative_path(

22
tox.ini

@ -0,0 +1,22 @@
[tox]
envlist = py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
testr run {posargs}
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[flake8]
show-source = True
builtins = _
exclude=.venv,.git,.tox,*lib/python*,private,.eggs
Loading…
Cancel
Save