Distinguish project name and repo name

Currently, initials of project names are written with a lower case.
This patch set distinguishes project name of which initials are written with
a capital case, and repo name of which initials are written with a lower case.

e.g.) Nova
project name: Nova
repo name: nova

Change-Id: I3899c06e970946d219c81638e089148ae0d7eb3b
This commit is contained in:
Yuiko Takada 2015-11-17 11:30:11 +09:00
parent 4e38e54708
commit dd9ea3eaf8
10 changed files with 5 additions and 4 deletions

View File

@ -17,4 +17,4 @@ To use, `cd` into the project directory then run::
cookiecutter https://git.openstack.org/openstack/tempest-plugin-cookiecutter.git
You will be prompted for the name/class of the tempest plugin to create.
You will be prompted for the project name/repository name/class of the tempest plugin to create.

View File

@ -1,4 +1,5 @@
{
"project": "sample",
"project": "Sample",
"repo_name": "sample",
"testclass": "SampleTempestPlugin"
}

View File

@ -19,14 +19,14 @@ import os
from tempest import config
from tempest.test_discover import plugins
from {{cookiecutter.project}}_tempest_plugin import config as project_config
from {{cookiecutter.repo_name}}_tempest_plugin import config as project_config
class {{cookiecutter.testclass}}(plugins.TempestPlugin):
def load_tests(self):
base_path = os.path.split(os.path.dirname(
os.path.abspath(__file__)))[0]
test_dir = "{{cookiecutter.project}}_tempest_plugin/tests"
test_dir = "{{cookiecutter.repo_name}}_tempest_plugin/tests"
full_test_dir = os.path.join(base_path, test_dir)
return full_test_dir, base_path