146 Commits

Author SHA1 Message Date
Frank Zhang
8b89494a35 CLOUDSTACK-6278
Baremetal Advanced Networking support
2014-09-18 16:54:37 -07:00
Rohit Yadav
a66127dfb1 utils: add methods to save and load public and private keys
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 15:40:49 +02:00
Rohit Yadav
12ad5ba197 SAMLUtilsTest: just test that random secure string has some length
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-30 15:37:52 +02:00
Rohit Yadav
1ed532fb20 SAMLUtils: add unit test for SAMLUtils and method to randomly generate X509 certs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:26 +02:00
Daan Hoogland
3268f5bd1f CLOUDSTACK-6747 test for test to allow all cidrs on other end of a vpc 2014-06-25 17:09:19 +02:00
Daan Hoogland
d90b8d88ed Revert "CLOUDSTACK-6747 test for test to allow all cidrs on other end of a vpc"
This reverts commit 218c4713ae796bcb0002f12421d24dfee9a5320f.
2014-06-25 17:06:10 +02:00
Daan Hoogland
218c4713ae CLOUDSTACK-6747 test for test to allow all cidrs on other end of a vpc 2014-06-25 16:58:52 +02:00
Daan Hoogland
cd3b027f44 findbugs: unit test coverage on the utils package 2014-06-25 15:43:08 +02:00
Sheng Yang
a93a30595d CLOUDSTACK-6854: Fix inconsistent IPv6 address formats
fc00:0003:1373::0002 should be treated the same as fc00:3:1373::2.
2014-06-23 10:54:12 -07:00
Damodar Reddy
1d0b14673d CLOUDSTACK-6354 : removing the hard coding of key path in EncryptionSecretKeyChecker 2014-04-10 11:44:18 +05:30
Laszlo Hornyak
5f800f2d22 Script cleanup
- new negative tests
- some copy-paste replacement in the code

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-03-30 23:27:40 +02:00
miguelaferreira
ef547108dd NetUtils testing
- Refactor tests:
  - Upgrade tests to use jUnit4
  - Add hamcrest dependency (contribution of by Laszio Hornyak)
  - Break big tests in small unit tests
  - Replace assertTrue/False with complex conditions by assertThat with
specific matchers
- Remove dead code:
  - Private static method never called locally
- Add test for method that validates cidrs

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-25 19:23:13 +01:00
Antonio Fornie
808c6df6d7 Fix and add some Rest unit and IT tests. Fix by adding a missing type of RoutingConfig.
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-19 09:30:57 +01:00
Hugo Trippaers
594b51c629 Fixup the license headers in the utils project. All files now use the same license header and this is enforced by the maven-license-check plugin. 2014-02-18 12:08:36 +01:00
Hugo Trippaers
a369647bca Fix license headers 2014-02-18 10:16:31 +01:00
Antonio Fornie
510972abde Nvp and rest refactoring and more tests
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-18 09:51:54 +01:00
Hugo Trippaers
97bad4f9b3 Fix checkstyle and license issues 2014-02-14 18:37:47 +01:00
wrodrigues
3199de69fe Fixes on Contrail and Mon InMemory plugins; adding comments about the changes.
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-14 18:37:47 +01:00
Laszlo Hornyak
351ccf3755 Cleanup in UriUtils.getUpdateUri
- String instantiation replaced with StringBuilder and empty string constant

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-11 20:44:57 +01:00
Laszlo Hornyak
59364ee9a4 Added test for UriUtils.getUpdateUri
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-11 20:43:49 +01:00
Hugo Trippaers
6c770958f1 Fix unittest issue when you are in a locale that uses comma for decimal separation. 2014-02-11 14:45:45 +01:00
Laszlo Hornyak
8ed9162de7 Cleanup in UriUtils.encodeURIComponent
- StringBuffer replaced with StringBuilder
- nullcheck of tokens array removed since String.split does not return null
- unit test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 21:57:07 +01:00
Laszlo Hornyak
8d801bffab Replaced String concatenation in loop
Replaced String concatenation in loop with StringBuilder
Unit test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 21:27:28 +01:00
Daan Hoogland
b3829e54d6 CLOUDSTACK-6020 ipv4 address can be a larger number then
Interger.MAX_VALUE
2014-02-04 18:40:18 +01:00
Daan Hoogland
62c9343658 compare null to non-null or not-empty-string 2014-01-06 11:28:50 +01:00
Daan Hoogland
b477e4e830 some xtra cases 2013-12-31 12:52:51 +01:00
Daan Hoogland
2cf356e047 isSameIsolationId 2013-12-31 12:25:17 +01:00
Jayapal
07de75191c Revert "CLOUDSTACK-4622:If a VM from guest network is added to network tier of VPC then IP reservation allows the CIDR to be a superset of Network CIDR for that VPC tier"
Reverting this commit as it is breaking vpc deployment, CLOUDSTACK-5652

