@@ -45,15 +45,15 @@ func TestHTTP_Net(t *testing.T) {
4545 t .Fatalf ("MockSQL failed with unexpected error: %s" , err )
4646 }
4747
48- db := DB {DB : mockDB , driverName : "mocksql" , options : core.CommenterOptions {EnableDBDriver : true , EnableRoute : true , EnableFramework : true } }
48+ db := DB {DB : mockDB , driverName : "mocksql" , options : core.CommenterOptions {EnableDBDriver : true , EnableRoute : true , EnableFramework : true , EnableApplication : true , Application : "app" }, application : "app" }
4949 r , err := http .NewRequest ("GET" , "hello/1" , nil )
5050 if err != nil {
5151 t .Errorf ("http.NewRequest('GET', 'hello/1', nil) returned unexpected error: %v" , err )
5252 }
5353
5454 ctx := core .ContextInject (r .Context (), httpnet .NewHTTPRequestExtractor (r , nil ))
5555 got := db .withComment (ctx , "Select 1" )
56- want := "Select 1/*driver =database%2Fsql%3Amocksql,framework=net%2Fhttp,route=hello%2F1*/"
56+ want := "Select 1/*application=app,db_driver =database%2Fsql%3Amocksql,framework=net%2Fhttp,route=hello%2F1*/"
5757 if got != want {
5858 t .Errorf ("db.withComment(ctx, 'Select 1') got %q, wanted %q" , got , want )
5959 }
@@ -67,7 +67,7 @@ func TestQueryWithSemicolon(t *testing.T) {
6767
6868 db := DB {DB : mockDB , driverName : "mocksql" , options : core.CommenterOptions {EnableDBDriver : true }}
6969 got := db .withComment (context .Background (), "Select 1;" )
70- want := "Select 1/*driver =database%2Fsql%3Amocksql*/;"
70+ want := "Select 1/*db_driver =database%2Fsql%3Amocksql*/;"
7171 if got != want {
7272 t .Errorf ("db.withComment(context.Background(), 'Select 1;') got %q, wanted %q" , got , want )
7373 }
0 commit comments