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

Explicitly exclude msg fields from marshaling that courier doesn't use #520

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

rowanseymour
Copy link
Contributor

Poking around at courier queues I noticed the message json has fields like MsgType, ConnectionID and TopupID which don't belong there.

	{
		"direction":"O",
		"modified_on":"2021-11-09T18:39:55.038607Z",
		"contact_urn_id":59726291,
		"session_id":970967356,
		"external_id":null,
		"MsgType":"F",
		"attachments":null,
                ...

@@ -22,6 +25,11 @@ import (
func TestOutgoingMsgs(t *testing.T) {
ctx, rt, db, _ := testsuite.Get()

defer func() {
testsuite.Reset(testsuite.ResetData)
db.MustExec(`UPDATE orgs_org SET is_suspended = FALSE`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test leaks changes to this in subsequent tests

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #520 (819fcea) into main (84334fa) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   57.51%   57.53%   +0.01%     
==========================================
  Files         125      125              
  Lines        8790     8789       -1     
==========================================
+ Hits         5056     5057       +1     
+ Misses       2942     2940       -2     
  Partials      792      792              
Impacted Files Coverage Δ
core/models/msgs.go 51.53% <ø> (+0.43%) ⬆️
core/models/tickets.go 71.03% <ø> (-0.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84334fa...819fcea. Read the comment docs.

@rowanseymour rowanseymour changed the base branch from main to 7.1 November 10, 2021 18:49
@rowanseymour rowanseymour merged commit 89b58d7 into 7.1 Nov 10, 2021
@rowanseymour rowanseymour deleted the msg_json_fix branch November 10, 2021 18:49
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.

1 participant