Skip to content

Commit ac97dfd

Browse files
author
Vamsee Kanakala
committed
Update tests for PR #22
1 parent e2dd66d commit ac97dfd

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Solr Module
1+
# Solr Module
22

33
[![Build Status](https://travis-ci.org/vamsee/puppet-solr.png)](https://travis-ci.org/vamsee/puppet-solr)
44

@@ -20,7 +20,7 @@ It's _**highly**_ recommended that you use a mirror like so:
2020

2121
class { 'solr':
2222
mirror => 'http://apache.bytenet.in/lucene/solr',
23-
version => '4.10.3',
23+
version => '4.10.4',
2424
cores => ['development', 'staging', 'production'],
2525
}
2626

spec/classes/config_spec.rb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@
9292
context "when params are passed" do
9393

9494
let(:params) { {
95-
:cores => ['dev', 'prod'],
96-
:version => '5.6.2',
97-
:mirror => 'http://some-random-site.us',
95+
:cores => ['dev', 'prod'],
96+
:version => '5.6.2',
97+
:mirror => 'http://some-random-site.us',
98+
:dist_root => '/opt/tmpdata',
9899
} }
99100

100101
it { should contain_file('/etc/default/jetty')
@@ -149,9 +150,9 @@
149150
it { should contain_exec('solr-download')
150151
.with({
151152
'command' => 'wget http://some-random-site.us/5.6.2/solr-5.6.2.tgz',
152-
'cwd' => '/tmp',
153-
'creates' => '/tmp/solr-5.6.2.tgz',
154-
'onlyif' => 'test ! -d /usr/share/solr/WEB-INF && test ! -f /tmp/solr-5.6.2.tgz',
153+
'cwd' => '/opt/tmpdata',
154+
'creates' => '/opt/tmpdata/solr-5.6.2.tgz',
155+
'onlyif' => 'test ! -d /usr/share/solr/WEB-INF && test ! -f /opt/tmpdata/solr-5.6.2.tgz',
155156
'timeout' => 0,
156157
'require' => 'File[/usr/share/solr]'
157158
})
@@ -161,17 +162,17 @@
161162
.with({
162163
'path' => '["/bin", "/sbin", "/usr/bin", "/usr/sbin", "/usr/local/bin"]',
163164
'command' => 'tar xvf solr-5.6.2.tgz',
164-
'cwd' => '/tmp',
165-
'onlyif' => 'test -f /tmp/solr-5.6.2.tgz && test ! -d /tmp/solr-5.6.2',
165+
'cwd' => '/opt/tmpdata',
166+
'onlyif' => 'test -f /opt/tmpdata/solr-5.6.2.tgz && test ! -d /opt/tmpdata/solr-5.6.2',
166167
'require' => 'Exec[solr-download]',
167168
})
168169
}
169170

170171
it { should contain_exec('copy-solr')
171172
.with({
172173
'path' => '["/bin", "/sbin", "/usr/bin", "/usr/sbin", "/usr/local/bin"]',
173-
'command' => "jar xvf /tmp/solr-5.6.2/dist/solr-5.6.2.war; \
174-
cp /tmp/solr-5.6.2/example/lib/ext/*.jar WEB-INF/lib",
174+
'command' => "jar xvf /opt/tmpdata/solr-5.6.2/dist/solr-5.6.2.war; \
175+
cp /opt/tmpdata/solr-5.6.2/example/lib/ext/*.jar WEB-INF/lib",
175176
'cwd' => '/usr/share/solr',
176177
'onlyif' => 'test ! -d /usr/share/solr/WEB-INF',
177178
'require' => 'Exec[extract-solr]',

spec/classes/init_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'cores' => ['default'],
1414
'version' => '4.7.2',
1515
'mirror' => 'http://www.us.apache.org/dist/lucene/solr',
16+
'dist_root' => '/tmp',
1617
})
1718
}
1819

@@ -23,9 +24,10 @@
2324
context "where params are passed" do
2425

2526
let(:params) { {
26-
:cores => ['dev', 'prod'],
27-
:version => '5.6.2',
28-
:mirror => 'http://some-random-site.us',
27+
:cores => ['dev', 'prod'],
28+
:version => '5.6.2',
29+
:mirror => 'http://some-random-site.us',
30+
:dist_root => '/opt/tmpdata',
2931
} }
3032

3133
it { should contain_solr__params }
@@ -37,6 +39,7 @@
3739
'cores' => ['dev', 'prod'],
3840
'version' => '5.6.2',
3941
'mirror' => 'http://some-random-site.us',
42+
'dist_root' => '/opt/tmpdata'
4043
})
4144
}
4245

vagrant/base.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# With all options
2626
class { 'solr':
27-
mirror => 'http://apache.bytenet.in/lucene/solr',
28-
version => '4.10.3',
27+
mirror => 'http://www.interior-dsgn.com/apache/lucene/solr',
28+
version => '4.10.4',
2929
cores => ['development', 'staging', 'production'],
3030
}

0 commit comments

Comments
 (0)