Alexandros Kosiaris has submitted this change and it was merged.
Change subject: scap: align spec with other modules
......................................................................
scap: align spec with other modules
Add .rspec with sane defaults
Add Rakfile using the puppetlabs_spec_helper rake tasks.
Under the spec directory, rename 'provider' to 'types'. The former is
not in the puppletlabs helper while the later is. The package provider
is really just a puppet type.
Fix the install step that was failing while try to FileUtils.cd,
probably due to a change in the provider implementation. Mock it.
Bug: T78342
Change-Id: I7b4931519fb89ad7c4ac99013aeb8ae68b08acae
---
A modules/scap/.rspec
A modules/scap/Rakefile
R modules/scap/spec/types/package/scap3_spec.rb
3 files changed, 4 insertions(+), 0 deletions(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/scap/.rspec b/modules/scap/.rspec
new file mode 100644
index 0000000..1156b15
--- /dev/null
+++ b/modules/scap/.rspec
@@ -0,0 +1,2 @@
+--format d
+--color
diff --git a/modules/scap/Rakefile b/modules/scap/Rakefile
new file mode 100644
index 0000000..cd3d379
--- /dev/null
+++ b/modules/scap/Rakefile
@@ -0,0 +1 @@
+require 'puppetlabs_spec_helper/rake_tasks'
diff --git a/modules/scap/spec/provider/package/scap3_spec.rb
b/modules/scap/spec/types/package/scap3_spec.rb
similarity index 98%
rename from modules/scap/spec/provider/package/scap3_spec.rb
rename to modules/scap/spec/types/package/scap3_spec.rb
index 542b677..82cf391 100644
--- a/modules/scap/spec/provider/package/scap3_spec.rb
+++ b/modules/scap/spec/types/package/scap3_spec.rb
@@ -26,6 +26,7 @@
describe '#install' do
it 'should specify the right repo' do
+ allow(FileUtils).to receive(:cd)
expect(@provider).to receive(:execute).
with(['/usr/bin/scap', 'deploy-local', '--repo', 'foo/deploy', '-D',
'log_json:False'],
uid: 666, failonfail: true)
--
To view, visit https://gerrit.wikimedia.org/r/297129
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7b4931519fb89ad7c4ac99013aeb8ae68b08acae
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits