Commit Graph

52 Commits

Author SHA1 Message Date
Zuul 5dbacb19f7 Merge "Fix the case when a test trying to reboot active controller fails because stx-openstack is not applied" 2022-01-14 14:00:04 +00:00
Alexandru f045686fa1 Fix the case when a test trying to reboot active controller fails because stx-openstack is not applied
Description: The test_reboot_active_controller fails because the stx-openstack is not applied:
...RegionOne host-swact controller-1' failed to execute. Output: Swact action not allowed. stx-openstack apply is in progress.
During reboot of the active controller a swact should be performed which fails.

Story: N/A
Task: N/A

Signed-off-by: Alexandru <alexandru.dimofte@intel.com>
Change-Id: I363a8328159d5ce086e05037997f7f3bdd197207
2022-01-12 21:54:55 +00:00
Alexandru 307e745974 Modified the env using pytest==3.6.1 and pyyaml==5.4.1
Description: This changes is needed in order to fix a test failure
Error msg: TypeError: load() missing 1 required positional argument: 'Loader'

Story: N/A
Task: N/A

Signed-off-by: Alexandru <alexandru.dimofte@intel.com>
Change-Id: I4b2537bbb1969bac25ac36c4fa7d1e8b889b992e
2022-01-06 16:01:31 +00:00
Zuul 18985f621c Merge "relocate /www to /var/www" 2021-12-15 21:59:35 +00:00
Felipe Desiglo Ferrare 1516b57d62 Fix pylint warnings hapening in the build process to make Zuul builds clean
Warnings Fixed:
W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
E0702: Raising str while only classes or instances are allowed (raising-bad-type)

Story: 2005892
Task: 43821

Change-Id: I2083fa4f8d994480c79ff557c56cf2f29c56c19f
Signed-off-by: Felipe Desiglo Ferrare <Felipe.DesigloFerrare@windriver.com>
2021-10-29 18:34:41 +00:00
Bin Qian 8cda3639e8 relocate /www to /var/www
Relocate writable /www to /var/www

Story: 2009101
Task: 43543
Depends-on: https://review.opendev.org/c/starlingx/metal/+/810023
Change-Id: Icf0c69acba0693d817de3a538b74740619efa3d0
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2021-10-06 11:03:19 -04:00
Alexandru 005b2d5dc2 Wait for stx-openstack applied before executing the reapply in test_host_management.py
Signed-off-by: Alexandru <alexandru.dimofte@intel.com>
Change-Id: Id9e25dec67a97538d4eebf3886ef2b0a2c3a3ec0
2021-05-17 10:27:53 +03:00
Alexandru 85e345fe08 Wait for stx-openstack applied before executing the unlock in test_host_management.py
Signed-off-by: Alexandru <alexandru.dimofte@intel.com>
Change-Id: I2e09069f5b23de46f056cf00e9bb35b21613e5f0
2021-05-13 11:04:30 +03:00
Zuul c527a66c3b Merge "add performance tests" 2021-02-23 10:47:58 +00:00
Zuul 6188ca6394 Merge "Remove community and trapdest related test cases" 2021-01-22 15:54:57 +00:00
olovaszi 02a0244145 Add test suite Host Management ported from robot framework
Added test suite Host Management

Story: 2007472
Task: 39173

Patch Set 2:
  Added no_duplex fixture in pre_checks_and_configs.py
  Added DUPLEX_SYSTEM SkipSysType in reasons.py
  Test_host_management:
    replaced prints
    added skips to tests according to configuration
    reworked test_lock_unlock_active_controller

Patch Set 3:
  imported ProjVar in test_host_management.py

Patch Set 4:
  removed unused imports
  added reboot active controller testcase
  added reboot standby controller testcase
  added reapply openstack testcase

Change-Id: I8bc27e85ce00d8b9bc4dfa1e81c3234f93164836
Signed-off-by: olovaszi <oliver.lovaszi@intel.com>
Signed-off-by: George Postolache <george.postolache@intel.com>
2021-01-18 09:34:54 +02:00
George Postolache ddc4c5dc3d add performance tests
Description:
  reasons.py:
    added duplex_system reason
  heat_helper.py:
    replaced 'is' with '=='
  host_helper.py :
    in modify_host_memory and get_host_memories converted key to str from int
    unused variables in string format
  network_helper.py:
    in add_icmp_and_tcp_rules removed "protocol" and added egress for icmp
    unused variables in string format
    replaced 'is' with '=='
  security_helper.py:
    unused variables in string format
  storage_helper.py:
    replaced 'is' with '=='
    unused variables in string format
  pytest.ini:
    added robotperformance marker
  performance:
    added performance directory containing performance tests
  fixture_resources.py:
    added missing ',' in _RESOURCE_TYPES list
  pre_checks_and_configs.py:
    added no_duplex
  telnet.py:
    replace 'NotImplemented' with 'NotImplementedError'
  parse_log.py:
    replaced 'is' with '=='

