Commit Graph

23 Commits

Author SHA1 Message Date
Michal Nasiadka 68c8acba39 Remove execution bit on unnecessary files
Change-Id: Ia41b843fdf20154750b129a8ab5dd42f5c3989fb
2024-02-19 00:30:21 +00:00
yatin fd3c9ef6dd Copy cluster nodes logs always whether tests pass or fail
- Use addOnCleanup instead of addOnException. This will make copy
  logs to run  whether tests pass or fail.
- Also try to copy logs if setupClass Fails.

Change-Id: I76b135ade4c1ed4987f9bcbe1d5ded09ad57deb9
2017-07-18 05:32:31 +00:00
coldmoment ba8ad5e37f Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done at the point
of the logging call.
See the oslo i18n guideline
* https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
and
* https://github.com/openstack-dev/hacking/blob/master/hacking/checks/other.py#L39

Change-Id: I8a4f5f896865aebbff88ee894f0081e58cfce9ef
2017-07-15 14:49:45 +08:00
yuanpeng 71d25456d2 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: If1f4bd2f6be967368f52fb367c5a428d3eb58a9d
Closes-Bug:#1674551
2017-03-30 17:05:10 +08:00
Jaycen Grant 8a6c6a32c2 Rename Bay to Cluster in functional tests
This patch updates the functional tests to use the client cluster
commands instead of bay commands. Bay and BayModel tests remain
in the functional API tests to test backwards compatiblity, but
all other functional tests will use the new Cluster and
ClusterTemplate versions.

Change-Id: Ib86f39caba04b7e81754da2db51d36470c4f3660
Implements: blueprint rename-bay-to-cluster
2016-08-31 09:00:11 -07:00
yatin 272903ff9e Revert "Update mesos slave to mesos agent"
This reverts commit 15162ce33a.

Mesos services were not working, so reverted the patch
which renamed slave to agent.

Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
2016-08-30 08:49:45 +05:30
Jaycen Grant eaddb942fd Rename Bay to Cluster in api
This is the first of several patches to add new Cluster commands
that will replace the Bay terminalogy in Magnum. This patch adds
the new Cluster and ClusterTemplate commands in addition to the
Bay and Baymodel commands.  Additional patches will be created
for client, docs, and additional functional tests.

Change-Id: Ie686281a6f98a1a9931158d2a79eee6ac21ed9a1
Implements: blueprint rename-bay-to-cluster
2016-08-17 22:24:45 +00:00
yatin karel fb0057c105 Add i18n translation for Log messages
Added i18n translation to all log messages. Also added
hacking check for this to ensure in future all log
messages are translated.

Change-Id: I77fbb18ffe47b12232125cc1fa7aae97ea9b1214
Closes-Bug: #1603759
2016-08-15 11:44:08 +05:30
OTSUKA, Yuanying 7963f205ce Fix copying logs from nodes
`_get_nodes_from_stack` will be never called because `_get_nodes_from_bay`
always return un-empty list if master_addresses and node_addresses are
None. So we can't get logs unless bay is succeeded to create.
This patch fixes this issue, so we can get node logs if bay is not create
completed.

Change-Id: I6e518359d08cf06e95adc0b324c934c8f3e0c27d
Closes-Bug: #1605092
2016-08-05 17:12:52 +09:00
Hongbin Lu b3de59206d Create a base class for tempest tests
The tempest tests (gate-functional-dsvm-magnum-api) requires
importing modules that other tests don't require. Right now, we
import tempest modules in the common base class, which is
undesirable. This commit splitted tempest codes out so that other
tests don't need to import tempest modules.

Change-Id: I4871acdc27d66e098e2321809d7d31d4e8416abf
Related-Bug: #1596778
Closes-Bug: #1553035
2016-07-28 17:59:03 -05:00
Rajiv Kumar 15162ce33a Update mesos slave to mesos agent
Mesos community has renamed slave to agent. This change reflect
this renaming in the code.

Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682
Closes-Bug: #1516188
2016-07-18 08:51:17 +05:30
Hongbin Lu 3961e3cb86 Gate: fix the credential object type error
Tempest changed its interface of credential [1] which caused Magnum
tests to fail. This commit updated the usage of credential in
Tempest tests. Also, added a check to avoid deleting baymodel if
None.

[1] https://review.openstack.org/#/c/327579/

Closes-Bug: #1592187
Change-Id: Ie81c360106d4f7725a2ffbc44ea635979774b55b
2016-06-13 17:59:18 -05:00
Hongbin Lu d1263387a6 Copy logs if test failed and bay nodes existed
If the bay is pending on CREATE_IN_PROCESS, it won't contain the
IP addresses of the nodes. Therefore, we need to get them from
the Heat stack if missing.

