test/plugin/base_test.rb in fluent-plugin-google-cloud-0.5.4.grpc.alpha.1 vs test/plugin/base_test.rb in fluent-plugin-google-cloud-0.5.4

- old
+ new

@@ -549,25 +549,31 @@ message = 'test message' setup_logging_stubs do d = create_driver d.emit( 'int_key' => { 1 => message }, - 'array_key' => { [1, 2, 3, 4] => message }, + 'int_array_key' => { [1, 2, 3, 4] => message }, + 'string_array_key' => { %w(a b c) => message }, 'hash_key' => { { 'some_key' => 'some_value' } => message }, + 'mixed_key' => { { 'some_key' => %w(a b c) } => message }, 'symbol_key' => { some_symbol: message }, 'nil_key' => { nil => message } ) d.run end verify_log_entries(1, COMPUTE_PARAMS, 'structPayload') do |entry| fields = get_fields(entry['structPayload']) - assert_equal 5, fields.size, entry + assert_equal 7, fields.size, entry assert_equal message, get_string(get_fields(get_struct(fields \ ['int_key']))['1']), entry assert_equal message, get_string(get_fields(get_struct(fields \ - ['array_key']))['[1, 2, 3, 4]']), entry + ['int_array_key']))['[1, 2, 3, 4]']), entry assert_equal message, get_string(get_fields(get_struct(fields \ + ['string_array_key']))['["a", "b", "c"]']), entry + assert_equal message, get_string(get_fields(get_struct(fields \ ['hash_key']))['{"some_key"=>"some_value"}']), entry + assert_equal message, get_string(get_fields(get_struct(fields \ + ['mixed_key']))['{"some_key"=>["a", "b", "c"]}']), entry assert_equal message, get_string(get_fields(get_struct(fields \ ['symbol_key']))['some_symbol']), entry assert_equal message, get_string(get_fields(get_struct(fields \ ['nil_key']))['']), entry end