Signed-off-by: George Postolache <george.postolache@intel.com>
Change-Id: I32e84aac33102e57f4b0eb28d9aca0f6684e6b64
2021-01-13 12:02:06 +02:00
Takamasa Takenaka 8e6a55f824 Remove community and trapdest related test cases
-Remove test cases according to the host-based SNMP removal
 -Remove community related test cases
 -Remove trapdest related test cases

Story: 2008132
Task: 41393
Change-Id: I5c698fe2b9eca82971f70e4edabf16af702f4f68
Depends-On: https://review.opendev.org/765381
Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
2020-12-23 08:56:42 -03:00
Yvonne Ding e74db49c91 Added distributed cloud test suites to StarlingX - part2
- test_shared_config_snmp
- test_timezone_unshared

Co-Authored-By: Yang Liu<yang.liu@windriver.com>
Co-Authored-By: Peng Peng<peng.peng@windriver.com>
Co-Authored-By: Difu Hu<difu.hu@windriver.com>

Change-Id: I65da4a0f67073e79203e1e065cbb93ce352e9950
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
2020-11-30 16:11:25 +00:00
Yvonne Ding 92ee9a56ec Added distributed cloud test suites to StarlingX
- test_alarm_aggregation
- test_dc_swact_host
- test_https_unshared
- test_shared_config_dns

Change-Id: I9c0528523c7321d34c60ddccebe31cb0143cc982
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
2020-11-17 10:06:07 -05:00
Yvonne Ding d1e88a989e Use newer flake8 to run on ubuntu-focal Zuul
flake8 2.6.2 failed on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

pylint failed with following error:
ERROR: InvocationError for command /home/zuul/src/opendev.org/starlingx/test/.tox/pylint/bin/pylint
--rcfile=pylint.rc automated-p

upgrade openstackdocstheme to 2.2.1 and update sphinx version
fix releasenotes to use python3

Change-Id: Ie5e11b44a3ff9695a6ec44eaf4a53baababc27ac
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
2020-11-16 13:09:22 -05:00
Zuul 75095b4c50 Merge "add stack to _delete_resources to enable cleanup for heat" 2020-05-14 15:38:41 +00:00
Mihail-Laurentiu Trica 4dfbb03919 Add test suite OpenStack Pod Healthy ported from robot framework
Added Sanity Platform test suite OpenStack Pod Healthy

Story: 2007472
Task: 39165

Change-Id: I55021aed1df2f1e51edc56f2a8e5e804e8ee4161
Signed-off-by: Mihail-Laurentiu Trica <mihail-laurentiu.trica@intel.com>
2020-05-14 09:08:43 +00:00
Ruediger Stock 2eb7d17e24 add stack to _delete_resources to enable cleanup for heat
Story: 2007472
Task: 39171

Change-Id: Ifbce4523340fe721d2bc65e96d05a40a19a082f7
2020-05-14 07:04:24 +00:00
George Postolache 1bfd671cee Fix pylint error for storage_helper
modified is_cepth_healthy to return both status and output

Change-Id: Iebb903bdc3d3720ae537f3f68e539a347b06693e
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-05-04 11:01:11 +03:00
Zuul e8eeb686be Merge "Fix typo in wait_for_heat_status causing it to fail permanently" 2020-04-23 04:06:00 +00:00
Zuul 212be967e2 Merge "Add test suite Measurements For Metric ported from robot framework" 2020-04-23 04:05:57 +00:00
Zuul 1afe250d33 Merge "Test suite instance from snapshot port from robot" 2020-04-23 04:05:19 +00:00
Zuul ee618711b2 Merge "Adding test fault management horizon testcase for StarlingX pytest framework" 2020-04-23 04:00:16 +00:00
Cosmin Albescu 9a400d9101 Test suite instance from snapshot port from robot
- added suite test_instance_from_snapshot

Story: 2007472
Task: 39170

