ClusterLabs/pcs

pcs 0.11.3 ruby test suite fails with json 2.6.3

Closed this issue · 0 comments

pcs 0.11.3 (and perhaps same with 0.11.4) ruby test suite fails with rubygem-json 2.6.3 (succeeds with rubygem-json 2.6.2) like:

+ GEM_HOME=/builddir/build/BUILDROOT/pcs-0.11.3-4.fc38.104.x86_64/usr/lib64/pcsd/vendor/bundle
+ ruby -I/builddir/build/BUILDROOT/pcs-0.11.3-4.fc38.104.x86_64/usr/lib64/pcsd -Ipcsd/test pcsd/test/test_all_suite.rb
Loaded suite pcsd/test/test_all_suite
Started
..........F
===============================================================================
Failure: test_parse_malformed(TestCfgKnownHosts):
  </Unable to parse known-hosts file: \d+: unexpected token/> was expected to be =~
  <"Unable to parse known-hosts file: unexpected token at '{\n" +
  "  \"format_version\": 1,\n" +
  "  \"data_version\": 0,\n" +
  "  \"known_hosts\": {\n" +
  "}'">.
/builddir/build/BUILD/pcs-0.11.3/pcsd/test/test_config.rb:724:in `test_parse_malformed'
     721:     cfg = CfgKnownHosts.new(text)
     722:     assert_equal(1, $logger.log.length)
     723:     assert_equal('error', $logger.log[0][0])
  => 724:     assert_match(
     725:       # the number is based on JSON gem version
     726:       /Unable to parse known-hosts file: \d+: unexpected token/,
     727:       $logger.log[0][1]
===============================================================================
..............................................................F
===============================================================================
Failure: test_parse_malformed(TestConfig):
  </Unable to parse pcs_settings file: \d+: unexpected token/> was expected to be =~
  <"Unable to parse pcs_settings file: unexpected token at '\"rh71-node2\"\n" +
  "      ]\n" +
  "    }\n" +
  "  ]\n" +
  "}'">.
/builddir/build/BUILD/pcs-0.11.3/pcsd/test/test_config.rb:127:in `test_parse_malformed'
     124:     cfg = PCSConfig.new(text)
     125:     assert_equal(1, $logger.log.length)
     126:     assert_equal('error', $logger.log[0][0])
  => 127:     assert_match(
     128:       # the number is based on JSON gem version
     129:       /Unable to parse pcs_settings file: \d+: unexpected token/,
     130:       $logger.log[0][1]
===============================================================================
...............................................................................
......................................................................
Finished in 34.091121648 seconds.
-------------------------------------------------------------------------------
223 tests, 2410 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
99.1031% passed
-------------------------------------------------------------------------------

This error is occuring at

/Unable to parse pcs_settings file: \d+: unexpected token/,
and
/Unable to parse known-hosts file: \d+: unexpected token/,
.

rubygem-json side change between 2.6.2 and 2.6.3 is: flori/json@572c999 : now json error message does not show line number.