Skip to content

Test failure: additional "file" attribute #2

@curiousleo

Description

@curiousleo

I get a test failure with the following output:

$ mix test

23:00:06.304 [info]  hello world

23:00:06.362 [debug] hello world


  1) test can log (LoggerLogstashBackendTest)
     test/logger_logstash_backend_test.exs:41
     Assertion with === failed
     code: data["fields"] === %{"function" => "test can log/1", "level" => "info", "module" => "Elixir
.LoggerLogstashBackendTest", "pid" => me, "some_metadata" => "go here", "line" => 42, "key1" => "field
1"}
     lhs:  %{"file" => "/home/leo/Code/logger_logstash_backend/test/logger_logstash_backend_test.exs",
             "function" => "test can log/1", "key1" => "field1", "level" => "info", "line" => 42,
             "module" => "Elixir.LoggerLogstashBackendTest", "pid" => "#PID<0.137.0>",
             "some_metadata" => "go here"}
     rhs:  %{"function" => "test can log/1", "key1" => "field1", "level" => "info", "line" => 42,
             "module" => "Elixir.LoggerLogstashBackendTest", "pid" => "#PID<0.137.0>",
             "some_metadata" => "go here"}
     stacktrace:
       test/logger_logstash_backend_test.exs:48

.

Finished in 0.6 seconds (0.05s on load, 0.5s on tests)
2 tests, 1 failure

Randomized with seed 298519

It seems like there is an additional unexpected field file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions