• Spacesift
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Preface - I'm the using sendgrid-apex unmanaged package here - https://github.com/sendgrid/sendgrid-apex
I've written a very simple class in sandbox that allows me to send emails via SendGrid. I deployed to staging successfully, but upon attempting to deploy in production, I received 4 error messages. There are a couple things odd about this:

1) This has been untouched for 3 years and to think that these errors have been here all along is ludicrous to me (though maybe winter 17 broke something)
2) In the second attempt at a changeset, I didn't include the class dependencies that were creating the errors, however the errors still prevented a successful deploy even though the classes are existing in production and are not part of the changeset

Below are the errors i'm seeing...

SendGridTest
testAddHeader
System.AssertException: Assertion Failed: Expected: &headers=%7B%22key%22%3A%22value%22%2C%22other%22%3A%22other-value%22%7D, Actual: &headers=%7B%22other%22%3A%22other-value%22%2C%22key%22%3A%22value%22%7D 
Stack Trace: Class.SendGridTest.testAddHeader: line 190, column 1

SendGridTest
testAddSection
System.AssertException: Assertion Failed: Expected: &x-smtpapi=%7B%22section%22%3A%7B%22set_section_key%22%3A%22set_section_value%22%2C%22set_section_key_2%22%3A%22set_section_value_2%22%7D%7D, Actual: &x-smtpapi=%7B%22section%22%3A%7B%22set_section_key_2%22%3A%22set_section_value_2%22%2C%22set_section_key%22%3A%22set_section_value%22%7D%7D 
Stack Trace: Class.SendGridTest.testAddSection: line 171, column 1

SmtpapiTest
setSetFilters
System.AssertException: Assertion Failed: Expected: {"filters":{"footer":{"settings":{"enable":"1","text/plain":"You can haz footers!"}}}}, Actual: {"filters":{"footer":{"settings":{"text/plain":"You can haz footers!","enable":"1"}}}} 
Stack Trace: Class.SmtpapiTest.setSetFilters: line 116, column 1

SmtpapiTest
testAddSection
System.AssertException: Assertion Failed: Expected: {"section":{"set_section_key":"set_section_value","set_section_key_2":"set_section_value_2"}}, Actual: {"section":{"set_section_key_2":"set_section_value_2","set_section_key":"set_section_value"}} 
Stack Trace: Class.SmtpapiTest.testAddSection: line 80, column 1