Skip to content

Commit

Permalink
add test_level attribute to remote configuration request
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Mar 6, 2024
1 parent 4651472 commit 86932a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/datadog/ci/ext/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ module Test
TAG_SPAN_KIND = "span.kind"
SPAN_KIND_TEST = "test"

# could be either "test" or "suite" depending on whether we skip individual tests or whole suites
# we use test skipping for Ruby
ITR_TEST_SKIPPING_MODE = "test"

# test status as recognized by Datadog
Expand Down
1 change: 1 addition & 0 deletions lib/datadog/ci/transport/remote_settings_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def payload(test_session)
"repository_url" => test_session.git_repository_url,
"branch" => test_session.git_branch,
"sha" => test_session.git_commit_sha,
"test_level" => Ext::Test::ITR_TEST_SKIPPING_MODE,
"configurations" => {
"os.platform" => test_session.os_platform,
"os.arch" => test_session.os_architecture,
Expand Down
1 change: 1 addition & 0 deletions spec/datadog/ci/transport/remote_settings_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
attributes = data["attributes"]
expect(attributes["service"]).to eq(service)
expect(attributes["env"]).to eq(dd_env)
expect(attributes["test_level"]).to eq("test")
expect(attributes["repository_url"]).to eq("repository_url")
expect(attributes["branch"]).to eq("branch")
expect(attributes["sha"]).to eq("commit_sha")
Expand Down

0 comments on commit 86932a8

Please sign in to comment.