Project

General

Profile

Bug #34870

Add APIv2 tests for Jails

Added by Waqar Ahmed 11 months ago. Updated 11 months ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Seen in:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Related issues

Related to FreeNAS - Bug #35128: Fix traceback caused by attribute name change in iocageDone
Related to FreeNAS - Bug #35338: Jail disappear from API v2Closed
Related to FreeNAS - Bug #35344: Fix bad destroy target for iocage export Done

Associated revisions

Revision 23313df8 (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision a1f965fd (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision 85d0c07f (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision a00a0443 (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision 5aac952c (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision 0d43fe17 (diff)
Added by Waqar Ahmed 11 months ago

Jails API v2 tests
Ticket: #34870

Revision bfb5b262 (diff)
Added by Waqar Ahmed 11 months ago

Pool name changed for Jails Tests

Pool name in ixautomation environment is different from the one set in jails tests previously. This commit changes that.
Ticket: #34870

History

#1 Updated by Waqar Ahmed 11 months ago

  • Status changed from Unscreened to In Progress

#2 Updated by Waqar Ahmed 11 months ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Dependent on a related task to be completed

Blocked by a potential bug - Tikcet: #35128

#3 Updated by Dru Lavigne 11 months ago

  • Related to Bug #35128: Fix traceback caused by attribute name change in iocage added

#4 Updated by Waqar Ahmed 11 months ago

  • Status changed from Blocked to In Progress
  • Reason for Blocked deleted (Dependent on a related task to be completed)

#5 Updated by Waqar Ahmed 11 months ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Dependent on a related task to be completed

#6 Updated by Waqar Ahmed 11 months ago

  • Related to Bug #35338: Jail disappear from API v2 added

#7 Updated by Waqar Ahmed 11 months ago

  • Related to Bug #35344: Fix bad destroy target for iocage export added

#8 Updated by Waqar Ahmed 11 months ago

  • Copied to Bug #35416: Add APIv2 tests for S3 added

#9 Updated by Waqar Ahmed 11 months ago

  • Copied to deleted (Bug #35416: Add APIv2 tests for S3)

#10 Updated by Dru Lavigne 11 months ago

  • Status changed from Blocked to Unscreened
  • Reason for Blocked deleted (Dependent on a related task to be completed)

#11 Updated by Waqar Ahmed 11 months ago

  • Status changed from Unscreened to Ready for Testing

#12 Updated by Dru Lavigne 11 months ago

  • Subject changed from API v2 Tests for Jails to Add APIv2 tests for Jails
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#13 Updated by Dru Lavigne 11 months ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1

#14 Updated by Eric Turgeon 11 months ago

  • Status changed from Ready for Testing to Failed Testing

Test failed in ixautomation the pool name is tank with the all the test.

==================================================== test session starts ====================================================
platform freebsd12 -- Python 3.6.5, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/local/bin/python3.6
cachedir: .pytest_cache
rootdir: /usr/home/ericbsd/projects/freenas/freenas/tests, inifile:
collected 17 items                                                                                                          

api2/jails.py::test_01_activate_iocage_pool PASSED                                                                    [  5%]
api2/jails.py::test_02_verify_iocage_pool FAILED                                                                      [ 11%]
api2/jails.py::test_03_verify_list_resources_endpoint PASSED                                                          [ 17%]
api2/jails.py::test_04_fetch_bsd_release PASSED                                                                       [ 23%]
api2/jails.py::test_05_verify_bsd_release PASSED                                                                      [ 29%]
api2/jails.py::test_06_create_jail PASSED                                                                             [ 35%]
api2/jails.py::test_07_verify_creation_of_jail PASSED                                                                 [ 41%]
api2/jails.py::test_08_update_jail_description PASSED                                                                 [ 47%]
api2/jails.py::test_09_start_jail PASSED                                                                              [ 52%]
api2/jails.py::test_10_verify_jail_started PASSED                                                                     [ 58%]
api2/jails.py::test_11_export_call PASSED                                                                             [ 64%]
api2/jails.py::test_12_exec_call PASSED                                                                               [ 70%]
api2/jails.py::test_13_upgrade_jail PASSED                                                                            [ 76%]
api2/jails.py::test_14_stop_jail PASSED                                                                               [ 82%]
api2/jails.py::test_15_verify_jail_stopped PASSED                                                                     [ 88%]
api2/jails.py::test_16_rc_action PASSED                                                                               [ 94%]
api2/jails.py::test_17_verify_clean_call PASSED                                                                       [100%]

------------ generated xml file: /usr/home/ericbsd/projects/freenas/freenas/tests/results/jails_tests_result.xml ------------
========================================================= FAILURES ==========================================================
________________________________________________ test_02_verify_iocage_pool _________________________________________________

    def test_02_verify_iocage_pool():
        result = GET(
            '/jail/get_activated_pool/'
        )

>       assert result.json() == IOCAGE_POOL, result.text
E       AssertionError: "tank" 
E       assert 'tank' == 'vol1'
E         - tank
E         + vol1

api2/jails.py:35: AssertionError
=========================================== 1 failed, 16 passed in 733.49 seconds ===========================================

#15 Updated by Waqar Ahmed 11 months ago

  • Status changed from Failed Testing to Blocked
  • Reason for Blocked set to Waiting for feedback

Kindly correct me if I am wrong, only the POOL name needs to be changed so as to reflect the pool being used during the tests ?
Should we add such a variable in the config file or the autoconfig file maybe ? Because under different environments, the value of this variable would be different and thus fail.

Looking forward to hearing from you. Thank you

#16 Updated by Eric Turgeon 11 months ago

Yes, pool name needs to be changed.

#17 Updated by Dru Lavigne 11 months ago

  • Status changed from Blocked to In Progress
  • Reason for Blocked deleted (Waiting for feedback)

#18 Updated by Waqar Ahmed 11 months ago

#19 Updated by Eric Turgeon 11 months ago

  • Status changed from In Progress to Passed Testing
  • Needs QA changed from Yes to No

Fix on the last pull request.

#20 Updated by Dru Lavigne 11 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF