/usr/lib/obs/tests/appliance/spec/features/0000_set_workers_spec.rb is in obs-server 2.7.1-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | require "spec_helper"
RSpec.describe "Basic Setup for appliance tests" do
it "should be able to reconfigure worker" do
file_name = "/etc/sysconfig/obs-server"
text = File.read(file_name)
new_contents = text.gsub(/OBS_WORKER_INSTANCES=.*/, "OBS_WORKER_INSTANCES=1")
File.open(file_name, "w") {|file| file.puts new_contents }
system("/etc/init.d/obsworker stop")
system("/etc/init.d/obsworker start")
end
end
|