aws / aws-xray-sdk-go

AWS X-Ray SDK for the Go programming language.
Apache License 2.0
276 stars 118 forks source link

Issue #453 Add support for custom driver detector #461

Open amanangira opened 3 months ago

amanangira commented 3 months ago

Issue #453

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

amanangira commented 3 months ago

I am looking for help on how I can test registering of a custom driver detector and test it's usage. Since when using DATA-DOG/sqlmock the driver name is always sqlmock (reference) which never would check for the intended driver when working with the DB mock.

What I intend to do -

  1. Create a unit test case similar to the existing TestOracle to test a custom registered driver detector snowflake.
  2. Use registerSnowflakeDriver to register a snowflake driver detector.
  3. Use mockSnowflakeDB to mock the Ping queries for a snowflake and test it using capturePing.

Step 2 and 3 refer to code in this file.

amanangira commented 3 months ago

Hi @wangzlei, did you get a chance to look into the test cases?

amanangira commented 2 months ago

I am not sure whom to tag here. @wangzlei can you direct me?