Skip to content

Commit

Permalink
refactor: replace type by scope (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd authored Feb 13, 2025
1 parent 24fa4ac commit 96c7fb0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions mergify_cli/ci/junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def junit_to_spans(
resource=resource,
attributes={
"test.case.name": suite_name,
"test.type": "suite",
"test.scope": "suite",
}
| common_attributes,
)
Expand All @@ -116,7 +116,7 @@ async def junit_to_spans(
min_start_time = min(min_start_time, start_time)

attributes = {
"test.type": "case",
"test.scope": "case",
"test.case.name": test_name,
}

Expand Down
26 changes: 13 additions & 13 deletions mergify_cli/tests/ci/test_junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def test_parse(
{
"attributes": {
"test.case.name": "Tests.Registration",
"test.type": "suite",
"test.scope": "suite",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -78,7 +78,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Registration.testCase1",
"test.case.result.status": "success",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -106,7 +106,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Registration.testCase2",
"test.case.result.status": "skipped",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -137,7 +137,7 @@ async def test_parse(
"exception.type": "ValueError",
"test.case.name": "Tests.Registration.testCase3",
"test.case.result.status": "failure",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand All @@ -164,7 +164,7 @@ async def test_parse(
{
"attributes": {
"test.case.name": "Tests.Authentication",
"test.type": "suite",
"test.scope": "suite",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -192,7 +192,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Authentication.testCase7",
"test.case.result.status": "success",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -220,7 +220,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Authentication.testCase8",
"test.case.result.status": "success",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -251,7 +251,7 @@ async def test_parse(
"exception.type": "AssertionError",
"test.case.name": "Tests.Authentication.testCase9",
"test.case.result.status": "failure",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -283,7 +283,7 @@ async def test_parse(
"exception.type": "ZeroDivisionError",
"test.case.name": "Tests.Permission.testCase10",
"test.case.result.status": "failure",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand All @@ -310,7 +310,7 @@ async def test_parse(
{
"attributes": {
"test.case.name": "Tests.Authentication.Login",
"test.type": "suite",
"test.scope": "suite",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -338,7 +338,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Authentication.Login.testCase4",
"test.case.result.status": "success",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -369,7 +369,7 @@ async def test_parse(
"exception.type": "SyntaxError",
"test.case.name": "Tests.Authentication.Login.testCase5",
"test.case.result.status": "failure",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down Expand Up @@ -397,7 +397,7 @@ async def test_parse(
"attributes": {
"test.case.name": "Tests.Authentication.Login.testCase6",
"test.case.result.status": "success",
"test.type": "case",
"test.scope": "case",
"test.framework": "unittest",
"test.language": "python",
},
Expand Down

0 comments on commit 96c7fb0

Please sign in to comment.