Skip to content

Commit 7870b38

Browse files
author
Morgan Haskel
committed
Merge pull request #584 from hunner/fix_spec
Fix specs for #567
2 parents c58f327 + c323cea commit 7870b38

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spec/unit/classes/server_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"PGPASSWORD='new-p@s$word-to-set'",
4747
"NEWPASSWD_ESCAPED='$$new-p@s$word-to-set$$'"
4848
],
49-
'unless' => "/usr/bin/psql -h localhost -c 'select 1' > /dev/null",
49+
'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null",
5050
})
5151
end
5252
end

spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
it "executes with the given port" do
7474
expect(provider).to receive(:run_command).with(["psql",
7575
"-p", "5555",
76-
"-t", "-c", "SELECT something"],
76+
"-t", "-c", "\"SELECT something\""],
7777
"postgres", "postgres")
7878

7979
provider.run_sql_command("SELECT something")

spec/unit/puppet/provider/postgresql_replication_slot/ruby_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def success?
3535
provider.class.expects(:run_command).with(
3636
['psql', '-t', '-c', 'SELECT * FROM pg_replication_slots;'],
3737
'postgres', 'postgres').returns([sql_instances, nil])
38-
instances = type.instances
38+
instances = provider.class.instances
3939
expect(instances.size).to eq 2
4040
expect(instances[0].name).to eq 'abc'
4141
expect(instances[1].name).to eq 'def'

0 commit comments

Comments
 (0)