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

Add test for source names with quotes #10588

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Aug 21, 2024

Resolves #10582

Problem

We did not have tests for source names with characters requiring escaping in json.

Solution

Create a test case.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@gshank gshank requested a review from a team as a code owner August 21, 2024 13:58
@cla-bot cla-bot bot added the cla:yes label Aug 21, 2024
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.84%. Comparing base (5f66678) to head (95c7f01).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10588      +/-   ##
==========================================
- Coverage   88.93%   88.84%   -0.10%     
==========================================
  Files         180      180              
  Lines       22735    22755      +20     
==========================================
- Hits        20220    20217       -3     
- Misses       2515     2538      +23     
Flag Coverage Δ
integration 86.08% <ø> (-0.17%) ⬇️
unit 62.34% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.34% <ø> (-0.04%) ⬇️
Integration Tests 86.08% <ø> (-0.17%) ⬇️

Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Looks good to me! Some thoughts, but non blocking.

  1. Do we need a changelog for test only changes? I've typically avoiding changelog additions for test only additions because the tests aren't actually included in the released package. I'm not sure what the right approach is, but the fact that we approach it differently means that it might be worth talking about.

  2. I'd be interetested to see if we could do this as a unit test. I guess the question there is "can a test that writes the file system be a unit test?"

@gshank
Copy link
Contributor Author

gshank commented Aug 21, 2024

I wasn't sure about the changelog either. We probably should have a policy discussion on that.

I thought about a unit test, but we want to test writing the artifact and the way that's done makes for a kind of tricky unit test setup, where it's hard to be really confident that you're testing what you want to be testing.

@gshank gshank merged commit bba020f into main Aug 21, 2024
66 of 67 checks passed
@gshank gshank deleted the test_source_name_with_quotes branch August 21, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create test cases for source names with quotes (and other non-standard characters)
2 participants