Change-Id: Icdaa8bcb235d7a894c9203f00a8277892b849936
Signed-off-by: Cosmin Albescu <cosmin.albescu@intel.com>
2020-04-14 06:49:37 +00:00
Mihail Trica 353eae3167 Add test suite Measurements For Metric ported from robot framework
Added test suite Measurements For Metric

Story: 2007472
Task: 39172

Change-Id: I3ad46d658164e4bd480b234668fb01fa0f849a6a
Signed-off-by: Mihail-Laurentiu Trica <mihail-laurentiu.trica@intel.com>
2020-04-14 08:47:51 +02:00
Zuul 34e56b1b71 Merge "Test suite instance from volume ported from robot framework" 2020-04-13 18:43:49 +00:00
Zuul 584db43c28 Merge "Test suite instance from image port from robot" 2020-04-13 18:42:49 +00:00
Mazumder Hrishit 0126990ea3 Adding test fault management horizon testcase for StarlingX pytest framework
Include:
-added automated test case for test fault management under horizon

Story: 2007406
Task: 39011

Change-Id: Ic45791f8558b153b6eb5f9105a69e00ea7e60c51
Author: Ankit Jain <ankit.jain@windriver.com>
Co-Authored-By: Hrishit Mazumder <hrishit.mazumder@windriver.com>
Signed-off-by: Hrishit Mazumder <hrishit.mazumder@windriver.com>
2020-04-13 10:57:42 -04:00
Ruediger Stock a07d0307e8 Fix typo in wait_for_heat_status causing it to fail permanently
Story: 2007472
Task: 39171

Change-Id: I5792e76dd35f60dea03c8ded17565b5bf4d07850
2020-04-06 07:42:38 +00:00
Zuul 31e9fe5d30 Merge "Adding keystone user password rules test for StarlingX pytest framework" 2020-04-05 02:23:49 +00:00
Mazumder Hrishit bf901d03ea Adding keystone user password rules test for StarlingX pytest framework
Include:
-added test case for keystone user password rules under security
-editing set_user definition in keystone_helper
-editing create_user definition in keystone_helper
-adding set_current_user_password definition used by the testcase
-editing add definition for updating user dictionary in auth file
-editing get definition to handle attribute error in auth file

Story: 2007406
Task: 39011

Change-Id: I505519c40aa4fc9f58c11bab7ab39175e1c7098d
Author: Yang Liu <yang.liu@windriver.com>
Co-Authored-By: Hrishit Mazumder <hrishit.mazumder@windriver.com>
Signed-off-by: Hrishit Mazumder <hrishit.mazumder@windriver.com>
2020-04-01 17:44:38 -04:00
Zuul 1d935a73de Merge "Update create_flavor and set_aggregate" 2020-04-01 21:05:42 +00:00
Alexandru Dimofte 5e517c3028 Test suite instance from volume ported from robot framework
Added suite test_instance_from_volume

Story: 2007472
Task: 39169

Change-Id: I36667194fe8fa4980707b24b23d52a994d6c9427
Signed-off-by: Alexandru Dimofte <alexandru.dimofte@intel.com>
2020-04-01 22:05:19 +03:00
George Postolache e32cb6361a Test suite instance from image port from robot
Added conftest.py for sanity group which imports the delete_resource
  functions from resource_mgmt
Added conftest.py for sanity_openstack group which contains a fixture
  for creating netwok and subnet used in the suites
Added suite test_instance_from_image

Story: 2007472
Task: 39164

Patch Set 2:
Fixed following pep8 and pylint errors:
  E501 line too long
  E225 missing whitespace around operator
  E222 multiple spaces after operator
  W0106: Expression is assigned to nothing (expression-not-assigned)

Patch Set 3:
  added Signed off by
  added Story
  added Task

Patch Set 4:
  Shoortened the lines to under 100 chars
  Added apache-2
  Added new marker "robotsanity" to pytest.ini
  Modified test markers to use robotsanity instead of sanity
  Commented evacuate instances test

Patch Set 5:
  Commented evacuate instances test, forgot to do it in PS4
  
Patch Set 6:
  Added space after # for comments

Change-Id: Id17e0b65bace265f4bd2166c7bd7258ba76061f4
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-04-01 18:07:22 +03:00
Zuul 189fdcc6d8 Merge "Added new Flavor" 2020-03-27 16:36:54 +00:00
Zuul 4a9fc478e0 Merge "Updated delete_volume_snapshots and create_volume_snapshot" 2020-03-27 16:36:49 +00:00
Zuul 64d6b9edbf Merge "Update vm_helper" 2020-03-27 16:35:58 +00:00
George Postolache a27f38e54e Update vm_helper
Added boot_vm_openstack simmilar with boot_vm but using
  openstack create server instead of nova boot
