Skip to content

Conversation

@selectiveduplicate
Copy link
Contributor

@selectiveduplicate selectiveduplicate commented Sep 17, 2024

Will bump the version when we approve of the chanegs. 🙂

Screenshots from a working example with Serverless and the current patch

See screenshot
See screenshot

Output from the added local tests

;; node --test
▶ testing response for async/await Lambda
  ✔ should contain 'X-Moesif-Transaction-Id' header (0.960301ms)
  ✔ should have 'application/json' as the 'Content-Type' header (0.501034ms)
  ✔ should have expected body (0.20235ms)
  ✔ should have '200 OK' status code (0.203222ms)
▶ testing response for async/await Lambda (3.188207ms)
{
  userId: 1,
  id: 1,
  title: 'sunt aut facere repellat provident occaecati excepturi optio reprehenderit',
  body: 'quia et suscipit\n' +
    'suscipit recusandae consequuntur expedita et cum\n' +
    'reprehenderit molestiae ut ut quas totam\n' +
    'nostrum rerum est autem sunt rem eveniet architecto'
}
▶ testing response for callback-style Lambda
  ✔ should contain 'X-Moesif-Transaction-Id' header (0.957489ms)
  ✔ should have 'application/json' as the 'Content-Type' header (0.483045ms)
  ✔ should have expected body (0.191357ms)
  ✔ should have '200 OK' status code (0.171779ms)
▶ testing response for callback-style Lambda (3.15757ms)
{
  userId: 1,
  id: 1,
  title: 'sunt aut facere repellat provident occaecati excepturi optio reprehenderit',
  body: 'quia et suscipit\n' +
    'suscipit recusandae consequuntur expedita et cum\n' +
    'reprehenderit molestiae ut ut quas totam\n' +
    'nostrum rerum est autem sunt rem eveniet architecto'
}
ℹ tests 8
ℹ suites 2
ℹ pass 8
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1057.238274

@xinghengwang xinghengwang changed the title Fix transaction ID implementation Fix transaction ID implementation and verify Event.body is indeed base64 when isBase64 is true. Sep 19, 2024
@xinghengwang xinghengwang merged commit 8eb907f into master Sep 19, 2024
@xinghengwang xinghengwang deleted the fix-txn-id branch September 19, 2024 18:14
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.

3 participants