Commit Graph

27 Commits

Author SHA1 Message Date
Chandan Kumar 76f85d4ca1 Remove bundled intree tempest plugin
* https://review.openstack.org/#/c/530454/ moves the
  monasca_log_api tempest plugin to monasca tempest plugin
  Let's consume it.

* Moved contrib to root folder and removed dummy pre_test_hook.sh

Change-Id: I1a73fdf0d10045326dc9ca09fd1c9b485a420089
2018-04-10 16:39:05 +02:00
Adrian Czarnecki 875127d283 Fix tempest test
Improve exception handling this
fix ..if_body_is_empty test

Start using temestest from
monasca-tempest-plugin repository

Story: 2001400
Task: 12524

Depends-On: Ib3ff312fdf2a1d9d22f156ff27e6e1b6c7adcb88
Change-Id: I85f36dbadef1f385907deb5672b1f75bf7f005ec
2018-04-09 10:06:55 +00:00
Tomasz Trębski 71f0bdfb8c Enable UWSGI support in monasca-log-api
Community has set a community wide goal
in Pike cycle: "Control Plane API endpoints deployment via WSGI" [1].
monasca-log-api is already capable of being deployed under mod-wsgi but
not under uwsgi. This commits enables that feature. Until Queens release
API will hence support:

* gunicorn
* mod_wsgi (remove in Queens)
* uwsgi (preffered)

Refs:
[1]:
https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html

Story: 2001464
Task: 6180

Change-Id: Ie4a94c9c2e166915c3f4a1783dc3527f4eb62f29
2018-01-16 14:36:45 +01:00
Tomasz Trębski 9c163622e2 Migrate log integration test to ZuulV3
- define .zuul.yaml to contain new job definitions
- move gate hooks to appropriate location

Story: 2001238
Task: 5763
Task: 5766

Depends-On: I263b1a92a9ec7b5e38d9c1dc8b02e214102a92c2
Change-Id: Icfb32df7e083c2c58c89fa3d2fe9a3eacfda6beb
2017-10-24 08:15:57 +00:00
Vu Cong Tuan e6210f058a Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:ad
* manager > os_primary [1]
* admin_manager > os_admin [2]
* os_adm > os_admin [3]
* os > os_primary [4]
* alt_manager > os_alt [5]