In boot_vm set source_id into snapshot_id when provided
In resize_vm a formated string was using 2 arguments but 3 were provided
Modified NotImplemented into NotImplementedError in launch_vms and launch_vm_pair

Story: 2007472
Task: 39164

Patch Set 2:
  added space around opperator (pep8)

Patch Set 3:
  added Signed off by
  added Story
  added Task

Change-Id: I1ca8d44915f11d8c756561379f8d0bacb57c0946
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-03-27 14:33:38 +02:00
George Postolache 62dfce126d Added new Flavor
Added LIVE_MIG_MAX_DOWNTIME flavor ('hw:wrs:live_migration_max_downtime')
  to FlavorSpec class

Story: 2007472
Task: 39164

Patch Set 2:
  added Signed off by
  added Story
  added Task

Change-Id: Ie7dea0369b4c1dfba3e2f6917480af83ec148230
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-03-27 14:29:40 +02:00
George Postolache 57cc9f1260 Updated delete_volume_snapshots and create_volume_snapshot
Replaced 'snapshot delete' with 'volume_snapshot_delete' in delete_volume_snapshots
  since 'snapshot delete' is deprecated
Added cleanup logic to create_volume_snapshot
  - added cleanup param defaulting to None
  - added check for valid cleanups
  - used ResourceCleanup to add 'vol_snapshot' cleanup after the snapshot is created

Story: 2007472
Task: 39170

Patch Set 2:
  added Signed off by
  added Story
  added Task

Change-Id: I3a87e79f24fc7cc37b387a7b9e50f1a7293c3de1
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-03-27 14:24:47 +02:00
George Postolache 94621238d7 Update create_flavor and set_aggregate
Removed '--is_public' from args_dict inside create_flavor since it is
  not a valid argument for openstack create flavor, it is just used to
  add either '--public' or '--private' to the comand.

Story: 2007472
Task: 39164

Patch Set 2:
  added Signed off by
  added Story
  added Task

Change-Id: I16cc0d4000ab9313c65a7fa76c66678b4af65956
Signed-off-by: George Postolache <george.postolache@intel.com>
2020-03-27 14:16:15 +02:00
Mazumder Hrishit 54927a2e76 Adding admin password change test for StarlingX pytest framework
Include:
-added automated test case for admin password change under security
-added fixture for openstack apply required in pre_checks_and_configs

Story: 2007406
Task: 39011

Change-Id: I91013336f8a1ee54aa5b74e007b9457b568781ba
Author: Yang Liu <yang.liu@windriver.com>
Co-Authored-By: Hrishit Mazumder <hrishit.mazumder@windriver.com>
Signed-off-by: Hrishit Mazumder <hrishit.mazumder@windriver.com>
2020-03-26 15:07:54 -04:00
Yvonne Ding a98da79ef4 Added k8s pod to pod connectivity for starlingx pytest framework
Include:
-added automated test case for pod to pod connectivity
-added pod related yaml files
-fixed test cases dvr, multiple ports, ping vms, and
vm meta data retrieval

Story: 2007406
Task: 39009

Change-Id: Ib20ee48d4a3769da449dc0fe487ea35cd812fb17
Author: Ayyappa Mantri <ayyappa.mantri@windriver.com>
Co-Authored-By: Yvonne Ding <yvonne.ding@windriver.com>
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
2020-03-19 18:50:23 -04:00
Zuul 4d224ee73b Merge "Added k8s stx-monitor for starlingx pytest framework" 2020-03-18 19:00:59 +00:00
Yvonne Ding 2459832a02 Added k8s stx-monitor for starlingx pytest framework
Include:
-added automated test case for k8s stx monitor
-refactored cluster health check

Story: 2007406
Task: 39010

Change-Id: Id1b1b7f71fb2a5c49aa2ee80a47fc20faa55d676
Author: Kristine Bujold <kristine.bujold@windriver.com>
Co-Authored-By: Yvonne Ding <yvonne.ding@windriver.com>
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
2020-03-18 11:35:56 -04:00
Yvonne Ding 25a3a344de Submission for starlingx pytest framework
Include:
- added automated test cases for k8s hugepage, qos, large amount of
pods on workers
- added openstack check in test_openstack_services
- added test yaml file for k8s kugepage, qos, large amount of pods
on workers

