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

API-36406 Adjust docker container upload job tests #16730

Merged
merged 14 commits into from
May 20, 2024

Conversation

rockwellwindsor-va
Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va commented May 13, 2024

Summary

  • Updates some tests in the disability_compensation_docker_container_upload_spec.rb file that were not running as expected.
    • Adjusts claim variable for relevant tests so the claim being sent into the job is the same one used in the expectations. Linked example to make it easier to see
    • Tests retry behavior by directly sending in error to will_retry? method once error raises
    • Removes jobs counting on tests that run sync
    • Adds an expectation to verify the related saved error message just for further reliability

Related issue(s)

API-36406

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

  • modules/claims_api/app/sidekiq/claims_api/service_base.rb
  • modules/claims_api/spec/sidekiq/claim_custom_error_spec.rb (typo fix)
  • modules/claims_api/spec/sidekiq/service_base_spec.rb
  • modules/claims_api/spec/sidekiq/v2/disability_compensation_docker_container_upload_spec.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

Copy link

github-actions bot commented May 13, 2024

1 Warning
⚠️ This PR changes 348 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/claims_api/app/sidekiq/claims_api/v2/disability_compensation_docker_container_upload.rb (+1/-2)

  • modules/claims_api/spec/sidekiq/claim_custom_error_spec.rb (+1/-1)

  • modules/claims_api/spec/sidekiq/service_base_spec.rb (+54/-14)

  • modules/claims_api/spec/sidekiq/v2/disability_compensation_docker_container_upload_spec.rb (+137/-138)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

expect(should_retry).to eq(false)
end
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I felt it was relevant enough to include these additions. I wanted to lock this in for will_retry? so this could not revert in the future.

@va-vfs-bot va-vfs-bot temporarily deployed to API-36406-fix-docker-container-tests/main/main May 13, 2024 23:29 Inactive
@rockwellwindsor-va rockwellwindsor-va added the claimsApi modules/claims_api label May 14, 2024
@rockwellwindsor-va rockwellwindsor-va changed the title Api 36406 fix docker container tests API-36406 Adjust docker container upload job tests May 14, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-36406-fix-docker-container-tests/main/main May 14, 2024 14:04 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-36406-fix-docker-container-tests/main/main May 14, 2024 14:11 Inactive
@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review May 14, 2024 15:14
@rockwellwindsor-va rockwellwindsor-va requested a review from a team as a code owner May 14, 2024 15:14
@rockwellwindsor-va rockwellwindsor-va marked this pull request as draft May 14, 2024 15:15
@va-vfs-bot va-vfs-bot temporarily deployed to API-36406-fix-docker-container-tests/main/main May 14, 2024 16:02 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-36406-fix-docker-container-tests/main/main May 14, 2024 18:23 Inactive
@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review May 15, 2024 14:16
Copy link
Contributor

@stiehlrod stiehlrod left a comment

Choose a reason for hiding this comment

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

LGTM

@rockwellwindsor-va rockwellwindsor-va merged commit 3f2daf1 into master May 20, 2024
19 checks passed
@rockwellwindsor-va rockwellwindsor-va deleted the API-36406-fix-docker-container-tests branch May 20, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimsApi modules/claims_api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants