Project

General

Profile

« Previous | Next » 

Revision 41fa7ebd

Added by Andreas Paul over 10 years ago

fixes #3262 - actually create "cache" file to save the time of the last host facts push

View differences:

spec/unit/foreman_external_node_spec.rb
it "should connect to the URL in the manifest" do
webstub = stub_request(:post, "http://localhost:3000/api/hosts/facts").with(:body => {"fake"=>"data"})
enc.stubs(:stat_file).with('fake.host.fqdn.com').returns("/tmp/fake.host.fqdn.com.yaml")
enc.stubs(:stat_file).with('fake.host.fqdn.com-push-facts').returns("/tmp/fake.host.fqdn.com-push-facts.yaml")
File.stubs(:exists?).returns(false)
File.stubs(:stat).returns(stub(:mtime => Time.now.utc))
enc.stubs(:build_body).returns({'fake' => 'data'})

Also available in: Unified diff