Story: 2007406
Task: 39012

Author: Ayyappa Mantri <ayyappa.mantri@windriver.com>
Co-Authored-By: Yvonne Ding <yvonne.ding@windriver.com>
Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>

Change-Id: I5f795beec2218afae74b9cba356d74cd34d11295
2020-03-16 18:31:18 +00:00
Jim Somerville b7c6c2a168 Security: System security option includes nospectre_v1
Most of the v1 mitigation is baked into the kernel and not
optional.  The swapgs barriers are, however, optional.
They have a negative performance impact so we disable them
by using the nospectre_v1 kernel bootarg.

Partial-Bug: 1860193
Depends-On: https://review.opendev.org/#/c/704406
Change-Id: I6281166c53b13124800b4061ebe08f85d5175d6a
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2020-01-28 18:30:09 -05:00
Yang Liu 299667bada A lab exmple is given in conts/lab.py with ips that are commonly used
in virtual environment.
When the OAM IPs in the example matches partially with what is specified
in testcase config file, the test framework will get confused and return
an error.

This commit is to put the example into comments so there will be no
conflict with actual system under test.

Change-Id: I112aaca08d8bcc6959ffa295216cb2a4d32feda8
Closes-Bug: 1839383
Signed-off-by: Yang Liu <yang.liu@windriver.com>
2019-08-07 16:40:02 -04:00
Yang Liu 33756ac899 Initial submission for starlingx pytest framework.
Include:
- util modules. such as table_parser, ssh/localhost clients, cli module,
exception, logger, etc. Util modules are mostly used by keywords.
- keywords modules. These are helper functions that are used directly by
test functions.
- platform (with platform or platform_sanity marker) and stx-openstack
(with sanity, sx_sanity, cpe_sanity, or storage_sanity marker) sanity
testcases
- pytest config conftest, and test fixture modules
- test config file template/example

Required packages:
- python3.4 or python3.5
- pytest >=3.10,<4.0
- pexpect
- requests
- pyyaml
- selenium (firefox, ffmpeg, pyvirtualdisplay, Xvfb or Xephyr or Xvnc)

Limitations:
- Anything that requires copying from Test File Server will not work until
a public share is configured to shared test files. Tests skipped for now.

Co-Authored-By: Maria Yousaf <maria.yousaf@windriver.com>
Co-Authored-By: Marvin Huang <marvin.huang@windriver.com>
Co-Authored-By: Yosief Gebremariam <yosief.gebremariam@windriver.com>
Co-Authored-By: Paul Warner <paul.warner@windriver.com>
Co-Authored-By: Xueguang Ma <Xueguang.Ma@windriver.com>
Co-Authored-By: Charles Chen <charles.chen@windriver.com>
Co-Authored-By: Daniel Graziano <Daniel.Graziano@windriver.com>
Co-Authored-By: Jordan Li <jordan.li@windriver.com>
Co-Authored-By: Nimalini Rasa <nimalini.rasa@windriver.com>
Co-Authored-By: Senthil Mukundakumar <senthil.mukundakumar@windriver.com>
Co-Authored-By: Anuejyan Manokeran <anujeyan.manokeran@windriver.com>
Co-Authored-By: Peng Peng <peng.peng@windriver.com>
Co-Authored-By: Chris Winnicki <chris.winnicki@windriver.com>
Co-Authored-By: Joe Vimar <Joe.Vimar@windriver.com>
Co-Authored-By: Alex Kozyrev <alex.kozyrev@windriver.com>
Co-Authored-By: Jack Ding <jack.ding@windriver.com>
Co-Authored-By: Ming Lei <ming.lei@windriver.com>
Co-Authored-By: Ankit Jain <ankit.jain@windriver.com>
Co-Authored-By: Eric Barrett <eric.barrett@windriver.com>
Co-Authored-By: William Jia <william.jia@windriver.com>
Co-Authored-By: Joseph Richard <Joseph.Richard@windriver.com>
Co-Authored-By: Aldo Mcfarlane <aldo.mcfarlane@windriver.com>

Story: 2005892
Task: 33750
Signed-off-by: Yang Liu <yang.liu@windriver.com>

Change-Id: I7a88a47e09733d39f024144530f5abb9aee8cad2
2019-07-15 15:30:00 -04:00