Closes-Bug: #1571272
Change-Id: I487f9000b4c229be3e1b576258473e39cda66f9e
2016-05-05 17:19:23 -04:00
Jenkins ee9472c88d Merge "Functional: Add prefix when copy logs on failure" 2016-05-04 07:49:11 +00:00
Eli Qiao d560cbddff Replace tempest-lib with tempest.lib
tempest-lib is deprecated for future bug-fixes and code changes
in favor of tempest.

On gate testing, we installed tempest from source code so remove
it from test-requirements.txt.
Closes-Bug: #1553047
Change-Id: I405ad31e1c218868c6dbffb967a755163674fc80
2016-05-03 02:12:30 +00:00
Eli Qiao 114c18a9f7 Functional: Add prefix when copy logs on failure
It's hard to indentify which node is master and which is slave now, add
prefix `master` or `node` to logs directory on functional testing
failure.

Change-Id: Ida739845d5276d53b037ac32dcb1b72bc717936f
2016-04-25 12:59:26 +00:00
Dane LeBlanc dffbabcdc7 Log copy for failed functional tests cannot be disabled
Setting the following in functional_creds.conf doesn't have any effect
for failed functional container tests:
    copy_logs = False

Description of changes/issues addressed:
- Client functional tests look in functional_creds.conf for the
  copy_logs setting while tempest/api tests look in tempest.conf.
  So an accessor method 'get_copy_logs' is added for BaseMagnumTest
  (for tempest tests), and this gets overridden by BaseMagnumClient.
- Call to lamda was missing an argument in copy_logs_handler.
- set_copy_logs in config.py was setting cls.copy logs inconsistently
  (sometimes boolean True, otherwise to a string).
- BaseMagnumClient was calling bool() on a string: "bool(copy_logs)".
  bool() on a string always returns True except for null string.

Change-Id: I234fd0433602914fdf03f04f2394f6dc802df4fd
Closes-Bug: #1570949
2016-04-18 11:22:01 -04:00
dimtruck 7d524491c8 Copy logs on test failure
This patch will copy logs from nova servers to local environment
on test failures.
Don't delete bays until teardown so log gathering will work.
Give functional test types a common base.

Added timeout to docker ps; else, the command would time out,
failing to run the rest of the tests.

Closes-Bug: 1542390
Change-Id: I016ed8fe311bede407f57b7982126c4b77749bec
Co-Authored-By: Corey O'Brien <coreypobrien@gmail.com>
2016-02-29 10:25:10 -06:00
dimtruck 6ccda1ad10 Add magnum certificate api tests
This patch will add cert API test for signing and showing
certificates.

The tests for certificates are integrated into test_bay
tests in order to reuse an already existing bay for
cert testing.  As a side effect, this patch also
combines update bay test with create, list, and delete
to minimize the time spent waiting on bay create.

Implements: blueprint magnum-tempest

Change-Id: Ifbb4c779376fa401ca2538aba5097f7af8b4973e
2016-02-12 09:47:41 -06:00
Corey O'Brien d52965d2d0 Improve Tempest credential provider usage
Instead of getting a DynamicCredentialProvider directly, use the
get_credentials_provider function. This allows for configuration via
TEMPEST_ variables, but the default will still be dynamic credentials.
Only create the default keypair for tests if it doesn't already exist.
Ensure that credentials are freed by calling clear_creds in all cases.

Change-Id: I62ad5ed9fe7c9f6675989df459f92194bb8d67a8
Implements: blueprint magnum-tempest
2016-01-22 15:13:42 -05:00
dimtruck a66a532c99 Add magnum bay api tempest tests
This will add magnum bay CRUD tempest tests

The timeout to create bays is set to 10 minutes,
which may need to be tweaked based on how long it
takes to spin up a bay.

Implements: blueprint magnum-tempest

Change-Id: If4a34d7fd317e10b55d5f07bd51ffe37e6d4bc20
2016-01-11 14:28:13 -06:00
dimtruck 5dc3211b71 Swithc to using dynamic credentials in tempest tests
Switch to using DynamicCredentialProvider, which
provides a unique non-admin user per test case, making
it possible to functional test in parallel.

Change-Id: I6bb5d493bb01d0dd2b4cd092f87f111b13b1fe02
2016-01-05 16:35:20 -06:00
dimtruck 87db63227e Functional tests with Tempest - BayModel CRUD
This patch will add functional test coverage for
baymodels.  It sets up tempest-lib and core
framework architecture with clients, models,
and data generator abstractions.

Partially implements: blueprint magnum-tempest
Change-Id: I9f4bf4293544ef1fe2a6b8aa209df49ddaabd04b
2015-09-21 16:27:07 -05:00