This reverts commit ab4f095c68d4a4b4fb354b3d95096b193706987d.
2013-12-27 11:15:33 +05:30
Saksham Srivastava
ab4f095c68 CLOUDSTACK-4622:If a VM from guest network is added to network tier of VPC then IP reservation allows the CIDR to be a superset of Network CIDR for that VPC tier
Signed-off-by: Jayapal <jayapal@apache.org>
2013-12-26 16:58:04 +05:30
Min Chen
f420b74890 CLOUDSTACK-5355: addImageStore should not log password in clear text in
the log.
2013-12-03 16:55:26 -08:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
224f479974 Removed trailing spaces 2013-11-21 04:08:01 -08:00
Alex Huang
8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Laszlo Hornyak
58477834b6 InputStream use fix in PropertiesUtil
- use PropertiesUtil.loadFromFile to read the properties
- test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-26 17:47:34 +02:00
Darren Shepherd
81d01369d7 Merge commit 'df728fcf41ba0dfddabfaadea8cbcb77d18bfa96'
Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2013-10-23 12:31:53 -07:00
Laszlo Hornyak
4b530c874f Safe properties loader
- new utility method introduced in PropertiesUtil to load properties objects from files
- RegionManagerImpl modified to use the utility method
- Tests added for both

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-23 20:50:00 +02:00
Darren Shepherd
323bbccd50 Add unit tests for Transaction 2013-10-17 16:07:11 -07:00
Marcus Sorensen
d430473fe0 add missing license headers to PasswordGeneratorTest.java and an agent.properties 2013-10-14 11:56:21 -06:00
Laszlo Hornyak
47dd1c1e95 PasswordGenerator tests
- StringBuffer replaced with a StringBuilder
- tests added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-11 20:09:37 +02:00
Laszlo Hornyak
982db550eb test fix: no assertion on the number of fileds returned
Removed the assertion on the number of fields from ReflectUtil because it did not work with bytecode manipulation like what sonar works with.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-11 18:49:10 +02:00
Laszlo Hornyak
d1dd85a4c4 ReflectUtil: test for getAllFieldsForClass
- code comment turned to javadoc
- added braces to if and for statements to make it look more like the rest
- tests added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-09 20:39:41 +02:00
Laszlo Hornyak
826c69fd29 ConstantTimeBackoff test and cleanup
- javadoc changed - the old one was copy-pasted from AgentShell
- start and stop method removed - they did the same as the overridden methods
- _counter removed as it was only written, but never read
- remove from _asleep map was moved to a finally block, to make sure it is removed even in case of the thread gets interrupted
- Tests created for the above scenarios.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-04 11:24:43 -07:00
Laszlo Hornyak
b44bc9db02 NumbersUtil cleanup
- removed methods that were not used
- parseLong, parseInt and parseFloat replaced with the commons-lang NumberUtils call
- Test for the remaining methods

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-10-02 10:55:00 +02:00
Darren Shepherd
cba8e40e4b Add license headers to fix build 2013-09-30 09:51:45 -07:00
Laszlo Hornyak
13e7a7308b Test for URLEncoder
- test added
- source formatted

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-09-30 15:03:12 +02:00
Daan Hoogland
5338aaa39f use locale when formatting numbers 2013-09-24 15:53:32 +02:00
Hugo Trippaers
5ada5e88f3 This test appears to be locale sensitive, so fix the locale in the test 2013-09-24 18:30:00 +08:00
Hugo Trippaers
8b6dcf8b6e Clean out a few warnings on potential resource leakage 2013-09-21 15:32:52 +08:00
Wei Zhou
eb59c3c601 CLOUDSTACK-4314: fix dir error in ProcessUtil.pidCheck and Revert commit 9375aa9467c3855f28c6753d1eb4932a6f1a0e6f 2013-08-14 09:41:13 +02:00
Wei Zhou
9375aa9467 fix build failure with master branch for ProcessUtilTest 2013-08-13 23:22:21 +02:00