From e58646425f4baf0156beb49868b8b15c4fe8f2e7 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 23 Jul 2019 12:53:43 -0700 Subject: Duration field in resource report needs to be String Somehow this got converted to a bare integer in Chef-15 refactoring which causes the server-side to reject it, so reverting back to the old format. Closes #8532 Signed-off-by: Lamont Granquist --- spec/unit/resource_reporter_spec.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec') diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb index a2ae786bb4..1d7fd7fc79 100644 --- a/spec/unit/resource_reporter_spec.rb +++ b/spec/unit/resource_reporter_spec.rb @@ -447,6 +447,7 @@ describe Chef::ResourceReporter do # TODO: API takes integer number of milliseconds as a string. This # should be an int. expect(@first_update_report).to have_key("duration") + expect(@first_update_report["duration"]).to be_kind_of(String) expect(@first_update_report["duration"].to_i).to be_within(100).of(0) end @@ -585,6 +586,7 @@ describe Chef::ResourceReporter do # TODO: API takes integer number of milliseconds as a string. This # should be an int. expect(@first_update_report).to have_key("duration") + expect(@first_update_report["duration"]).to be_kind_of(String) expect(@first_update_report["duration"].to_i).to be_within(100).of(0) end -- cgit v1.2.1