[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/467852/
[3] https://review.openstack.org/#/c/467605/
[4] https://review.openstack.org/#/c/466991/
[5] https://review.openstack.org/#/c/457555/

Change-Id: I2afb94d4f4fcdda1b88ebd90a80c24cfa36f110b
2017-10-18 10:03:37 +00:00
Hangdong Zhang ed3a3f0512 Update the documentation link for doc migration
Change-Id: Ic12495a215fc64ece62b9694c9154fed592b8593
2017-07-21 13:38:58 +08:00
Jenkins 1c0d256aa6 Merge "Fix tempest test for empty_body" 2017-07-03 08:57:58 +00:00
wachowskij 0a82af18ab Fix WSGI startup script
Currently mod_wsgi returns the following error:
Target WSGI script '/var/www/monasca-log-api/monasca_log_api'
does not contain WSGI application 'application'.

Also fix a type in README.

Change-Id: Ic70c3ddb8aaa076c09fc2434f6e890be24b599d5
2017-06-29 14:33:36 +02:00
wachowskij 8395231400 Fix tempest test for empty_body
Depending on the actual server in which monasca-log-api
is running, the error code for empty body may differ.

For example, for mod_wsgi the error code is 411,
but, on the other hand, gunicorn (devstack's setup)
returns 422. Since the actual error code is not that important,
simply accept all of them.

Change-Id: I6ab160148863f38b08172eee430ebce4c3e9e04d
2017-06-28 12:16:05 +02:00
Tomasz Trębski 21493ac9cf Ensure and verify utf-8 support
Added proper handling of unicode messages by expiclit
usage of unicode and utf-8 encoding for Python2.
For Python3 it was just sufficient to ensure that message
is properly UTF-8 encoded. Results of that change can be examined
inside Kibana (or using link [2]).

To prevent any regression, a set of unicode messages has been
added. It contains:

* 'Unicode is evil...' sentence translated to several languages
* border conditions of UnicodeStressTest [1]
* some funnier examples just because programming is fun

Extra:
* unified setting up API test case

[1]: http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
[2]: https://pasteboard.co/x9gQqicR.png

Story: 2001084
Task: 4734

Change-Id: I36e3c2f1ea5788ecb19089089d84924b7d6666bf
2017-06-23 09:54:04 +02:00
Witold Bedyk 9bb918197e Fix cross-tenant logs submission
* add 'delegate_roles' configuration option

Change-Id: If4952b84536ef058d91f6ee2332076dc448d97bd
2017-06-03 14:19:52 +02:00
Dobroslaw Zybort 9018920493 Replace test.attr with decorators.attr
Function 'tempest.test.attr()' has moved to 'tempest.lib.decorators
.attr()' in Pike and will be removed in a future version[1].
This patch replaces the 'tempest.test.attr()' with the 'tempest.lib
.decorators.attr().'

[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2

Change-Id: Ia9bf03fab71066a5fe8d7653fc62a0918e347136
2017-05-19 07:16:24 +00:00
Tomasz Trębski 81d68d22b4 Enable tempest tests with uwsgi keystone
Adjusted log-api devstack configuration
to works with uwsgi deployed keystone.
It is done by removing custom pieces
of configuration regarding keystone
communication and replacing that with
devstack utilities wherever it is possible.

Summary:
* using configure_auth_token_middleware for log-api
  configuraton file
* removed custom tempest.conf
* using devstack/openrc to generate environmental
  variables OS_ containing necessary details for tempest.conf

Extra:
* moved kibana_version into monitoring group

Story: 2000995
Task: 4183

Depends-On: I22686d05670fc6c947611f8044dea498239a4212
Change-Id: Ia95b3bef2734d639c6fec57484b60bc5377d659f
2017-05-02 19:02:55 +00:00
Ken'ichi Ohmichi 4fcbb8e96c Switch to use test_utils.call_until_true
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.

Change-Id: Idfbd20c31246ec884ad10f9fce42816ce5f15bf3
2017-02-14 09:32:42 +00:00
Tomasz Trębski d0018748ca Fix the Monasca Log API tempest tests
The Tempest Manager class must have changed and the service
argument apparently no longer exists. Instead, it was being set
as the scope which caused the catalog to not be retrieved

See-also: If934bac4e2cd833fe4e381c373218383354969ec
Change-Id: I43c023e91eb93e2c19096b0de812eabf7b2db62c
2017-01-09 07:38:58 +01:00
wachowskij 0e62eaca25 Fix tempest tests
* sending 'None' as a request body implies header
'Content-Length: 0', but the test was expecting
no header.
* invalid parameters were passed to call_until_true

Depends-On: Icce74fd6d7e674f408277e328468bedbc3d0aa6b
Change-Id: Ia4fc7cdec0a38d0b46aadfedd6cc9919edaa1963
2016-12-20 14:55:29 +01:00
wachowskij bd3a16a97d Uprade ELK tarballs
* Kibana 4.4.0 -> 4.6.3
* ElasticSearch 2.2.0 -> 2.4.2
* LogStash 2.2.0 -> 2.4.1

Change-Id: I73d8990a35a5a0220050e4e0302d66afb3176bd9
2016-12-09 11:35:35 +00:00
Tomasz Trębski 900e32ad8e Adjust monasca-log-api devstack to Xenial
Following change allows to run monasca-log-api
devstack plugin on the Xenial environment.
That was implemented with the help of:
* start/stop of processes handles through run_process
  and stop_process & no services files
* setting up environment using devstack functions
** monasca-log-api virtual env (USE_VENV)
** installing monasca-log-api dependencies from git
** saving data in keystone catalog with Openstack CLI

Additionally added method that downloads tarballs
only if they are not found in the system.

Change-Id: I08b2ddbe17b2c7899056a63a5633070ae9a2c2db
2016-12-07 10:18:09 +00:00
Dobroslaw Zybort d105b4e101 Fix config-generator.tempest.conf path in README
Remove referencess to dead repositories.

Change-Id: Ib4b06370090bd35b41bd7841bf59b02b8ca5430f
2016-10-10 14:14:21 +02:00
Luong Anh Tuan be4e247cfe Fix typo: remove redundant 'the'
Change-Id: Ifc4cf20d2118c7247b088b088479ccd189f1ae1f
2016-10-03 11:38:46 +07:00
Nguyen Hung Phuong 7175ff0c55 TrivialFix: Remove config import unused
This patch removes config import unused in
monasca_log_api_tempest/services/log_api_v2_client.py
monasca_log_api_tempest/services/log_api_v3_client.py

Change-Id: Ided6ab3f8dd0476972b82de43d5ca6ce94bc90e1
2016-09-15 17:28:17 +07:00
Witold Bedyk d52f1fd1f5 Add tempest tests for Log API v3
Change-Id: I46c0fd4e5119ad04dce2a2d15af196ba262b3a81
2016-08-29 14:09:59 +02:00
Witold Bedyk 71ec276071 Set up tempest tests for gate job
* update credentials provider
* add log V2 endpoint
* add log-search endpoint

Change-Id: I3800f2890e689146c8eb807002825bcf0001d65a
2016-08-10 10:30:43 +02:00
Tomasz Trębski 264ddd3c3f Truncating too big message
If message that is about to be sent to kafka exceeds maximum allowed size
(i.e. log_publisher.max_message_size), log's message being part of
it is truncated by the difference between maximum and current size.
With this message can be still sent to kafka instead of being
dropped.

Change-Id: Ide1d369a0f58efb3a56b22c47118d2aa062fdc09
2016-06-16 09:49:10 +02:00
Artur Basiak 2c42e57554 Tempest tests modification
Change includes:
- modification to use newest Tempest version
- modification of using new Kibana
- modification of using ElasticSearch queries

Change-Id: I616d21900501c0d3ebd88176e4f589039f032636
2016-05-13 14:10:19 +02:00
Tomasz Trębski 1feaa74013 Validating message size
Received request's content should be validated if
its size does not exceed allowed value. Bytes refers
to byte size of the object instead of amount
of characters. This change is required in order
to reject those meesages that couldn't be processed
by Kafka queue.

Changed:
- added payload size validation to Python
- added validation of message size that it sent to Kafka
- reworked validation of message size in Java

Change-Id: I2acc647550d7c851a5715a7cf44f749db1f54d7b
2015-12-10 12:29:58 +01:00
Tomasz Trębski d2d50f42d4 Migrating tempest to project
- moving tempest test from old location
to the project

Change-Id: I018a898a621163d3d058e1c3950ae00b53944f84
2015-12-09 12:13:53 +01:00