-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
52 lines (43 loc) · 1.52 KB
/
Copy pathRakefile
File metadata and controls
52 lines (43 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# frozen_string_literal: true
require 'rake'
require 'rspec/core/rake_task'
task default: :spec
task spec: 'spec:all'
task ssh: 'only:ssh'
namespace :only do
host = ENV['TARGET_HOST'] || '10.1.209.20'
desc 'run ssh within the cluster'
RSpec::Core::RakeTask.new(:ssh) do |t|
puts "Running configuration tests on #{host} ..."
t.pattern = 'spec/services/ssh_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
end
namespace :spec do
host = ENV['TARGET_HOST'] || '10.1.209.20'
task all: %i[services configuration users]
desc 'run configuration tests'
RSpec::Core::RakeTask.new(:configuration) do |t|
puts "Running configuration tests on #{host} ..."
t.pattern = 'spec/configuration/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
desc 'run service tests'
RSpec::Core::RakeTask.new(:services) do |t|
puts "Running service tests on #{host} ..."
t.pattern = 'spec/services/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
desc 'run monitor tests'
RSpec::Core::RakeTask.new(:monitor_cluster) do |t|
puts "Running Monitor tests on #{host} ..."
t.pattern = 'spec/modules/monitor/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
desc 'run user tests'
RSpec::Core::RakeTask.new(:users) do |t|
puts "Running user tests on #{host} ..."
t.pattern = 'spec/users/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
end