2019-11-08 21:06:38 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2020-01-09 18:07:52 +00:00
|
|
|
factory :error_tracking_error_event, class: 'Gitlab::ErrorTracking::ErrorEvent' do
|
2019-11-08 21:06:38 +00:00
|
|
|
issue_id { 'id' }
|
|
|
|
date_received { Time.now.iso8601 }
|
|
|
|
stack_trace_entries do
|
2019-12-12 00:07:43 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
'function' => 'puts',
|
|
|
|
'lineNo' => 14,
|
|
|
|
'filename' => 'hello_world.rb',
|
|
|
|
'context' => [
|
|
|
|
[10, "# Ruby example\n"],
|
|
|
|
[11, "class HelloWorld\n"],
|
|
|
|
[12, " def self.message\n"],
|
|
|
|
[13, " @name = 'World'\n"],
|
|
|
|
[14, " puts \"Hello \#{@name}\"\n"],
|
|
|
|
[15, " end\n"],
|
|
|
|
[16, "end\n"]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'function' => 'print',
|
|
|
|
'lineNo' => 6,
|
|
|
|
'filename' => 'HelloWorld.swift',
|
|
|
|
'context' => [
|
|
|
|
[1, "// Swift example\n"],
|
|
|
|
[2, "struct HelloWorld {\n"],
|
|
|
|
[3, " let name = \"World\"\n"],
|
|
|
|
[4, "\n"],
|
|
|
|
[5, " static func message() {\n"],
|
|
|
|
[6, " print(\"Hello, \\(self.name)\")\n"],
|
|
|
|
[7, " }\n"],
|
|
|
|
[8, "}\n"]
|
|
|
|
]
|
|
|
|
},
|
2019-12-25 15:07:36 +00:00
|
|
|
{
|
|
|
|
'function' => 'print',
|
|
|
|
'lineNo' => 3,
|
|
|
|
'filename' => 'hello_world.php',
|
|
|
|
'context' => [
|
|
|
|
[1, "// PHP/Hack example\n"],
|
|
|
|
[2, "<?php\n"],
|
|
|
|
[3, "echo 'Hello, World!';\n"]
|
|
|
|
]
|
|
|
|
},
|
2019-12-12 00:07:43 +00:00
|
|
|
{
|
|
|
|
'filename' => 'blank.txt'
|
|
|
|
}
|
|
|
|
]
|
2019-11-08 21:06:38 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
skip_create
|
|
|
|
end
|
|
|
|
end
|