abiquo-installer-tests 20121023.3 → 20121026.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake'
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
8
- gem.version = Time.now.strftime "%Y%m%d.3"
8
+ gem.version = Time.now.strftime "%Y%m%d.1"
9
9
  gem.name = "abiquo-installer-tests"
10
10
  gem.homepage = "http://github.com/abiquo/abiquo-installer-tests"
11
11
  gem.license = "MIT"
@@ -0,0 +1,66 @@
1
+ %define rbname abiquo-installer-tests
2
+ %define version 20121023.3
3
+ %define release 1
4
+
5
+ Summary: Abiquo Installer Unit Tests
6
+ Name: rubygem-%{rbname}
7
+
8
+ Version: %{version}
9
+ Release: %{release}%{?dist}
10
+ Group: Development/Ruby
11
+ License: Distributable
12
+ URL: http://github.com/abiquo/abiquo-installer-tests
13
+ Source0: http://rubygems.org/downloads/%{rbname}-%{version}.gem
14
+ BuildRoot: %{_tmppath}/%{name}-%{version}-root
15
+ Requires: rubygems
16
+ Requires: rubygem-term-ansicolor >= 1.0
17
+ #Requires: rubygem-net-ssh >= 2.0
18
+ #Requires: rubygem-net-scp >= 1.0
19
+ #Requires: rubygem-net-sftp >= 2.0
20
+ Requires: rubygem-iniparse >= 1.0
21
+ Requires: rubygem-mixlib-cli >= 1.2
22
+ BuildRequires: rubygems
23
+ BuildArch: noarch
24
+ Provides: rubygem(Abiquo-installer-tests) = %{version}
25
+
26
+ %define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
27
+ %define gembuilddir %{buildroot}%{gemdir}
28
+
29
+ %description
30
+ Tests and troubleshoot Abiquo installations
31
+
32
+
33
+ %prep
34
+ %setup -T -c
35
+
36
+ %build
37
+
38
+ %install
39
+ %{__rm} -rf %{buildroot}
40
+ mkdir -p %{gembuilddir}
41
+ gem install --no-ri --no-rdoc --local --install-dir %{gembuilddir} --force %{SOURCE0}
42
+ mkdir -p %{buildroot}/%{_bindir}
43
+ mv %{gembuilddir}/bin/* %{buildroot}/%{_bindir}
44
+ rmdir %{gembuilddir}/bin
45
+ rm %{buildroot}/%{gemdir}/cache/%{rbname}-%{version}.gem
46
+
47
+ %clean
48
+ %{__rm} -rf %{buildroot}
49
+
50
+ %files
51
+ %defattr(-, root, root)
52
+ %{_bindir}/abiquo-installer-tests
53
+ %doc %{gemdir}/gems/abiquo-installer-tests-%{version}/README.md
54
+ %{gemdir}/gems/abiquo-installer-tests-%{version}/
55
+ %{gemdir}/specifications/abiquo-installer-tests-%{version}.gemspec
56
+
57
+ %changelog
58
+ * Tue Oct 23 2012 Abel Boldú <abel.boldu@abiquo.com> - 20121023.3-1
59
+ - Added ssh vendor gems. 2.3 tests
60
+
61
+ * Wed Jan 04 2012 Sergio Rubio <srubio@abiquo.com> - 20120104.1-1
62
+ - upstream update
63
+
64
+ * Wed Jan 04 2012 Sergio Rubio <srubio@abiquo.com> - 20120104-1
65
+ - initial release
66
+
@@ -8,7 +8,7 @@ require 'abiquo_lvmiscsi'
8
8
 
9
9
  class AbiquoCIABTest < Test::Unit::TestCase
10
10
  def test_lvm_tomcat_dir
11
- assert File.directory? '/opt/abiquo/lvmiscsi/tomcat/',"lvmiscsi webapp does not exist."
11
+ assert File.directory?('/opt/abiquo/lvmiscsi/tomcat/'),"lvmiscsi webapp does not exist."
12
12
  end
13
13
 
14
14
  #
@@ -17,7 +17,7 @@ class AbiquoCommunityHypervisor < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  def test_abiquo_aim_properties_file
20
- assert File.exist? '/etc/abiquo-aim.ini',"/etc/abiquo-aim.ini does not exist."
20
+ assert File.exist?('/etc/abiquo-aim.ini'),"/etc/abiquo-aim.ini does not exist."
21
21
  end
22
22
 
23
23
  def test_nfs_mounted
@@ -30,7 +30,6 @@ class AbiquoCommunityHypervisor < Test::Unit::TestCase
30
30
 
31
31
  def test_valid_libvirt_conf
32
32
  buff = File.read '/etc/libvirt/libvirtd.conf'
33
-
34
33
  if buff =~ /^auth_tls.*none/ and \
35
34
  buff =~ /^tcp_port.*16509/ and \
36
35
  buff =~ /^auth_tcp.*none/
@@ -1,11 +1,11 @@
1
1
  class NFSRepositoryTest < Test::Unit::TestCase
2
2
 
3
3
  def test_abiquo_repository_file
4
- assert File.exist? '/opt/vm_repository/.abiquo_repository',"WARNING: /opt/vm_repository/.abiquo_repository does not exist."
4
+ assert File.exist?('/opt/vm_repository/.abiquo_repository'),"WARNING: /opt/vm_repository/.abiquo_repository does not exist."
5
5
  end
6
6
 
7
7
  def test_exports_file
8
- assert File.exist? '/etc/exports',"/etc/exports does not exist."
8
+ assert File.exist?('/etc/exports'),"/etc/exports does not exist."
9
9
  end
10
10
 
11
11
  def test_exports_file_contents
@@ -13,11 +13,11 @@ class NFSRepositoryTest < Test::Unit::TestCase
13
13
  File.read('/etc/exports').each_line do |l|
14
14
  count += 1 if l =~ /\/opt\/vm_repository/
15
15
  end
16
- assert(count == 1),"WARNING: Wrong /etc/exports."
16
+ assert(count == 1)
17
17
  end
18
18
 
19
19
  def test_nfs_service_on
20
- assert(::TestUtils.service_on? 'nfs'),"nfs service not enabled."
20
+ assert ::TestUtils.service_on?('nfs'),"nfs service not enabled."
21
21
  end
22
22
 
23
23
  end
@@ -9,11 +9,11 @@ class AbiquoServerTest < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def test_abiquo_properties_present
12
- assert File.exist? '/opt/abiquo/config/abiquo.properties',"abiquo.properties does not exist."
12
+ assert File.exist?('/opt/abiquo/config/abiquo.properties'),"abiquo.properties does not exist."
13
13
  end
14
14
 
15
15
  def test_mysql_schema_present
16
- assert(`mysql -e 'show databases' 2>&1` =~ /kinton/m),"kinton schema does not exist."
16
+ assert `mysql -e 'show databases' 2>&1` =~ /kinton/m,"kinton schema does not exist."
17
17
  end
18
18
 
19
19
  def test_mysql_running
@@ -73,9 +73,6 @@ class AbiquoServerTest < Test::Unit::TestCase
73
73
  assert !config['server']['abiquo.rabbitmq.port'].nil?,
74
74
  "abiquo.rabbitmq.port is missing in abiquo.properties"
75
75
 
76
- assert !config['server']['abiquo.database.user'].nil?,
77
- "abiquo.database.user is missing in abiquo.properties"
78
-
79
76
  assert !config['server']['abiquo.auth.module'].nil?,
80
77
  "abiquo.auth.module is missing in abiquo.properties"
81
78
 
@@ -33,7 +33,7 @@ class AbiquoV2VTest < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  def test_abiquo_repository_file
36
- assert File.exist? '/opt/vm_repository/.abiquo_repository', ".abiquo_repository does not exist."
36
+ assert File.exist?('/opt/vm_repository/.abiquo_repository'),".abiquo_repository does not exist."
37
37
  end
38
38
 
39
39
  def test_tomcat_enabled
@@ -41,11 +41,11 @@ class AbiquoV2VTest < Test::Unit::TestCase
41
41
  end
42
42
 
43
43
  def test_v2v_context_present
44
- assert File.directory? '/opt/abiquo/tomcat/webapps/bpm-async',"V2V context is not present."
44
+ assert File.directory?('/opt/abiquo/tomcat/webapps/bpm-async'),"V2V context is not present."
45
45
  end
46
46
 
47
47
  def test_abiquo_dir
48
- assert File.directory? '/opt/abiquo',"abiquo directory does not exist."
48
+ assert File.directory?('/opt/abiquo'),"abiquo directory does not exist."
49
49
  end
50
50
 
51
51
  def test_abiquo_properties_present
@@ -8,7 +8,7 @@ require 'abiquo_lvmiscsi'
8
8
 
9
9
  class AbiquoCIABTest < Test::Unit::TestCase
10
10
  def test_lvm_tomcat_dir
11
- assert File.directory? '/opt/abiquo/lvmiscsi/tomcat/',"lvmiscsi webapp does not exist."
11
+ assert File.directory?('/opt/abiquo/lvmiscsi/tomcat/'),"lvmiscsi webapp does not exist."
12
12
  end
13
13
 
14
14
  #
@@ -17,7 +17,7 @@ class AbiquoCommunityHypervisor < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  def test_abiquo_aim_properties_file
20
- assert File.exist? '/etc/abiquo-aim.ini',"/etc/abiquo-aim.ini does not exist."
20
+ assert File.exist?('/etc/abiquo-aim.ini'),"/etc/abiquo-aim.ini does not exist."
21
21
  end
22
22
 
23
23
  def test_nfs_mounted
@@ -30,7 +30,6 @@ class AbiquoCommunityHypervisor < Test::Unit::TestCase
30
30
 
31
31
  def test_valid_libvirt_conf
32
32
  buff = File.read '/etc/libvirt/libvirtd.conf'
33
-
34
33
  if buff =~ /^auth_tls.*none/ and \
35
34
  buff =~ /^tcp_port.*16509/ and \
36
35
  buff =~ /^auth_tcp.*none/
@@ -1,11 +1,11 @@
1
1
  class NFSRepositoryTest < Test::Unit::TestCase
2
2
 
3
3
  def test_abiquo_repository_file
4
- assert File.exist? '/opt/vm_repository/.abiquo_repository',"WARNING: /opt/vm_repository/.abiquo_repository does not exist."
4
+ assert File.exist?('/opt/vm_repository/.abiquo_repository'),"WARNING: /opt/vm_repository/.abiquo_repository does not exist."
5
5
  end
6
6
 
7
7
  def test_exports_file
8
- assert File.exist? '/etc/exports',"/etc/exports does not exist."
8
+ assert File.exist?('/etc/exports'),"/etc/exports does not exist."
9
9
  end
10
10
 
11
11
  def test_exports_file_contents
@@ -13,11 +13,11 @@ class NFSRepositoryTest < Test::Unit::TestCase
13
13
  File.read('/etc/exports').each_line do |l|
14
14
  count += 1 if l =~ /\/opt\/vm_repository/
15
15
  end
16
- assert(count == 1),"WARNING: Wrong /etc/exports."
16
+ assert(count == 1)
17
17
  end
18
18
 
19
19
  def test_nfs_service_on
20
- assert(::TestUtils.service_on? 'nfs'),"nfs service not enabled."
20
+ assert ::TestUtils.service_on?('nfs'),"nfs service not enabled."
21
21
  end
22
22
 
23
23
  end
@@ -9,11 +9,11 @@ class AbiquoServerTest < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def test_abiquo_properties_present
12
- assert File.exist? '/opt/abiquo/config/abiquo.properties',"abiquo.properties does not exist."
12
+ assert File.exist?('/opt/abiquo/config/abiquo.properties'),"abiquo.properties does not exist."
13
13
  end
14
14
 
15
15
  def test_mysql_schema_present
16
- assert(`mysql -e 'show databases' 2>&1` =~ /kinton/m),"kinton schema does not exist."
16
+ assert `mysql -e 'show databases' 2>&1` =~ /kinton/m,"kinton schema does not exist."
17
17
  end
18
18
 
19
19
  def test_mysql_running
@@ -73,9 +73,6 @@ class AbiquoServerTest < Test::Unit::TestCase
73
73
  assert !config['server']['abiquo.rabbitmq.port'].nil?,
74
74
  "abiquo.rabbitmq.port is missing in abiquo.properties"
75
75
 
76
- assert !config['server']['abiquo.database.user'].nil?,
77
- "abiquo.database.user is missing in abiquo.properties"
78
-
79
76
  assert !config['server']['abiquo.auth.module'].nil?,
80
77
  "abiquo.auth.module is missing in abiquo.properties"
81
78
 
@@ -33,7 +33,7 @@ class AbiquoV2VTest < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  def test_abiquo_repository_file
36
- assert File.exist? '/opt/vm_repository/.abiquo_repository', ".abiquo_repository does not exist."
36
+ assert File.exist?('/opt/vm_repository/.abiquo_repository'),".abiquo_repository does not exist."
37
37
  end
38
38
 
39
39
  def test_tomcat_enabled
@@ -41,11 +41,11 @@ class AbiquoV2VTest < Test::Unit::TestCase
41
41
  end
42
42
 
43
43
  def test_v2v_context_present
44
- assert File.directory? '/opt/abiquo/tomcat/webapps/bpm-async',"V2V context is not present."
44
+ assert File.directory?('/opt/abiquo/tomcat/webapps/bpm-async'),"V2V context is not present."
45
45
  end
46
46
 
47
47
  def test_abiquo_dir
48
- assert File.directory? '/opt/abiquo',"abiquo directory does not exist."
48
+ assert File.directory?('/opt/abiquo'),"abiquo directory does not exist."
49
49
  end
50
50
 
51
51
  def test_abiquo_properties_present
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiquo-installer-tests
3
3
  version: !ruby/object:Gem::Version
4
- hash: 80484081
4
+ hash: 80484097
5
5
  prerelease:
6
6
  segments:
7
- - 20121023
8
- - 3
9
- version: "20121023.3"
7
+ - 20121026
8
+ - 1
9
+ version: "20121026.1"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sergio Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-23 00:00:00 Z
18
+ date: 2012-10-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: term-ansicolor
@@ -74,6 +74,7 @@ files:
74
74
  - README.md
75
75
  - Rakefile
76
76
  - bin/abiquo-installer-tests
77
+ - rubygem-abiquo-installer-tests.spec
77
78
  - tests/1.7.6/abiquo_ciab.rb
78
79
  - tests/1.7.6/abiquo_kvm.rb
79
80
  - tests/1.7.6/abiquo_lvmiscsi.rb
@@ -389,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
389
390
  requirements: []
390
391
 
391
392
  rubyforge_project:
392
- rubygems_version: 1.8.10
393
+ rubygems_version: 1.8.17
393
394
  signing_key:
394
395
  specification_version: 3
395
396
  summary: Abiquo Installer Unit Tests