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

Duplicate test UUID across the test suite #3834

Closed
rplevka opened this issue Sep 20, 2016 · 8 comments · Fixed by #3836
Closed

Duplicate test UUID across the test suite #3834

rplevka opened this issue Sep 20, 2016 · 8 comments · Fixed by #3836
Assignees
Labels
Bug This is an issue with the robottelo framework High Priority Get this done or merged soon

Comments

@rplevka
Copy link
Member

rplevka commented Sep 20, 2016

I spotted some duplicate UUIDs while doing my routine check. I guess we should fix them to keep Polarion gods happy ;):

$ grep "@id" */*.py | sort | uniq -d
api/test_repository.py:        @id: 6dff0c90-170f-40b9-9347-8ec97d89f2fd
api/test_variables.py:        @id: a90b5bcd-f76c-4663-bf41-2f96e7e15c0f
cli/test_hostgroup.py:        @id: 32be4630-0032-4f5f-89d4-44f8d05fe585
cli/test_hostgroup.py:        @id: c468fcac-9e42-4ee6-a431-abe29b6848ce
ui/test_contenthost.py:        @id: 13b9422d-4b7a-4068-9a57-a94602cd6410
ui/test_hostcollection.py:        @id: 5a6fff0a-686f-419b-a773-4d03713e47e9
ui/test_remoteexecution.py:        @id: 7f0cdd1a-c87c-4324-ae9c-dbc30abad217
ui/test_repository.py:        @id: 8037a68b-66b8-4b42-a80b-fb08495f948d
@rplevka rplevka added Bug This is an issue with the robottelo framework High Priority Get this done or merged soon labels Sep 20, 2016
@pondrejk
Copy link
Contributor

maybe Travis should check this

@rochacbruno
Copy link
Contributor

I added #3735 to cover this, (I am waiting the #3721 to be merged, so I can use the same structure to add the needed command (I already checked betelgeuse tools needed to do that)

@rochacbruno rochacbruno self-assigned this Sep 20, 2016
@rochacbruno
Copy link
Contributor

@omaciel what would be the strategy for that found duplicates? keep the oldest and change the newest test?

@omaciel
Copy link
Member

omaciel commented Sep 20, 2016

@rochacbruno yes, but is the plan to do this automatically or show the failure and let the contributor manually update the uuid?

@rochacbruno
Copy link
Contributor

@omaciel the idea is to run the validation on travis CI, so it is going to fail. also make test-robottelo should run @rplevka's $ grep "@id" */*.py | sort | uniq -d before test. So contributor can run locally

@rochacbruno
Copy link
Contributor

rochacbruno commented Sep 20, 2016

@omaciel @rplevka

We can 2 two things.

  1. add grep "@id" */*.py | sort | uniq -d as a call before make test-robottelo and if any output returned it exits with error.
  2. add a command in robottelo manage genuuids --path=filename

That command will find any occurence of empty @id: and generate a new ID and automatically fill it.

So when writing stubs we can just generate all ids in bulk for that file.

@omaciel
Copy link
Member

omaciel commented Sep 20, 2016

@rochacbruno I wonder if we should use a pre-commit hook that calls the make task? So folks have no choice and have to fix things before they can commit?

@rochacbruno
Copy link
Contributor

@omaciel the pre-commit hook will call make test-robottelo anyway, good idea, but everyone should add the hook locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is an issue with the robottelo framework High Priority Get this done or merged soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants