Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-4374: Emulate upload network call for functional tests #255

Merged

Conversation

0xnm
Copy link
Contributor

@0xnm 0xnm commented May 3, 2024

What does this PR do?

Right now we are calling the real intake for the functional tests of Gradle Plugin, and since we don’t have a real API key, we get an error and we expect build failure in our tests. However, it may be some other build failures, so it is handy to emulate network call to make test expectation without any build failures.

This PR adds build parameter dd-emulate-upload-call which can be passed for the build script execution. If it is present, no real network call will be made and we will create a fake response.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm 0xnm requested review from a team as code owners May 3, 2024 10:40
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 80.78%. Comparing base (b1ee483) to head (c3626c4).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #255      +/-   ##
=============================================
- Coverage      81.48%   80.78%   -0.70%     
- Complexity       203      205       +2     
=============================================
  Files             26       26              
  Lines            810      822      +12     
  Branches         104      105       +1     
=============================================
+ Hits             660      664       +4     
- Misses           112      121       +9     
+ Partials          38       37       -1     
Files Coverage Δ
...tlin/com/datadog/gradle/plugin/DdFileUploadTask.kt 82.54% <80.00%> (+1.09%) ⬆️
...lin/com/datadog/gradle/plugin/internal/Uploader.kt 72.73% <0.00%> (-27.27%) ⬇️
...m/datadog/gradle/plugin/internal/OkHttpUploader.kt 78.20% <12.50%> (-4.34%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Collaborator

@xgouchet xgouchet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job

@0xnm 0xnm merged commit 46ee416 into develop May 6, 2024
13 checks passed
@0xnm 0xnm deleted the nogorodnikov/rum-4374/emulate-upload-call-for-functional-tests branch May 6, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants