Statistics
| Branch: | Tag: | Revision:

root / test / py / cmdlib / cluster_unittest.py @ 07e68848

History | View | Annotate | Download (75.4 kB)

# Date Author Comment
5859dad6 10/16/2013 11:59 am Helga Velroyen

Move orphaned unit tests to cmdlib/cluster_unittest.py

Through some merge from 2.9 to master, some unit tests
in the file ganeti.comdlib.common_unittest.py were
no longer referenced in the Makefile and as such not
run anymore. With the introduction of the cmdlib test...

70e8dd0a 10/11/2013 02:13 pm Helga Velroyen

Move unit tests for --file-storage-dir to cmdlib/*

There were some unit tests for the '--file-storage-dir'
option of 'gnt-cluster modify' still left in the unit
test file ganeti.cmdlib.cluster_unittest.py.
With the introducion of the unit test framework for...

916c0e6f 10/11/2013 02:13 pm Helga Velroyen

Move disk template unit tests to test/py/cmdlib/

This patch moves some unit tests related to dis/enabling
disk templates from ganeti.cmdlib.cluster_unittest.py
to cmdlib/cluster_unittest.py to utilized the new cmdlib
unit test framework.

Signed-off-by: Helga Velroyen <>...

537dba0c 10/02/2013 05:55 pm Raffa Santi

Add tests specific to the user/kernelspace access feature

Check that the validation procedures don't accept invalid values
and also don't choke on valid values.

Signed-off-by: Santi Raffa <>
Reviewed-by: Thomas Thrainer <>

9b9e088c 10/02/2013 05:55 pm Raffa Santi

Define 'access' disk-parameter type

Add the "access" parameter to the RBD configuration. Fix test broken
by this change.

Signed-off-by: Santi Raffa <>
Reviewed-by: Thomas Thrainer <>

4256f8fe 09/17/2013 06:45 pm Sebastian Gebhard

Replace more IPs with reserved adresses

Recently, some IP addresses were changed to TEST-NETs from RFC 5737.
This patch changes some more occurences of wrong IPs and replaces them.

TEST-NET-1 is used for primary_ips, TEST-NET-2 for networks and TEST-NET-3 for...

11414807 09/13/2013 02:20 pm Klaus Aehlig

Fix example IPs and hostnames in tests

Our tests are a form of documentation, and hence should use
IPs from the TEST-NET ranges according to RFC 5737. They definitely
should not use real public IP addresses.

Similarly, example host names should be from one of the reserved...

f41b569f 09/12/2013 03:56 pm Thomas Thrainer

Fix testMasterNetmask in TestLUClusterSetParams

The netmask was previously wrongly given as a bitmask, now it's given as
the net prefix length.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

0c5f1b13 09/12/2013 03:23 pm Thomas Thrainer

Merge branch 'stable-2.9' into master

  • stable-2.9
    Fix bridging in net-common
    Sync build_chroot with buildbot slack role
    Auto-upgrade of disks' config wrt LD-renaming
    Fix tests regarding DISK_LD_DEFAULTS
    Fixing renaming of DISK_LD_DEFAULTS
    Replace LD_* constants with DT_* constants...
31ccfc0e 08/27/2013 04:50 pm Helga Velroyen

cluster modify: deprecate --no-drbd-storage

As in the previous patch, the option '--no-drbd-storage'
is deprectated, because it is subsumed by the non-inclusion
of 'drbd' in the list of enabled disk templates.

Signed-off-by: Helga Velroyen <>...

7c577910 08/27/2013 04:50 pm Helga Velroyen

cmdlib/cluster.py: unit tests for usermode helper

This patch factors out the functions that deal with setting
and modifying the DRBD usermode helper in cluster.py in
order to make them more unittestable. The unit tests are
provided as well. No functional changes otherwise....

1583d0e4 08/21/2013 10:27 am Thomas Thrainer

Adapt tests for merged changes in IPolicy handling

The enabled disk templates in IPolicies are stricter checked after the
merge from 2.9, so adapt the tests to follow those changes.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

570b6322 08/13/2013 12:02 pm Thomas Thrainer

Add test for LUClusterVerifyDisks

This LU only creates additional jobs as result, so this is a trivial
unit test.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Guido Trotter <>

9fdb10be 08/13/2013 12:02 pm Thomas Thrainer

Extend unit tests for LUClusterVerifyGroup

- Add tests for additional Verify* methods
- Converted test for VerifyFiles to the new test framework
- Added possibility to prepare the LU in a test class before actually
executing the test method with it

Signed-off-by: Thomas Thrainer <>...

b8f45292 08/08/2013 05:21 pm Thomas Thrainer

Add possibility to access locked LU in tests

This features is useful to test (private) methods of LU's during tests,
where those methods rely on the LU being completely initialized and
locking already performed.

An initial version of unit tests for LUClusterVerifyGroup makes use of...

850be460 08/08/2013 05:20 pm Thomas Thrainer

Add test for LUClusterVerifyConfig

Add unit test covering LUClusterVerifyConfig.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

c60f7675 08/08/2013 05:20 pm Thomas Thrainer

Add test for LUClusterVerify

As this LU returns other jobs as result, submitting jobs from within
LU's is now mocked too.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

08cef8fc 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRename

Also mock the netutils and ssh module in order to test all code paths.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

c487ae24 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRepairDiskSizes

Also add build method for easy building of disk objects to the test
framework.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

f02733cc 08/07/2013 06:52 pm Thomas Thrainer

Introduce shortcut properties for config objects

Some configuration objects are accessed quite often, so introduce
shortcut properties for those.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

a794b8d7 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterSetParams

Some changes to the test framework were performed while writing this
test:
- Extended builder for disks
- Introduced builder for NICs
- Fixed bugs in RpcResultsBuilder

Signed-off-by: Thomas Thrainer <>...

812e07ab 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterPostInit

Also extract common assertion logic for hook invocations to
CmdlibTestCase.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

b730e2a7 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterQuery

Unit-test LUClusterQuery. Some changes in the mocked cluster
configuration are made, because the configuration was not completely
valid before.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

6aac41fa 08/07/2013 06:52 pm Thomas Thrainer

Add unit test for LUClusterRedistConf

Unit-test LUClusterRedistConf. Given the simplicity of the LU, this unit
test only exercises the LU code.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

bd6fb93b 08/07/2013 06:52 pm Thomas Thrainer

Add unit tests for LUClusterDestroy

This patch adds unit test for the LUClusterDestroy Logical Unit.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

0e1b5262 08/07/2013 06:51 pm Thomas Thrainer

Move cluster-related unittest to cluster_unittest

cmdlib_unittest should still be split further, but at least the cluster
related tests are moved to the proper file yet.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

eb172e55 08/07/2013 06:51 pm Thomas Thrainer

Add unit tests for LUClusterConfigQuery

Also, proper initialization of the runtime architecture information was
added.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

e0b8df13 08/07/2013 06:51 pm Thomas Thrainer

Add unit test for LUClusterDeactivateMasterIp

This patch adds unit tests for the LUClusterDeactivateMasterIp Logical
Unit.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

19830e88 08/07/2013 06:48 pm Thomas Thrainer

Add unit test for LUClusterActivateMasterIp

In order to properly assert the called RPC method, eq is implemented
on ConfigObject as well.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>