Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-deduced YAML test case names collide when the file name includes more than one dot #818

Closed
mustafakemalgilor opened this issue Apr 18, 2024 · 2 comments · Fixed by #825
Assignees

Comments

@mustafakemalgilor
Copy link
Member

Assuming the following YAML file names, the auto-deduced test case names are the same even though the file names are different:

  • lp1896125-17.0.0.yaml
  • lp1896125-17.0.1.yaml

These files yield lp1896125-17 as the test name, which leads to a name collision.

Ideally, the code should strip away the file extension, sanitize the remainder, and use that as a test name.

@dosaboy
Copy link
Member

dosaboy commented Apr 18, 2024

@mustafakemalgilor while we should probably fix that, I feel it makes sense to give the files meaningful names so that you can tell what they are doing from their name so e.g. suffix like _pass.yaml _fail.yaml is what i usually use.

@mustafakemalgilor
Copy link
Member Author

Sure, in this context the suffixes are version numbers for different keystone releases I'd like to test the scenario against. I wanted to be verbose on test cases for ensuring that the new version comparison logic works as intended for non-superficial use cases.

mustafakemalgilor added a commit to mustafakemalgilor/hotsos that referenced this issue Apr 19, 2024
test_method_name now properly removes the file extension from the file
name and uses the remainder even if there are multiple dots present
in the name.

Fixes: canonical#818

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
mustafakemalgilor added a commit to mustafakemalgilor/hotsos that referenced this issue Apr 19, 2024
test_method_name now properly removes the file extension from the file
name and uses the remainder even if there are multiple dots present
in the name.

Fixes: canonical#818

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
mustafakemalgilor added a commit to mustafakemalgilor/hotsos that referenced this issue Apr 19, 2024
test_method_name now properly removes the file extension from the file
name and uses the remainder even if there are multiple dots present
in the name.

Fixes: canonical#818

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
@mustafakemalgilor mustafakemalgilor self-assigned this Apr 19, 2024
mustafakemalgilor added a commit to mustafakemalgilor/hotsos that referenced this issue Apr 24, 2024
test_method_name now properly removes the file extension from the file
name and uses the remainder even if there are multiple dots present
in the name.

Fixes: canonical#818

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
dosaboy pushed a commit that referenced this issue Apr 24, 2024
…825)

test_method_name now properly removes the file extension from the file
name and uses the remainder even if there are multiple dots present
in the name.

Fixes: #818

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants