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

Minitest port API test_contentview #5843

Closed
10 of 11 tasks
ldjebran opened this issue Mar 9, 2018 · 4 comments
Closed
10 of 11 tasks

Minitest port API test_contentview #5843

ldjebran opened this issue Mar 9, 2018 · 4 comments
Assignees
Labels
API Issues and PRs involving the API

Comments

@ldjebran
Copy link
Contributor

ldjebran commented Mar 9, 2018

Target project : Katello

  • test_negative_create_with_invalid_name
  • test_positive_clone
  • test_positive_create_composite
  • test_positive_create_with_description
  • test_positive_create_with_name
  • test_positive_publish_with_long_name -- do not port
  • test_negative_update_label
  • test_negative_update_name
  • test_positive_update_attributes
  • test_positive_update_name
  • test_positive_delete
@ldjebran ldjebran added the API Issues and PRs involving the API label Mar 9, 2018
@ldjebran ldjebran added this to To do in Minitest port Mar 9, 2018
@pondrejk pondrejk self-assigned this May 17, 2018
@pondrejk pondrejk moved this from To do to In progress in Minitest port May 17, 2018
@ldjebran ldjebran added the in progress This issue is being worked on label May 17, 2018
@pondrejk
Copy link
Contributor

Well, if something is tested in Katello, it is CVs, so minimal changes introduced in my PR, majority of listed tests already existed in some form, summary:

test_negative_create_with_invalid_name
-- model test_bad_name + added should_not clauses

test_positive_clone
-- model and controller have test_copy

test_positive_create_composite
-- model test_composite_views_with_composite_versions

test_positive_create_with_description
-- controller: test_create

test_positive_create_with_name
-- model: test_create_with_name
-- controller: test_create

test_positive_publish_with_long_name
-- not ok to port atm, skipped due to BZ in pr #6019

test_negative_update_label
-- added should_not clauses

test_negative_update_name
-- added should_not clauses

test_positive_update_attributes
-- controller: test_update + added asserts

test_positive_update_name
-- controller: test_update

test_positive_delete
-- controller: test_destroy

@pondrejk pondrejk moved this from In progress to Target PRs Submitted in Minitest port May 23, 2018
@pondrejk pondrejk added review and removed in progress This issue is being worked on labels May 24, 2018
@ldjebran
Copy link
Contributor Author

@pondrejk you can already add test_attributes on the tests in question to have a clear picture what test is being ported and covered by which tests, also if the tests already exists in controllers you can add assertions on returned controller fields values so we will be sure that, that fields are really returned as expected by robottelo tests.
What do you think?

@ldjebran
Copy link
Contributor Author

@pondrejk test_negative_update_label is not adequately covered, this test should not be ported at all
this test is still affected by this bug https://bugzilla.redhat.com/show_bug.cgi?id=1147100
The test in robottelo must be like this
(there is an error in robottelo test , the new value must be a valid label value and not a utf8, and the update must fail also, this is an other scenario from other simple update)

        with self.assertRaises(HTTPError):
            entities.ContentView(
                id=self.content_view.id,
                label=gen_string('alpha')).update(['label'])

Also the description we have to a should allow_values to be fully covered

@ldjebran
Copy link
Contributor Author

@pondrejk by the otherhand we can add a robottelo test that rely on the fact that the label value was not updated

@ldjebran ldjebran moved this from Target PRs Submitted to Target PRs Merged in Minitest port Jun 4, 2018
@ldjebran ldjebran added ready and removed review labels Jun 4, 2018
@mshriver mshriver removed the ready label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues and PRs involving the API
Projects
Minitest port
  
Target PRs Merged
Development

No branches or pull requests

3 participants