From 555d82885f6f4db0b8dc645c1b450ff38fe3c56c Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 13:13:43 +0530 Subject: [PATCH 1/9] oracle db migration completed --- go.work.sum | 11 + .../datasource/file/Hello_world/Hello.txt | 0 pkg/gofr/datasource/file/temp.csv | 1 + pkg/gofr/datasource/file/temp.json | 1 + pkg/gofr/datasource/file/temp.txt | 1 + pkg/gofr/migration/datasource.go | 1 + pkg/gofr/migration/interface.go | 7 + pkg/gofr/migration/migration.go | 7 + pkg/gofr/migration/migration_test.go | 130 + pkg/gofr/migration/mock_interface.go | 78 + pkg/gofr/migration/oracle.go | 101 + pkg/gofr/migration/oracle_test.go | 109 + test_output.txt | 3850 +++++++++++++++++ 13 files changed, 4297 insertions(+) create mode 100644 pkg/gofr/datasource/file/Hello_world/Hello.txt create mode 100644 pkg/gofr/datasource/file/temp.csv create mode 100644 pkg/gofr/datasource/file/temp.json create mode 100644 pkg/gofr/datasource/file/temp.txt create mode 100644 pkg/gofr/migration/oracle.go create mode 100644 pkg/gofr/migration/oracle_test.go create mode 100644 test_output.txt diff --git a/go.work.sum b/go.work.sum index b18de40ab..a1ada2122 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1156,6 +1156,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8= github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU= github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= @@ -1256,6 +1257,8 @@ golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ss golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1291,6 +1294,8 @@ golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1324,6 +1329,8 @@ golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1349,6 +1356,7 @@ golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1389,6 +1397,7 @@ golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMe golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b h1:DU+gwOBXU+6bO0sEyO7o/NeMlxZxCZEvI7v+J4a1zRQ= golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b/go.mod h1:4ZwOYna0/zsOKwuR5X/m0QFOJpSZvAxFfkQT+Erd9D4= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1449,6 +1458,8 @@ golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58 golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= diff --git a/pkg/gofr/datasource/file/Hello_world/Hello.txt b/pkg/gofr/datasource/file/Hello_world/Hello.txt new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/gofr/datasource/file/temp.csv b/pkg/gofr/datasource/file/temp.csv new file mode 100644 index 000000000..f188557e3 --- /dev/null +++ b/pkg/gofr/datasource/file/temp.csv @@ -0,0 +1 @@ +Name,Age,Email \ No newline at end of file diff --git a/pkg/gofr/datasource/file/temp.json b/pkg/gofr/datasource/file/temp.json new file mode 100644 index 000000000..b9379f078 --- /dev/null +++ b/pkg/gofr/datasource/file/temp.json @@ -0,0 +1 @@ +!@#$%^&* \ No newline at end of file diff --git a/pkg/gofr/datasource/file/temp.txt b/pkg/gofr/datasource/file/temp.txt new file mode 100644 index 000000000..21c39bdf5 --- /dev/null +++ b/pkg/gofr/datasource/file/temp.txt @@ -0,0 +1 @@ +some new content \ No newline at end of file diff --git a/pkg/gofr/migration/datasource.go b/pkg/gofr/migration/datasource.go index ff5717ea8..34e21bd0c 100644 --- a/pkg/gofr/migration/datasource.go +++ b/pkg/gofr/migration/datasource.go @@ -11,6 +11,7 @@ type Datasource struct { Redis Redis PubSub PubSub Clickhouse Clickhouse + Oracle Oracle Cassandra Cassandra Mongo Mongo ArangoDB ArangoDB diff --git a/pkg/gofr/migration/interface.go b/pkg/gofr/migration/interface.go index 20c370e92..a3a748a86 100644 --- a/pkg/gofr/migration/interface.go +++ b/pkg/gofr/migration/interface.go @@ -39,6 +39,13 @@ type Clickhouse interface { HealthCheck(ctx context.Context) (any, error) } +type Oracle interface { + Select(ctx context.Context, dest any, query string, args ...any) error + Exec(ctx context.Context, query string, args ...any) error + + HealthCheck(ctx context.Context) (any, error) +} + type Cassandra interface { Exec(query string, args ...any) error NewBatch(name string, batchType int) error diff --git a/pkg/gofr/migration/migration.go b/pkg/gofr/migration/migration.go index 21e62e538..0bb5d7b41 100644 --- a/pkg/gofr/migration/migration.go +++ b/pkg/gofr/migration/migration.go @@ -157,6 +157,13 @@ func initializeDatasources(c *container.Container, ds *Datasource, mg migrator) apply: func(m migrator) migrator { return clickHouseDS{ds.Clickhouse}.apply(m) }, logIdentifier: "Clickhouse", }, + { + condition: func() bool { return !isNil(c.Oracle) }, + setDS: func() { ds.Oracle = c.Oracle }, + apply: func(m migrator) migrator { return oracleDS{c.Oracle}.apply(m) }, + logIdentifier: "Oracle", + }, + { condition: func() bool { return c.PubSub != nil }, setDS: func() { ds.PubSub = c.PubSub }, diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go index 04342a55b..68aa829a8 100644 --- a/pkg/gofr/migration/migration_test.go +++ b/pkg/gofr/migration/migration_test.go @@ -1,8 +1,10 @@ package migration import ( + "context" "database/sql" "testing" + "time" "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" @@ -207,3 +209,131 @@ func initializeClickHouseRunMocks(t *testing.T) (*MockClickhouse, *container.Con return mockClickHouse, mockContainer } + +func TestOracleMigration_RunMigrationSuccess(t *testing.T) { + mockOracle, mockContainer := initializeOracleRunMocks(t) + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + _ = od.apply(&ds) // apply migrator wrapper + + migrationMap := map[int64]Migrate{ + 1: {UP: func(d Datasource) error { + return d.Oracle.Exec(context.Background(), "CREATE TABLE test (id INT)") + }}, + } + + mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(nil) + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(nil) + mockOracle.EXPECT().Exec(gomock.Any(), "CREATE TABLE test (id INT)").Return(nil) + mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, int64(1), "UP", gomock.Any(), gomock.Any()).Return(nil) + + Run(migrationMap, mockContainer) +} + +func TestOracleMigration_FailCreateMigrationTable(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockOracle := NewMockOracle(ctrl) + mockContainer, _ := container.NewMockContainer(t) + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(sql.ErrConnDone) + + err := mg.checkAndCreateMigrationTable(mockContainer) + assert.Equal(t, sql.ErrConnDone, err) +} + +func TestOracleMigration_GetLastMigration_ReturnsZeroOnError(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockOracle := NewMockOracle(ctrl) + mockContainer, _ := container.NewMockContainer(t) + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(sql.ErrConnDone) + + lastMigration := mg.getLastMigration(mockContainer) + assert.Equal(t, int64(0), lastMigration) +} + +func TestOracleMigration_CommitMigration(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockOracle := NewMockOracle(ctrl) + mockContainer, _ := container.NewMockContainer(t) + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + td := transactionData{ + StartTime: time.Now(), + MigrationNumber: 42, + } + + mockOracle.EXPECT(). + Exec(gomock.Any(), insertOracleGoFrMigrationRow, + td.MigrationNumber, "UP", td.StartTime, gomock.Any()). + Return(nil) + + err := mg.commitMigration(mockContainer, td) + assert.NoError(t, err) +} + +func TestOracleMigration_BeginTransaction_Logs(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockOracle := NewMockOracle(ctrl) + mockContainer, _ := container.NewMockContainer(t) + mockContainer.Logger = logging.NewLogger(logging.DEBUG) + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + // Capture logs or just call method and rely on it not panicking + mg.beginTransaction(mockContainer) + // Log output capture can be added if needed +} + +func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) { + t.Helper() + + mockOracle := NewMockOracle(gomock.NewController(t)) + mockContainer, _ := container.NewMockContainer(t) + + // Disable all other datasources by setting to nil + mockContainer.SQL = nil + mockContainer.Redis = nil + mockContainer.Mongo = nil + mockContainer.Cassandra = nil + mockContainer.PubSub = nil + mockContainer.ArangoDB = nil + mockContainer.SurrealDB = nil + mockContainer.DGraph = nil + mockContainer.Elasticsearch = nil + mockContainer.OpenTSDB = nil + mockContainer.ScyllaDB = nil + mockContainer.Clickhouse = nil + + // Initialize Oracle mock and Logger + mockContainer.Oracle = mockOracle + mockContainer.Logger = logging.NewMockLogger(logging.DEBUG) + + return mockOracle, mockContainer +} diff --git a/pkg/gofr/migration/mock_interface.go b/pkg/gofr/migration/mock_interface.go index 975be65b1..e8002920a 100644 --- a/pkg/gofr/migration/mock_interface.go +++ b/pkg/gofr/migration/mock_interface.go @@ -396,6 +396,83 @@ func (mr *MockClickhouseMockRecorder) Select(ctx, dest, query any, args ...any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Select", reflect.TypeOf((*MockClickhouse)(nil).Select), varargs...) } +// MockOracle is a mock of Oracle interface. +type MockOracle struct { + ctrl *gomock.Controller + recorder *MockOracleMockRecorder + isgomock struct{} +} + +// MockOracleMockRecorder is the mock recorder for MockOracle. +type MockOracleMockRecorder struct { + mock *MockOracle +} + +// NewMockOracle creates a new mock instance. +func NewMockOracle(ctrl *gomock.Controller) *MockOracle { + mock := &MockOracle{ctrl: ctrl} + mock.recorder = &MockOracleMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockOracle) EXPECT() *MockOracleMockRecorder { + return m.recorder +} + +// Exec mocks base method. +func (m *MockOracle) Exec(ctx context.Context, query string, args ...any) error { + m.ctrl.T.Helper() + varargs := []any{ctx, query} + for _, a := range args { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Exec", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// Exec indicates an expected call of Exec. +func (mr *MockOracleMockRecorder) Exec(ctx, query any, args ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, query}, args...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockOracle)(nil).Exec), varargs...) +} + +// HealthCheck mocks base method. +func (m *MockOracle) HealthCheck(ctx context.Context) (any, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HealthCheck", ctx) + ret0, _ := ret[0].(any) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// HealthCheck indicates an expected call of HealthCheck. +func (mr *MockOracleMockRecorder) HealthCheck(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockOracle)(nil).HealthCheck), ctx) +} + +// Select mocks base method. +func (m *MockOracle) Select(ctx context.Context, dest any, query string, args ...any) error { + m.ctrl.T.Helper() + varargs := []any{ctx, dest, query} + for _, a := range args { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Select", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// Select indicates an expected call of Select. +func (mr *MockOracleMockRecorder) Select(ctx, dest, query any, args ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, dest, query}, args...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Select", reflect.TypeOf((*MockOracle)(nil).Select), varargs...) +} + // MockCassandra is a mock of Cassandra interface. type MockCassandra struct { ctrl *gomock.Controller @@ -1540,6 +1617,7 @@ type DataPoint struct { Timestamp int64 `json:"timestamp"` Tags map[string]string `json:"tags"` } + // Mockmigrator is a mock of migrator interface. type Mockmigrator struct { ctrl *gomock.Controller diff --git a/pkg/gofr/migration/oracle.go b/pkg/gofr/migration/oracle.go new file mode 100644 index 000000000..4d037a8fb --- /dev/null +++ b/pkg/gofr/migration/oracle.go @@ -0,0 +1,101 @@ +package migration + +import ( + "context" + "gofr.dev/pkg/gofr/container" + "time" +) + +type oracleDS struct { + Oracle +} + +type oracleMigrator struct { + Oracle + migrator +} + +// Provides a wrapper to apply the oracle migrator logic +func (od oracleDS) apply(m migrator) migrator { + return oracleMigrator{ + Oracle: od.Oracle, + migrator: m, + } +} + +const ( + CheckAndCreateOracleMigrationTable = ` +BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; +END; +` + getLastOracleGoFrMigration = ` +SELECT NVL(MAX(version), 0) AS last_migration +FROM gofr_migrations +` + insertOracleGoFrMigrationRow = ` +INSERT INTO gofr_migrations (version, method, start_time, duration) +VALUES (:1, :2, :3, :4) +` +) + +// Create migration table if it doesn't exist +func (om oracleMigrator) checkAndCreateMigrationTable(_ *container.Container) error { + return om.Oracle.Exec(context.Background(), CheckAndCreateOracleMigrationTable) +} + +// Get the last applied migration version +func (om oracleMigrator) getLastMigration(c *container.Container) int64 { + type LastMigration struct { + LastMigration int64 `db:"last_migration"` + } + + var lastMigrations []LastMigration + var lastMigration int64 + + err := om.Oracle.Select(context.Background(), &lastMigrations, getLastOracleGoFrMigration) + if err != nil { + return 0 + } + if len(lastMigrations) != 0 { + lastMigration = lastMigrations[0].LastMigration + } + lm2 := om.migrator.getLastMigration(c) + if lm2 > lastMigration { + return lm2 + } + return lastMigration +} + +// Begin a new migration transaction +func (om oracleMigrator) beginTransaction(c *container.Container) transactionData { + td := om.migrator.beginTransaction(c) + c.Debug("OracleDB Migrator begin successfully") + return td +} + +// Commit the migration +func (om oracleMigrator) commitMigration(c *container.Container, data transactionData) error { + err := om.Oracle.Exec(context.Background(), insertOracleGoFrMigrationRow, data.MigrationNumber, + "UP", data.StartTime, time.Since(data.StartTime).Milliseconds()) + if err != nil { + return err + } + c.Debugf("inserted record for migration %v in oracle gofr_migrations table", data.MigrationNumber) + return om.migrator.commitMigration(c, data) +} + +// Rollback the migration +func (om oracleMigrator) rollback(c *container.Container, data transactionData) { + om.migrator.rollback(c, data) + c.Fatalf("migration %v failed and rolled back", data.MigrationNumber) +} diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go new file mode 100644 index 000000000..1648082d9 --- /dev/null +++ b/pkg/gofr/migration/oracle_test.go @@ -0,0 +1,109 @@ +package migration + +import ( + "database/sql" + "testing" + "time" + "os" + "bytes" + + "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" + "gofr.dev/pkg/gofr/container" +) + +func oracleSetup(t *testing.T) (migrator, *MockOracle, *container.Container) { + t.Helper() + ctrl := gomock.NewController(t) + mockContainer, _ := container.NewMockContainer(t) + mockOracle := NewMockOracle(ctrl) + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + mockContainer.Oracle = mockOracle + return mg, mockOracle, mockContainer +} + +func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { + mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { + desc string + err error + }{ + {"no error", nil}, + {"connection failed", sql.ErrConnDone}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(tc.err) + err := mg.checkAndCreateMigrationTable(mockContainer) + assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) + } +} + +func Test_OracleGetLastMigration(t *testing.T) { + mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { + desc string + err error + resp int64 + }{ + {"no error", nil, 0}, + {"connection failed", sql.ErrConnDone, 0}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(tc.err) + resp := mg.getLastMigration(mockContainer) + assert.Equal(t, tc.resp, resp, "TEST[%d]: %s failed", i, tc.desc) + } +} + +func Test_OracleCommitMigration(t *testing.T) { + mg, mockOracle, mockContainer := oracleSetup(t) + timeNow := time.Now() + td := transactionData{ + StartTime: timeNow, + MigrationNumber: 10, + } + testCases := []struct { + desc string + err error + }{ + {"no error", nil}, + {"connection failed", sql.ErrConnDone}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, + td.MigrationNumber, "UP", td.StartTime, gomock.Any()).Return(tc.err) + err := mg.commitMigration(mockContainer, td) + assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) + } +} + +func Test_OracleBeginTransaction(t *testing.T) { + logs := captureStdout(func() { + mg, _, mockContainer := oracleSetup(t) + mg.beginTransaction(mockContainer) + }) + assert.Contains(t, logs, "OracleDB Migrator begin successfully") +} + +// captureStdout helper to capture stdout during function execution +func captureStdout(f func()) string { + old := os.Stdout + r, w, _ := os.Pipe() + os.Stdout = w + + outC := make(chan string) + go func() { + var buf bytes.Buffer + _, _ = buf.ReadFrom(r) + outC <- buf.String() + }() + + f() + + _ = w.Close() + os.Stdout = old + out := <-outC + return out +} diff --git a/test_output.txt b/test_output.txt new file mode 100644 index 000000000..57fb772f2 --- /dev/null +++ b/test_output.txt @@ -0,0 +1,3850 @@ +? gofr.dev/examples/grpc/grpc-streaming-client [no test files] +? gofr.dev/examples/grpc/grpc-streaming-client/client [no test files] +{"level":"INFO","time":"2025-08-22T00:03:44.2108408+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:44.2141481+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2158318+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2460442+05:30","message":"registering gRPC Server: grpc.health.v1.Health","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2460442+05:30","message":"registering gRPC Server: ChatService","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2466719+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2466719+05:30","message":"Starting server on port: 8081","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:44.2474704+05:30","message":"starting gRPC server at :9000","gofrVersion":"dev"} +=== RUN TestServerStream +{"level":"DEBUG","time":"2025-08-22T00:03:44.6073619+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:44.6073619+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:45.6106593+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:45.6106593+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:46.6125409+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:46.6119724+05:30","responseTime":568,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:47.6147331+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:47.6147331+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:48.6150989+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:48.6150989+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:49.6272304+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:44.6073619+05:30","responseTime":5019868,"method":"/ChatService/ServerStream [SERVER-STREAM]","statusCode":0},"gofrVersion":"dev"} +--- PASS: TestServerStream (5.26s) +=== RUN TestClientStream +{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":2},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/SendAndClose","statusCode":0},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:49.9771174+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":535,"method":"/ChatService/ClientStream [CLIENT-STREAM]","statusCode":0},"gofrVersion":"dev"} +--- PASS: TestClientStream (0.08s) +=== RUN TestBiDiStream +{"level":"DEBUG","time":"2025-08-22T00:03:50.2756647+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2698263+05:30","responseTime":5838,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.2809409+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2809409+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.3493774+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2809409+05:30","responseTime":68436,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.3493774+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.3493774+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.4489073+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.3493774+05:30","responseTime":99529,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.4489073+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.4489073+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:50.5504967+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.4489073+05:30","responseTime":101589,"method":"/ChatService/BiDiStream/Recv","statusCode":2},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:50.5504967+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2553171+05:30","responseTime":295179,"method":"/ChatService/BiDiStream [BI-DIRECTION_STREAM]","statusCode":0},"gofrVersion":"dev"} +--- PASS: TestBiDiStream (0.54s) +PASS +ok gofr.dev/examples/grpc/grpc-streaming-server (cached) +? gofr.dev/examples/grpc/grpc-streaming-server/server [no test files] +? gofr.dev/examples/grpc/grpc-unary-client [no test files] +? gofr.dev/examples/grpc/grpc-unary-client/client [no test files] +{"level":"INFO","time":"2025-08-22T00:07:20.5198297+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.5220656+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5231358+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5299226+05:30","message":"registering gRPC Server: grpc.health.v1.Health","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5299226+05:30","message":"registering gRPC Server: Hello","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"Starting server on port: 8081","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"starting gRPC server at :9000","gofrVersion":"dev"} +=== RUN TestGRPCServer +{"level":"INFO","time":"2025-08-22T00:07:20.8263239+05:30","message":{"id":"3dbcfd8e207beb202cc98893d3892ad2","startTime":"2025-08-22T00:07:20.8263239+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.8274101+05:30","message":{"id":"f5559e7f1fdeec34fabbdd0077ae8f1d","startTime":"2025-08-22T00:07:20.8274101+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.8285251+05:30","message":{"id":"5af949fc79f1f0dc537e2f7216ddbcbb","startTime":"2025-08-22T00:07:20.8285251+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.8296344+05:30","message":{"id":"38817abd3c50200ca147238547cedf8a","startTime":"2025-08-22T00:07:20.8296344+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} +--- PASS: TestGRPCServer (0.01s) +=== RUN TestHelloProtoMethods +--- PASS: TestHelloProtoMethods (0.00s) +PASS +ok gofr.dev/examples/grpc/grpc-unary-server 0.976s +=== RUN TestServer_SayHello +--- PASS: TestServer_SayHello (0.00s) +PASS +ok gofr.dev/examples/grpc/grpc-unary-server/server (cached) +=== RUN TestIntegration_SimpleAPIServer +{"level":"INFO","time":"2025-08-22T00:07:20.8525236+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:20.9365447+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:20.941072+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.941665+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9440836+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9440836+05:30","message":"registered static files at endpoint /static/ from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\http-server\\static","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9446612+05:30","message":"Starting metrics server on port: 51153","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9446612+05:30","message":"Starting server on port: 9000","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:20.9463195+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9574358+05:30","message":"Name came empty","trace_id":"e797080bcb1994e7b92c0c1d90b78799","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9574358+05:30","message":{"trace_id":"e797080bcb1994e7b92c0c1d90b78799","span_id":"d6ee3694f6fd0cb9","start_time":"2025-08-22T00:07:20.9568708+05:30","response_time":565,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/hello","response":200},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9599066+05:30","message":{"trace_id":"01f7af3ce53081430e6bbf4f62db1d4a","span_id":"657db4d5bb246991","start_time":"2025-08-22T00:07:20.9599066+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/hello?name=gofr","response":200},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.0627654+05:30","message":{"trace_id":"16407365841feb302d866afffb14fccf","error":"error from redis db: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.0639372+05:30","message":{"trace_id":"16407365841feb302d866afffb14fccf","span_id":"0a88fac6fac20caf","start_time":"2025-08-22T00:07:20.9616864+05:30","response_time":102250,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/redis","response":500},"gofrVersion":"dev"} + main_test.go:68: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 + Error: Not equal: + expected: string("") + actual : () + Test: TestIntegration_SimpleAPIServer + Messages: TEST[2], Failed. + redis handler + main_test.go:72: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:72 + Error: Not equal: + expected: 200 + actual : 500 + Test: TestIntegration_SimpleAPIServer + Messages: TEST[2], Failed. + redis handler +{"level":"ERROR","time":"2025-08-22T00:07:21.3456082+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","error":"error from redis db: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.3456082+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","span_id":"6563a080275a1042","start_time":"2025-08-22T00:07:21.2284669+05:30","response_time":117141,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51272","uri":"/redis","response":500},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3461176+05:30","message":{"timestamp":"2025-08-22T00:07:21.2218942+05:30","latency":124223,"correlationId":"c8668777fa1d8ff5f7f904b574f6840a","responseCode":500,"httpMethod":"GET","uri":"http://localhost:9000/redis"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3461176+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","span_id":"2792326f5eea3b2a","start_time":"2025-08-22T00:07:21.0672443+05:30","response_time":278873,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/trace","response":200},"gofrVersion":"dev"} + main_test.go:68: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 + Error: Not equal: + expected: string("") + actual : () + Test: TestIntegration_SimpleAPIServer + Messages: TEST[3], Failed. + trace handler +{"level":"ERROR","time":"2025-08-22T00:07:21.3624374+05:30","message":{"trace_id":"827a0dcf1cec9892e27a2c3415690dca","error":"error from sql db: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.3624374+05:30","message":{"trace_id":"827a0dcf1cec9892e27a2c3415690dca","span_id":"c0573db90e938cde","start_time":"2025-08-22T00:07:21.3461176+05:30","response_time":16319,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/mysql","response":500},"gofrVersion":"dev"} + main_test.go:68: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 + Error: Not equal: + expected: float64(4) + actual : () + Test: TestIntegration_SimpleAPIServer + Messages: TEST[4], Failed. + mysql handler + main_test.go:72: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:72 + Error: Not equal: + expected: 200 + actual : 500 + Test: TestIntegration_SimpleAPIServer + Messages: TEST[4], Failed. + mysql handler +--- FAIL: TestIntegration_SimpleAPIServer (0.58s) +=== RUN TestIntegration_SimpleAPIServer_Errors +{"level":"ERROR","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"26c817ec974aa2803e1748634ee2b861","error":"some error occurred"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"26c817ec974aa2803e1748634ee2b861","span_id":"4744cba21aa84c7e","start_time":"2025-08-22T00:07:21.3644466+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/error","response":500},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"02b7fdff4c7a2a0b99f788ec288ffef1","error":"route not registered"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"02b7fdff4c7a2a0b99f788ec288ffef1","span_id":"ab59de2f7e39b02f","start_time":"2025-08-22T00:07:21.3644466+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/","response":404},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3691425+05:30","message":{"trace_id":"1f751e9d304159c0e1aafa2ce09668ca","error":"route not registered"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.3691425+05:30","message":{"trace_id":"1f751e9d304159c0e1aafa2ce09668ca","span_id":"f416286e29d89f12","start_time":"2025-08-22T00:07:21.3691425+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/route","response":404},"gofrVersion":"dev"} +--- PASS: TestIntegration_SimpleAPIServer_Errors (0.01s) +=== RUN TestIntegration_SimpleAPIServer_Health +{"level":"INFO","time":"2025-08-22T00:07:21.4735962+05:30","message":{"trace_id":"69eaf93d70a5246d1c8540725aa4e4d9","span_id":"40e79051a6befaf2","start_time":"2025-08-22T00:07:21.4735962+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51272","uri":"/.well-known/alive","response":200},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.4735962+05:30","message":{"timestamp":"2025-08-22T00:07:21.4735962+05:30","latency":0,"correlationId":"69eaf93d70a5246d1c8540725aa4e4d9","responseCode":200,"httpMethod":"GET","uri":"http://localhost:9000/.well-known/alive"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.4751194+05:30","message":{"trace_id":"69eaf93d70a5246d1c8540725aa4e4d9","span_id":"b9501248a4bcca81","start_time":"2025-08-22T00:07:21.3714826+05:30","response_time":103636,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/.well-known/health","response":200},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.4780503+05:30","message":{"trace_id":"f995550da7d6c0904747aac2be19928d","span_id":"c465ad493d6bcdfd","start_time":"2025-08-22T00:07:21.4780503+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51307","uri":"/favicon.ico","response":200},"gofrVersion":"dev"} +--- PASS: TestIntegration_SimpleAPIServer_Health (0.11s) +=== RUN TestRedisHandler +{"level":"INFO","time":"2025-08-22T00:07:21.4809867+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.598596+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.6023071+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.6023071+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.6096918+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.6105313+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.6132377+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.7278009+05:30","message":{"query":"ping","duration":118109,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.7278009+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +--- PASS: TestRedisHandler (0.25s) +FAIL +FAIL gofr.dev/examples/http-server 1.663s +=== RUN TestHTTPServerUsingRedis +{"level":"INFO","time":"2025-08-22T00:07:20.8573597+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.8614664+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.8667155+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.9468882+05:30","message":{"query":"ping","duration":80172,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:20.9474581+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.9480263+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:20.9509444+05:30","message":"Warming up the cache...","gofrVersion":"dev"} + main_test.go:59: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server-using-redis/main_test.go:59 + Error: Received unexpected error: + Post "http://localhost:51154/redis": dial tcp [::1]:51154: connectex: No connection could be made because the target machine actively refused it. + Test: TestHTTPServerUsingRedis + Messages: TEST[0], Failed. + post handler +--- FAIL: TestHTTPServerUsingRedis (0.19s) +=== RUN TestRedisSetHandler +{"level":"INFO","time":"2025-08-22T00:07:20.9679419+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.9697825+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:20.9697825+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.0300392+05:30","message":{"query":"set","duration":79094,"args":["set","initial-data","This is some data cached at startup."]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"Failed to warm up cache: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"OnStart hook failed: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"Startup failed: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1139383+05:30","message":{"query":"ping","duration":144155,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.1139383+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1149985+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1204626+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1811253+05:30","message":{"query":"ping","duration":60662,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.1811253+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +--- PASS: TestRedisSetHandler (0.22s) +=== RUN TestRedisPipelineHandler +{"level":"INFO","time":"2025-08-22T00:07:21.1891185+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1903223+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.1908771+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.3304347+05:30","message":{"query":"ping","duration":139557,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.3304347+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.3304347+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.3324629+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:21.46259+05:30","message":{"query":"ping","duration":130127,"args":["ping"]},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.46259+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +--- PASS: TestRedisPipelineHandler (0.28s) +FAIL +FAIL gofr.dev/examples/http-server-using-redis 1.387s +=== RUN TestCMDRunWithNoArg +Available commands: + + hello + Description: Print 'Hello World!' + Help: hello world option + + params + + spinner + + progress +--- PASS: TestCMDRunWithNoArg (0.01s) +=== RUN TestCMDRunWithProperArg +--- PASS: TestCMDRunWithProperArg (0.00s) +=== RUN TestCMDRunWithParams +--- PASS: TestCMDRunWithParams (0.01s) +=== RUN TestCMDRun_Spinner +--- PASS: TestCMDRun_Spinner (2.01s) +=== RUN TestCMDRun_SpinnerContextCancelled +[?25l[?25h--- PASS: TestCMDRun_SpinnerContextCancelled (0.00s) +=== RUN TestCMDRun_Progress +--- PASS: TestCMDRun_Progress (5.30s) +=== RUN TestCMDRun_ProgressContextCancelled +--- FAIL: TestCMDRun_ProgressContextCancelled (0.00s) +panic: runtime error: invalid memory address or nil pointer dereference [recovered] + panic: runtime error: invalid memory address or nil pointer dereference +[signal 0xc0000005 code=0x0 addr=0x0 pc=0x11116dd] + +goroutine 81 [running]: +testing.tRunner.func1.2({0x12d4940, 0x22cba80}) + C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1734 +0x219 +testing.tRunner.func1() + C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1737 +0x359 +panic({0x12d4940?, 0x22cba80?}) + C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132 +gofr.dev/pkg/gofr/logging.(*ContextLogger).Warn(...) + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/logging/ctx_logger.go:60 +gofr.dev/examples/sample-cmd.progress(0xc0005d7ed8) + D:/Users/user/Desktop/Go_Migration/gofr/examples/sample-cmd/main.go:55 +0xbd +gofr.dev/examples/sample-cmd.TestCMDRun_ProgressContextCancelled(0xc000107880) + D:/Users/user/Desktop/Go_Migration/gofr/examples/sample-cmd/main_test.go:102 +0x231 +testing.tRunner(0xc000107880, 0x157a658) + C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1792 +0xcb +created by testing.(*T).Run in goroutine 1 + C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1851 +0x3f6 +FAIL gofr.dev/examples/sample-cmd 7.974s +=== RUN TestIntegration_AddRESTHandlers +{"level":"INFO","time":"2025-08-22T00:07:21.5008666+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.5069767+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.5085208+05:30","message":"Exporting traces to zipkin at http://localhost:2005/api/v2/spans","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:21.5112425+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:21.5168898+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"FATAL","time":"2025-08-22T00:07:21.5201915+05:30","message":"failed to create gofr_migration table, err: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +FAIL gofr.dev/examples/using-add-rest-handlers 0.448s +=== RUN TestCreateTableUser +--- PASS: TestCreateTableUser (0.00s) +=== RUN TestAll +--- PASS: TestAll (0.00s) +PASS +ok gofr.dev/examples/using-add-rest-handlers/migrations (cached) +=== RUN Test_UserPurgeCron +{"level":"INFO","time":"2025-08-22T00:03:51.6310226+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.6472427+05:30","message":"Exporting traces to zipkin at http://localhost:2005/api/v2/spans","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":"Starting cron job: counter","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":["Count:",1],"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":"Finished cron job: counter in 0s","gofrVersion":"dev"} + main_test.go:33: Metrics server running at: http://localhost:57052 +--- PASS: Test_UserPurgeCron (1.14s) +PASS +ok gofr.dev/examples/using-cron-jobs (cached) +=== RUN TestIntegration +{"level":"INFO","time":"2025-08-22T00:07:22.5584098+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.5636789+05:30","message":"Starting metrics server on port: 51348","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.5644733+05:30","message":"Starting server on port: 51347","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.6533676+05:30","message":{"trace_id":"ce781dcba7aa3ce129ea2c2930a18281","span_id":"becd0c38148d9c68","start_time":"2025-08-22T00:07:22.6533676+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51354","uri":"/transaction","response":201},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.676384+05:30","message":{"trace_id":"abf4a767d6476218bc197e05670ee0e0","span_id":"392a88e25edf05f7","start_time":"2025-08-22T00:07:22.6758757+05:30","response_time":508,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51355","uri":"/return","response":201},"gofrVersion":"dev"} + main_test.go:57: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:57 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "product_stock{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\"} 50" + Test: TestIntegration + main_test.go:58: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:58 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "total_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000" + Test: TestIntegration + main_test.go:59: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:59 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "total_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000" + Test: TestIntegration + main_test.go:60: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:60 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "transaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\"} 1" + Test: TestIntegration +--- FAIL: TestIntegration (0.22s) +FAIL +FAIL gofr.dev/examples/using-custom-metrics 0.750s +=== RUN TestMain_BindError +{"level":"INFO","time":"2025-08-22T00:03:51.6034896+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:51.6064473+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:03:51.6064473+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.6218498+05:30","message":"Starting server on port: 57042","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.6198096+05:30","message":"Starting metrics server on port: 57044","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:03:51.7100141+05:30","message":{"trace_id":"3916966568d4b7e3c4bdd84b3cc7030b","error":"no multipart boundary param in Content-Type"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:03:51.7105714+05:30","message":{"trace_id":"3916966568d4b7e3c4bdd84b3cc7030b","span_id":"988fdc0cb74ba893","start_time":"2025-08-22T00:03:51.7100141+05:30","response_time":557,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:57061","uri":"/upload","response":500},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.8074953+05:30","message":{"trace_id":"febb69b8cf4670f4e1685f9c7cc3128d","span_id":"731138328cde2d76","start_time":"2025-08-22T00:03:51.7264851+05:30","response_time":81010,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:57062","uri":"/upload","response":201},"gofrVersion":"dev"} +--- PASS: TestMain_BindError (0.31s) +PASS +ok gofr.dev/examples/using-file-bind (cached) +=== RUN Test_ListHandler +{"level":"WARN","time":"2025-08-22T00:03:51.561983+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.5771844+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.5771844+05:30","message":"Starting metrics server on port: 57043","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.5804712+05:30","message":"Starting server on port: 57041","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.8362609+05:30","message":{"trace_id":"6e79d87d1ca7e2f23ac2890555298afa","span_id":"2e1a13c5dd0059e5","start_time":"2025-08-22T00:03:51.7084069+05:30","response_time":127854,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57060","uri":"/list","response":200},"gofrVersion":"dev"} +--- PASS: Test_ListHandler (0.36s) +=== RUN Test_IndexHTML +{"level":"WARN","time":"2025-08-22T00:03:51.8426145+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.8469262+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.8469262+05:30","message":"Starting metrics server on port: 57067","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:51.8475379+05:30","message":"Starting server on port: 57066","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:53.2287678+05:30","message":{"trace_id":"16425917e60b8da157a86f2ecadebd20","span_id":"ec68787f23beb698","start_time":"2025-08-22T00:03:51.9459668+05:30","response_time":1282801,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57078","uri":"/","response":200},"gofrVersion":"dev"} +--- PASS: Test_IndexHTML (1.41s) +=== RUN Test_404HTML +{"level":"WARN","time":"2025-08-22T00:03:53.2518857+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:53.2587736+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:53.2587736+05:30","message":"Starting metrics server on port: 57080","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:53.2607855+05:30","message":"Starting server on port: 57079","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:03:53.486671+05:30","message":{"trace_id":"2906c6986c48c9818b0974882757e0d4","span_id":"ca8df88dd2f06639","start_time":"2025-08-22T00:03:53.3734045+05:30","response_time":113266,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57084","uri":"/non-existent-page","response":404},"gofrVersion":"dev"} +--- PASS: Test_404HTML (0.25s) +PASS +ok gofr.dev/examples/using-html-template (cached) +? gofr.dev/examples/using-http-auth-middleware [no test files] +=== RUN Test_main +{"level":"INFO","time":"2025-08-22T00:07:22.9540018+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.9700923+05:30","message":"Starting metrics server on port: 51358","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:22.9721243+05:30","message":"Starting server on port: 51357","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:24.3241956+05:30","message":{"timestamp":"2025-08-22T00:07:23.0662831+05:30","latency":1257912,"correlationId":"a9b4c4770ffbf5739ed49ab31184e275","responseCode":200,"httpMethod":"GET","uri":"https://catfact.ninja/fact"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:24.3247378+05:30","message":{"trace_id":"a9b4c4770ffbf5739ed49ab31184e275","span_id":"a5a6f62e92d28209","start_time":"2025-08-22T00:07:23.0662831+05:30","response_time":1258454,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51364","uri":"/fact","response":200},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:24.5942564+05:30","message":{"timestamp":"2025-08-22T00:07:24.3262528+05:30","latency":268003,"correlationId":"2f5fdc12b2d7eb7306182c809bc7b834","responseCode":200,"httpMethod":"GET","uri":"https://catfact.ninja/breeds"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:24.9897792+05:30","message":{"timestamp":"2025-08-22T00:07:24.5942564+05:30","latency":395522,"correlationId":"2f5fdc12b2d7eb7306182c809bc7b834","responseCode":404,"httpMethod":"GET","uri":"https://catfact.ninja/breed"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:24.9902883+05:30","message":{"trace_id":"2f5fdc12b2d7eb7306182c809bc7b834","span_id":"0a232354f44021ca","start_time":"2025-08-22T00:07:24.3262528+05:30","response_time":664035,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51364","uri":"/.well-known/health","response":200},"gofrVersion":"dev"} +--- PASS: Test_main (2.11s) +=== RUN TestHTTPHandlerURLError +{"level":"INFO","time":"2025-08-22T00:07:27.6965591+05:30","message":{"timestamp":"2025-08-22T00:07:24.9902883+05:30","latency":2706270,"correlationId":"d16db2446d2e72b6109a9bd030438035","responseCode":500,"httpMethod":"GET","uri":"http://invalid/fact","errorMessage":"Get \"http://invalid/fact?max_length=20\": dial tcp: lookup invalid: no such host"},"gofrVersion":"dev"} + new.go:206: Unexpected call to *container.MockMetrics.RecordHistogram([*gofr.Context.WithValue(trace.traceContextKeyType, *trace.recordingSpan).WithValue(httptrace.clientEventContextKey, *httptrace.ClientTrace).WithValue(nettrace.TraceKey, *nettrace.Trace) app_http_service_response 2.7062708 path http://invalid method GET status 500]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/new.go:206 because: there are no expected calls of the method "RecordHistogram" for that receiver +--- FAIL: TestHTTPHandlerURLError (2.71s) +=== RUN TestHTTPHandlerResponseUnmarshalError +{"level":"INFO","time":"2025-08-22T00:07:27.7020726+05:30","message":{"timestamp":"2025-08-22T00:07:27.6988989+05:30","latency":3173,"correlationId":"51316ad6146e7213e116d32b6fb43ac2","responseCode":200,"httpMethod":"GET","uri":"http://127.0.0.1:51421/fact"},"gofrVersion":"dev"} +--- PASS: TestHTTPHandlerResponseUnmarshalError (0.01s) +FAIL +FAIL gofr.dev/examples/using-http-service 5.232s +=== RUN TestExampleMigration +{"level":"INFO","time":"2025-08-22T00:07:25.2132332+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.3203237+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} + main_test.go:51: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-migrations/main_test.go:51 + Error: Received unexpected error: + Post "http://localhost:51366/employee": dial tcp [::1]:51366: connectex: No connection could be made because the target machine actively refused it. + Test: TestExampleMigration + Messages: TEST[0], Failed. + post new employee with valid data +--- FAIL: TestExampleMigration (0.18s) +FAIL +FAIL gofr.dev/examples/using-migrations 0.844s +=== RUN TestCreateTableEmployee +--- PASS: TestCreateTableEmployee (0.00s) +=== RUN TestAddEmployeeInRedis +--- PASS: TestAddEmployeeInRedis (0.00s) +=== RUN TestAddEmployeeInRedis_Error +--- PASS: TestAddEmployeeInRedis_Error (0.00s) +=== RUN TestAll +--- PASS: TestAll (0.00s) +PASS +ok gofr.dev/examples/using-migrations/migrations (cached) +=== RUN TestExamplePublisher +{"level":"INFO","time":"2025-08-22T00:07:25.2469539+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.2522659+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.2527991+05:30","message":"connecting to Kafka broker: 'localhost:9092'","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.2598333+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.2598333+05:30","message":"failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.2603423+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.2684126+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.2690429+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 13 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x1dae040?, 0x2fe1ab0?}, {0x242bee0, 0xc000115560})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x1dae040?, 0x2fe1ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x1b53dcb?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc0001163c0, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00030cc60, {0xc00005da18?, 0xbb8231?}, {0x1fec5d9?, 0x1c57ea3?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x2417ab0?, 0xc000108620?}, {0x241e000?, 0xc0001e6000?}}, 0xc000518420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc00005dfa0, 0xc000518420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x1de62a0?, 0xc00005dfa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-publisher.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main.go:13 +0xd1\ncreated by gofr.dev/examples/using-publisher.TestExamplePublisher in goroutine 6\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:25 +0x3e\n"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.2703058+05:30","message":"Starting metrics server on port: 51372","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.2703058+05:30","message":"Starting server on port: 51371","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4494064+05:30","message":{"trace_id":"bba3e3f9cde762d8c1f377fbe28d4d14","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4494064+05:30","message":{"trace_id":"bba3e3f9cde762d8c1f377fbe28d4d14","span_id":"23e3468664b08d6a","start_time":"2025-08-22T00:07:25.4485786+05:30","response_time":827,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51395","uri":"/publish-order","response":500},"gofrVersion":"dev"} + main_test.go:69: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:69 + Error: Not equal: + expected: 201 + actual : 500 + Test: TestExamplePublisher + Messages: TEST[0], Failed. + valid order +{"level":"ERROR","time":"2025-08-22T00:07:25.4542714+05:30","message":{"trace_id":"bf6efbef7cd1c220db27cc00e10a1dea","error":"invalid character ',' looking for beginning of value"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4542714+05:30","message":{"trace_id":"bf6efbef7cd1c220db27cc00e10a1dea","span_id":"3c43e0d29613d69f","start_time":"2025-08-22T00:07:25.4542714+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51396","uri":"/publish-order","response":500},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4790598+05:30","message":{"trace_id":"50c72b01ffe0009120bb66f4383b12ae","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4790598+05:30","message":{"trace_id":"50c72b01ffe0009120bb66f4383b12ae","span_id":"998b9da5d94d502a","start_time":"2025-08-22T00:07:25.4784906+05:30","response_time":569,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51397","uri":"/publish-product","response":500},"gofrVersion":"dev"} + main_test.go:69: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:69 + Error: Not equal: + expected: 201 + actual : 500 + Test: TestExamplePublisher + Messages: TEST[2], Failed. + valid product +{"level":"ERROR","time":"2025-08-22T00:07:25.4852111+05:30","message":{"trace_id":"10621fa3227816a88128204fea4be0c2","error":"invalid character ',' looking for beginning of value"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.4852111+05:30","message":{"trace_id":"10621fa3227816a88128204fea4be0c2","span_id":"6ce696632462ed29","start_time":"2025-08-22T00:07:25.4852111+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51398","uri":"/publish-product","response":500},"gofrVersion":"dev"} +--- FAIL: TestExamplePublisher (0.31s) +=== RUN TestExamplePublisherError +{"level":"INFO","time":"2025-08-22T00:07:25.4978223+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.4994451+05:30","message":"Container is being created","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.5005755+05:30","message":"connecting to Kafka broker: 'localhost:1012'","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.5030294+05:30","message":"failed to connect to broker localhost:1012: failed to dial: failed to open connection to localhost:1012: dial tcp [::1]:1012: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.5030294+05:30","message":"failed to connect to kafka at [localhost:1012], error: failed to connect to any kafka brokers","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.5030294+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:25.5053148+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.506032+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 96 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x1dae040?, 0x2fe1ab0?}, {0x242bee0, 0xc00038d6e0})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x1dae040?, 0x2fe1ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x1b53dcb?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc000117c70, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00039f0e0, {0xc0006a6000?, 0xc00012f758?}, {0x1fec5d9?, 0x1fea036?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x2417ab0?, 0xc0006a6060?}, {0x241e000?, 0xc0001e6380?}}, 0xc0001a9600)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc000137fa0, 0xc0001a9600)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x1de62a0?, 0xc000137fa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-publisher.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main.go:13 +0xd1\ncreated by gofr.dev/examples/using-publisher.TestExamplePublisherError in goroutine 89\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:81 +0xcf\n"},"gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.506032+05:30","message":"Starting metrics server on port: 51400","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.5074268+05:30","message":"Starting server on port: 51399","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.7031776+05:30","message":{"trace_id":"90a559fab33913a2d76c90d31622035a","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.7031776+05:30","message":{"trace_id":"90a559fab33913a2d76c90d31622035a","span_id":"5ffc95e73fdd68ad","start_time":"2025-08-22T00:07:25.7031776+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51416","uri":"/publish-order","response":500},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.7113729+05:30","message":{"trace_id":"121f20574a25898c1f6c34232d0d6604","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.7113729+05:30","message":{"trace_id":"121f20574a25898c1f6c34232d0d6604","span_id":"bc027d018c225fe6","start_time":"2025-08-22T00:07:25.7105594+05:30","response_time":813,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51417","uri":"/publish-product","response":500},"gofrVersion":"dev"} +--- PASS: TestExamplePublisherError (0.22s) +FAIL +FAIL gofr.dev/examples/using-publisher 1.234s +=== RUN TestAll +--- PASS: TestAll (0.00s) +PASS +ok gofr.dev/examples/using-publisher/migrations (cached) +=== RUN TestExampleSubscriber +{"level":"ERROR","time":"2025-08-22T00:07:25.5782276+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.5791742+05:30","message":"failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.6029386+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 14 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x16b1a40?, 0x28dda10?}, {0x1d2d800, 0xc0004a72c0})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x16b1a40?, 0x28dda10?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x14589ab?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc0003de690, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00015a360, {0xc00005da28?, 0x4c8231?}, {0x18ef4fe?, 0x155be85?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x1d19290?, 0xc0002a8630?}, {0x1d1f940?, 0xc000228000?}}, 0xc000356420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc00005dfa0, 0xc000356420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x16e9bc0?, 0xc00005dfa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-subscriber.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-subscriber/main.go:11 +0xd1\ncreated by gofr.dev/examples/using-subscriber.TestExampleSubscriber.func1 in goroutine 18\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-subscriber/main_test.go:51 +0x28\n"},"gofrVersion":"dev"} +failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it. +failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers + main_test.go:38: Error while publishing: can't publish message. Publisher not configured or topic is empty + main_test.go:43: Error while publishing: can't publish message. Publisher not configured or topic is empty +{"level":"ERROR","time":"2025-08-22T00:07:35.5947858+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:35.5947858+05:30","message":"could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:35.6040127+05:30","message":"error while reading from topic order-logs, err: kafka client not connected","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:35.6040127+05:30","message":"error in subscription for topic order-logs: kafka client not connected","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:35.6089733+05:30","message":"error while reading from topic products, err: kafka client not connected","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:35.6089733+05:30","message":"error in subscription for topic products: kafka client not connected","gofrVersion":"dev"} +failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it. +could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers +{"level":"ERROR","time":"2025-08-22T00:07:45.6055271+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:45.6055271+05:30","message":"could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers","gofrVersion":"dev"} + main_test.go:74: TEST[0], Failed. + valid order + main_test.go:74: TEST[1], Failed. + valid product +--- FAIL: TestExampleSubscriber (21.08s) +FAIL +FAIL gofr.dev/examples/using-subscriber 21.861s +=== RUN TestAll +--- PASS: TestAll (0.00s) +PASS +ok gofr.dev/examples/using-subscriber/migrations (cached) +=== RUN Test_WebSocket_Success +{"level":"INFO","time":"2025-08-22T00:07:25.4086078+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.4320019+05:30","message":"Starting server on port: 51388","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.4320019+05:30","message":"Starting metrics server on port: 51389","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:25.5165866+05:30","message":"Received message: Hello! GoFr","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:25.5171323+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 74 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecoveryHandler({0x1bbc420, 0x2dd2ab0}, {0x22329a0, 0xc000222090}, 0xc0005a4b40?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:143 +0xa5\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1.1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:80 +0x45\npanic({0x1bbc420?, 0x2dd2ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/websocket.(*Connection).WriteMessage(0x1b308a0?, 0x2207b80?, {0xc00041a040?, 0xc000418030?, 0x1b30f60?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket/websocket.go:86 +0x37\ngofr.dev/pkg/gofr.(*Context).WriteMessageToSocket(0xc00041a020?, {0x1b308a0, 0x2207b80})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context.go:90 +0x69\ngofr.dev/examples/using-web-socket.WSHandler(0xc000268310)\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main.go:26 +0x17a\ngofr.dev/pkg/gofr.handleWebSocketConnection(0xc000268310, 0xc000228210, 0x207cf18)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:101 +0x35\ngofr.dev/pkg/gofr.(*App).WebSocket.func1(0xc000268310)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:44 +0x19f\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:83 +0xd4\ncreated by gofr.dev/pkg/gofr.handler.ServeHTTP in goroutine 72\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:78 +0x516\n"},"gofrVersion":"dev"} +2025/08/22 00:07:25 http: response.WriteHeader on hijacked connection from gofr.dev/pkg/gofr/http/middleware.(*StatusResponseWriter).WriteHeader (logger.go:37) +2025/08/22 00:07:25 http: response.Write on hijacked connection from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).Write (resp_writer_wrapper.go:54) +{"level":"ERROR","time":"2025-08-22T00:07:25.5187228+05:30","message":{"trace_id":"234f64a322412917ede998fd80de93c0","span_id":"ee92c3d8909f1e9c","start_time":"2025-08-22T00:07:25.5128476+05:30","response_time":5875,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51406","uri":"/ws","response":500},"gofrVersion":"dev"} + main_test.go:41: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main_test.go:41 + Error: Expected nil, but got: &websocket.CloseError{Code:1006, Text:"unexpected EOF"} + Test: Test_WebSocket_Success + Messages: Unexpected error while reading message : websocket: close 1006 (abnormal closure): unexpected EOF + main_test.go:43: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main_test.go:43 + Error: Not equal: + expected: "" + actual : "Hello! GoFr" + + Diff: + --- Expected + +++ Actual + @@ -1 +1 @@ + - + +Hello! GoFr + Test: Test_WebSocket_Success + Messages: Test_WebSocket_Success Failed! +--- FAIL: Test_WebSocket_Success (0.18s) +FAIL +FAIL gofr.dev/examples/using-web-socket 0.835s +=== RUN Test_Run_SuccessCallRegisteredArgument +--- PASS: Test_Run_SuccessCallRegisteredArgument (0.00s) +=== RUN Test_Run_SuccessSkipEmptySpaceAndMatchCommandWithSpace +--- PASS: Test_Run_SuccessSkipEmptySpaceAndMatchCommandWithSpace (0.00s) +=== RUN Test_Run_SuccessCommandWithMultipleParameters +--- PASS: Test_Run_SuccessCommandWithMultipleParameters (0.00s) +=== RUN Test_Run_SuccessRouteWithSpecialCharacters +--- PASS: Test_Run_SuccessRouteWithSpecialCharacters (0.02s) +=== RUN Test_Run_ErrorRouteWithSpecialCharacters +found a restricted character in the command while registering with GoFr: 36 +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +Available commands: +found a restricted character in the command while registering with GoFr: 94 +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +Available commands: +--- PASS: Test_Run_ErrorRouteWithSpecialCharacters (0.00s) +=== RUN Test_Run_ErrorParamNotReadWithoutHyphen +--- PASS: Test_Run_ErrorParamNotReadWithoutHyphen (0.00s) +=== RUN Test_Run_ErrorNotARegisteredCommand +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +Available commands: +--- PASS: Test_Run_ErrorNotARegisteredCommand (0.00s) +=== RUN Test_Run_ErrorWhenOnlyParamAreGiven +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +Available commands: + + -route + Description: Route with hyphen +--- PASS: Test_Run_ErrorWhenOnlyParamAreGiven (0.00s) +=== RUN Test_Run_ErrorRouteRegisteredButNilHandler +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +--- PASS: Test_Run_ErrorRouteRegisteredButNilHandler (0.00s) +=== RUN Test_Run_ErrorNoArgumentGiven +--- PASS: Test_Run_ErrorNoArgumentGiven (0.00s) +=== RUN Test_Run_SuccessCallInvalidHyphens +--- PASS: Test_Run_SuccessCallInvalidHyphens (0.00s) +=== RUN Test_Run_HelpCommand +--- PASS: Test_Run_HelpCommand (0.00s) +=== RUN Test_Run_HelpCommandLong +--- PASS: Test_Run_HelpCommandLong (0.00s) +=== RUN Test_Run_UnknownCommandShowsHelp +--- PASS: Test_Run_UnknownCommandShowsHelp (0.00s) +=== RUN Test_Run_handler_help +--- PASS: Test_Run_handler_help (0.00s) +=== RUN Test_newContextSuccess +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +--- PASS: Test_newContextSuccess (0.00s) +=== RUN TestContext_AddTrace +--- PASS: TestContext_AddTrace (0.00s) +=== RUN TestContext_WriteMessageToSocket +{"level":"WARN","time":"2025-08-22T00:07:29.0570296+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:29.0667698+05:30","message":"registered static files at endpoint /static/ from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\pkg\\gofr\\static","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:29.067401+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:29.0688033+05:30","message":"Starting server on port: 51427","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:29.1752457+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 42 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecoveryHandler({0x16d1b60, 0x29d7c20}, {0x1d81a10, 0xc0002c77a0}, 0xc0002ca780?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:143 +0xa5\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1.1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:80 +0x45\npanic({0x16d1b60?, 0x29d7c20?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/websocket.(*Connection).WriteMessage(0x1642f40?, 0x1d54e80?, {0xc0002fc210?, 0x3d31e8?, 0xc00012fdd0?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket/websocket.go:86 +0x37\ngofr.dev/pkg/gofr.(*Context).WriteMessageToSocket(0xc00012fdc0?, {0x1642f40, 0x1d54e80})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context.go:90 +0x69\ngofr.dev/pkg/gofr.TestContext_WriteMessageToSocket.func1(0xc000242000)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context_test.go:92 +0x45\ngofr.dev/pkg/gofr.handleWebSocketConnection(0xc000242000, 0xc00040a2d0, 0x1bb4e98)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:101 +0x35\ngofr.dev/pkg/gofr.(*App).WebSocket.func1(0xc000242000)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:44 +0x19f\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:83 +0xd4\ncreated by gofr.dev/pkg/gofr.handler.ServeHTTP in goroutine 101\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:78 +0x516\n"},"gofrVersion":"dev"} +2025/08/22 00:07:29 http: response.WriteHeader on hijacked connection from gofr.dev/pkg/gofr/http/middleware.(*StatusResponseWriter).WriteHeader (logger.go:37) +2025/08/22 00:07:29 http: response.Write on hijacked connection from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).Write (resp_writer_wrapper.go:54) +{"level":"ERROR","time":"2025-08-22T00:07:29.176401+05:30","message":{"trace_id":"7c5bbc5e320acd978713839b5d7b4bf2","span_id":"d46f3f000fd42b3b","start_time":"2025-08-22T00:07:29.1737706+05:30","response_time":2630,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:55809","uri":"/ws","response":500},"gofrVersion":"dev"} + context_test.go:115: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context_test.go:115 + Error: Received unexpected error: + websocket: close 1006 (abnormal closure): unexpected EOF + Test: TestContext_WriteMessageToSocket + Messages: Failed to read WebSocket message +--- FAIL: TestContext_WriteMessageToSocket (0.15s) +=== RUN TestContext_WriteMessageToService +{"level":"WARN","time":"2025-08-22T00:07:29.1794822+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} +{"level":"FATAL","time":"2025-08-22T00:07:29.1845014+05:30","message":"metrics port 2121 is blocked or unreachable","gofrVersion":"dev"} +FAIL gofr.dev/pkg/gofr 0.775s +=== RUN TestRequest_Bind +--- PASS: TestRequest_Bind (0.00s) +=== RUN TestRequest_WithOneArg +--- PASS: TestRequest_WithOneArg (0.00s) +=== RUN TestHostName +--- PASS: TestHostName (0.00s) +=== RUN Test_Params +--- PASS: Test_Params (0.00s) +=== RUN TestResponder_Respond +--- PASS: TestResponder_Respond (0.00s) +PASS +ok gofr.dev/pkg/gofr/cmd (cached) +=== RUN TestNewOutput + output_test.go:17: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/cmd/terminal/output_test.go:17 + Error: Not equal: + expected: 0x1 + actual : 0xa20 + Test: TestNewOutput +--- FAIL: TestNewOutput (0.00s) +=== RUN TestReset +--- PASS: TestReset (0.00s) +=== RUN TestRestoreScreen +--- PASS: TestRestoreScreen (0.00s) +=== RUN TestSaveScreen +--- PASS: TestSaveScreen (0.00s) +=== RUN TestAltScreen +--- PASS: TestAltScreen (0.00s) +=== RUN TestExitAltScreen +--- PASS: TestExitAltScreen (0.00s) +=== RUN TestClearScreen +--- PASS: TestClearScreen (0.00s) +=== RUN TestMoveCursor +--- PASS: TestMoveCursor (0.00s) +=== RUN TestHideCursor +--- PASS: TestHideCursor (0.00s) +=== RUN TestShowCursor +--- PASS: TestShowCursor (0.00s) +=== RUN TestSaveCursorPosition +--- PASS: TestSaveCursorPosition (0.00s) +=== RUN TestRestoreCursorPosition +--- PASS: TestRestoreCursorPosition (0.00s) +=== RUN TestCursorUp +--- PASS: TestCursorUp (0.00s) +=== RUN TestCursorDown +--- PASS: TestCursorDown (0.00s) +=== RUN TestCursorForward +--- PASS: TestCursorForward (0.00s) +=== RUN TestCursorBack +--- PASS: TestCursorBack (0.00s) +=== RUN TestCursorNextLine +--- PASS: TestCursorNextLine (0.00s) +=== RUN TestCursorPrevLine +--- PASS: TestCursorPrevLine (0.00s) +=== RUN TestClearLine +--- PASS: TestClearLine (0.00s) +=== RUN TestClearLineLeft +--- PASS: TestClearLineLeft (0.00s) +=== RUN TestClearLineRight +--- PASS: TestClearLineRight (0.00s) +=== RUN TestClearLines +--- PASS: TestClearLines (0.00s) +=== RUN TestChangeScrollingRegion +--- PASS: TestChangeScrollingRegion (0.00s) +=== RUN TestInsertLines +--- PASS: TestInsertLines (0.00s) +=== RUN TestDeleteLines +--- PASS: TestDeleteLines (0.00s) +=== RUN TestSetWindowTitle +--- PASS: TestSetWindowTitle (0.00s) +=== RUN TestOutput_Printf +--- PASS: TestOutput_Printf (0.00s) +=== RUN TestOutput_Print +--- PASS: TestOutput_Print (0.00s) +=== RUN TestOutput_Println +--- PASS: TestOutput_Println (0.00s) +=== RUN TestProgressBar_SuccessCases +--- PASS: TestProgressBar_SuccessCases (0.00s) +=== RUN TestProgressBar_Fail +--- PASS: TestProgressBar_Fail (0.00s) +=== RUN TestProgressBar_Incr +--- PASS: TestProgressBar_Incr (0.00s) +=== RUN TestProgressBar_getString +=== RUN TestProgressBar_getString/current_and_total_negative +=== RUN TestProgressBar_getString/terminal_width_<_110 +=== RUN TestProgressBar_getString/0%_progress,_50_spaces +=== RUN TestProgressBar_getString/100%_progress +--- PASS: TestProgressBar_getString (0.00s) + --- PASS: TestProgressBar_getString/current_and_total_negative (0.00s) + --- PASS: TestProgressBar_getString/terminal_width_<_110 (0.00s) + --- PASS: TestProgressBar_getString/0%_progress,_50_spaces (0.00s) + --- PASS: TestProgressBar_getString/100%_progress (0.00s) +=== RUN TestSpinner +[?25l â–ˆ â–“ â–’[?25h +--- PASS: TestSpinner (3.00s) +=== RUN TestSpinner_contextDone +--- PASS: TestSpinner_contextDone (1.10s) +FAIL +FAIL gofr.dev/pkg/gofr/cmd/terminal 6.346s +=== RUN Test_EnvSuccess +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess3389546715\001/.env +--- PASS: Test_EnvSuccess (0.01s) +=== RUN Test_EnvSuccess_AppEnv_Override +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_AppEnv_Override1949864173\001/.env +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_AppEnv_Override1949864173\001/.prod.env +--- PASS: Test_EnvSuccess_AppEnv_Override (0.02s) +=== RUN Test_EnvSuccess_Local_Override +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_Local_Override3580251418\001/.env +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_Local_Override3580251418\001/.local.env +--- PASS: Test_EnvSuccess_Local_Override (0.04s) +=== RUN Test_EnvSuccess_SystemEnv_Override +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_SystemEnv_Override3548988514\001/.env +Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_SystemEnv_Override3548988514\001/.local.env + godotenv_test.go:104: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/config/godotenv_test.go:104 + Error: Not equal: + expected: "system" + actual : "local" + + Diff: + --- Expected + +++ Actual + @@ -1 +1 @@ + -system + +local + Test: Test_EnvSuccess_SystemEnv_Override + Messages: TEST Failed. + system env override +--- FAIL: Test_EnvSuccess_SystemEnv_Override (0.01s) +=== RUN Test_EnvFailureWithHyphen +Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" +Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" +Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" +Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" +Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.local.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" +--- PASS: Test_EnvFailureWithHyphen (0.02s) +=== RUN Test_NewMockConfig +--- PASS: Test_NewMockConfig (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/config 2.383s +=== RUN Test_newContainerSuccessWithLogger +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +--- PASS: Test_newContainerSuccessWithLogger (0.00s) +=== RUN Test_newContainerDBInitializationFail +Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. +{"level":"ERROR","time":"2025-08-22T00:07:34.6397897+05:30","message":"could not connect to redis at 'invalid:6379' , error: dial tcp: lookup invalid: i/o timeout","gofrVersion":"dev"} +{"level":"ERROR","time":"2025-08-22T00:07:36.908978+05:30","message":"could not connect '' user to '' database at 'invalid:3306', error: dial tcp: lookup invalid: no such host","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:39.2015496+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} +--- PASS: Test_newContainerDBInitializationFail (9.57s) +=== RUN Test_newContainerPubSubInitializationFail +{"level":"ERROR","time":"2025-08-22T00:07:39.2031555+05:30","message":"could not configure google pubsub, error: google project id not provided","gofrVersion":"dev"} +--- PASS: Test_newContainerPubSubInitializationFail (0.00s) +=== RUN TestContainer_MQTTInitialization_Default +{"level":"INFO","time":"2025-08-22T00:07:40.739935+05:30","message":"connected to MQTT at 'broker.emqx.io:1883' with clientID '6524d89e-0354-4ecc-b9be-c0bed7d8fabd'","gofrVersion":"dev"} +--- PASS: TestContainer_MQTTInitialization_Default (1.54s) +=== RUN TestContainer_GetHTTPService +--- PASS: TestContainer_GetHTTPService (0.00s) +=== RUN TestContainer_GetAppName +--- PASS: TestContainer_GetAppName (0.00s) +=== RUN TestContainer_GetAppVersion +--- PASS: TestContainer_GetAppVersion (0.00s) +=== RUN TestContainer_GetPublisher +--- PASS: TestContainer_GetPublisher (0.00s) +=== RUN TestContainer_GetSubscriber +--- PASS: TestContainer_GetSubscriber (0.00s) +=== RUN TestContainer_newContainerWithNilConfig +--- PASS: TestContainer_newContainerWithNilConfig (0.00s) +=== RUN TestContainer_Close +--- PASS: TestContainer_Close (0.00s) +=== RUN Test_GetConnectionFromContext +=== RUN Test_GetConnectionFromContext/no_connection_in_context +=== RUN Test_GetConnectionFromContext/connection_in_context +=== RUN Test_GetConnectionFromContext/wrong_type_in_context +--- PASS: Test_GetConnectionFromContext (0.00s) + --- PASS: Test_GetConnectionFromContext/no_connection_in_context (0.00s) + --- PASS: Test_GetConnectionFromContext/connection_in_context (0.00s) + --- PASS: Test_GetConnectionFromContext/wrong_type_in_context (0.00s) +=== RUN TestContainer_CreateSetsAppNameAndVersion +=== RUN TestContainer_CreateSetsAppNameAndVersion/explicit_config_values +=== RUN TestContainer_CreateSetsAppNameAndVersion/empty_config_uses_defaults +--- PASS: TestContainer_CreateSetsAppNameAndVersion (0.00s) + --- PASS: TestContainer_CreateSetsAppNameAndVersion/explicit_config_values (0.00s) + --- PASS: TestContainer_CreateSetsAppNameAndVersion/empty_config_uses_defaults (0.00s) +=== RUN TestContainer_Health + health.go:76: Unexpected call to *container.MockCouchbase.HealthCheck([context.Background.WithCancel]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health.go:76 because: there are no expected calls of the method "HealthCheck" for that receiver + controller.go:97: missing call(s) to *container.MockClickhouse.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:92 + controller.go:97: missing call(s) to *container.MockOracleDB.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:100 + controller.go:97: missing call(s) to *container.MockKVStore.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:108 + controller.go:97: missing call(s) to *container.MockDgraph.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:116 + controller.go:97: missing call(s) to *container.MockMongo.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:76 + controller.go:97: missing call(s) to *container.MockCassandraWithContext.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:84 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestContainer_Health (0.00s) +=== RUN Test_HttpServiceMock +--- PASS: Test_HttpServiceMock (0.00s) +=== RUN TestExpectSelect_ValidCases +=== RUN TestExpectSelect_ValidCases/Test_with_string_slice +=== RUN TestExpectSelect_ValidCases/Test_with_string_slice_with_multiple_expectations +=== RUN TestExpectSelect_ValidCases/Test_with_struct +=== RUN TestExpectSelect_ValidCases/Test_with_map +--- PASS: TestExpectSelect_ValidCases (0.00s) + --- PASS: TestExpectSelect_ValidCases/Test_with_string_slice (0.00s) + --- PASS: TestExpectSelect_ValidCases/Test_with_string_slice_with_multiple_expectations (0.00s) + --- PASS: TestExpectSelect_ValidCases/Test_with_struct (0.00s) + --- PASS: TestExpectSelect_ValidCases/Test_with_map (0.00s) +=== RUN TestExpectSelect_ErrorCases +=== RUN TestExpectSelect_ErrorCases/NonPointer_Value_In_ExpectSelect +=== RUN TestExpectSelect_ErrorCases/PointerValue_In_ReturnsResponse +=== RUN TestExpectSelect_ErrorCases/Type_Mismatch_Between_Expect_And_Response +=== RUN TestExpectSelect_ErrorCases/Select_Called_Without_Expectations +--- PASS: TestExpectSelect_ErrorCases (0.00s) + --- PASS: TestExpectSelect_ErrorCases/NonPointer_Value_In_ExpectSelect (0.00s) + --- PASS: TestExpectSelect_ErrorCases/PointerValue_In_ReturnsResponse (0.00s) + --- PASS: TestExpectSelect_ErrorCases/Type_Mismatch_Between_Expect_And_Response (0.00s) + --- PASS: TestExpectSelect_ErrorCases/Select_Called_Without_Expectations (0.00s) +=== RUN TestMockSQL_Dialect +--- PASS: TestMockSQL_Dialect (0.00s) +=== RUN TestMockSQL_HealthCheck +--- PASS: TestMockSQL_HealthCheck (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/container 11.702s +=== RUN Test_ErrorDB +--- PASS: Test_ErrorDB (0.00s) +=== RUN TestErrorDB_StatusCode +--- PASS: TestErrorDB_StatusCode (0.00s) +=== RUN TestErrorRecordNotFound_StatusCode +--- PASS: TestErrorRecordNotFound_StatusCode (0.00s) +PASS +ok gofr.dev/pkg/gofr/datasource (cached) +=== RUN Test_LocalFileSystemDirectoryCreation + fs_test.go:26: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:26 + Error: Received unexpected error: + mkdir temp!@#$%^&*(123: The filename, directory name, or volume label syntax is incorrect. + Test: Test_LocalFileSystemDirectoryCreation +--- FAIL: Test_LocalFileSystemDirectoryCreation (0.00s) +=== RUN Test_LocalFileOpenError +--- PASS: Test_LocalFileOpenError (0.00s) +=== RUN Test_LocalFileOpenFileError +--- PASS: Test_LocalFileOpenFileError (0.00s) +=== RUN Test_CreateReadDeleteFile +--- PASS: Test_CreateReadDeleteFile (0.02s) +=== RUN Test_CreateMoveDeleteFile + fs_test.go:101: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:101 + Error: Received unexpected error: + rename temp.txt temp.text: The process cannot access the file because it is being used by another process. + Test: Test_CreateMoveDeleteFile +--- FAIL: Test_CreateMoveDeleteFile (0.00s) +=== RUN Test_CreateUpdateReadFile +--- PASS: Test_CreateUpdateReadFile (0.03s) +=== RUN Test_CreateFileInvalidPath +--- PASS: Test_CreateFileInvalidPath (0.00s) +=== RUN Test_CreateAndDeleteMultipleDirectories +--- PASS: Test_CreateAndDeleteMultipleDirectories (0.00s) +=== RUN Test_ReadFromCSV +--- PASS: Test_ReadFromCSV (0.03s) +=== RUN Test_ReadFromCSVScanError +--- PASS: Test_ReadFromCSVScanError (0.02s) +=== RUN Test_ReadFromJSONArray +--- PASS: Test_ReadFromJSONArray (0.03s) +=== RUN Test_ReadFromJSONObject +--- PASS: Test_ReadFromJSONObject (0.03s) +=== RUN Test_ReadFromJSONArrayInvalidDelimiter +failed to decode JSON token invalid character '!' looking for beginning of value +--- PASS: Test_ReadFromJSONArrayInvalidDelimiter (0.02s) +=== RUN Test_DirectoryOperations + fs_test.go:336: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:336 + Error: Received unexpected error: + mkdir Hello_world: Cannot create a file when that file already exists. + Test: Test_DirectoryOperations +--- FAIL: Test_DirectoryOperations (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/datasource/file 2.333s +=== RUN TestMessage_Context +--- PASS: TestMessage_Context (0.00s) +=== RUN TestMessage_Bind +=== RUN TestMessage_Bind/bind_to_string +=== RUN TestMessage_Bind/bind_to_float64 +=== RUN TestMessage_Bind/bind_to_int +=== RUN TestMessage_Bind/bind_to_bool +=== RUN TestMessage_Bind/bind_to_map[string]any +=== RUN TestMessage_Bind/bind_to_struct +=== RUN TestMessage_Bind/bind_to_not_pointer +=== RUN TestMessage_Bind/bind_to_struct_with_error +--- PASS: TestMessage_Bind (0.00s) + --- PASS: TestMessage_Bind/bind_to_string (0.00s) + --- PASS: TestMessage_Bind/bind_to_float64 (0.00s) + --- PASS: TestMessage_Bind/bind_to_int (0.00s) + --- PASS: TestMessage_Bind/bind_to_bool (0.00s) + --- PASS: TestMessage_Bind/bind_to_map[string]any (0.00s) + --- PASS: TestMessage_Bind/bind_to_struct (0.00s) + --- PASS: TestMessage_Bind/bind_to_not_pointer (0.00s) + --- PASS: TestMessage_Bind/bind_to_struct_with_error (0.00s) +=== RUN TestBindString +--- PASS: TestBindString (0.00s) +=== RUN TestBindFloat64 +--- PASS: TestBindFloat64 (0.00s) +=== RUN TestBindInt +--- PASS: TestBindInt (0.00s) +=== RUN TestBindBool +--- PASS: TestBindBool (0.00s) +=== RUN TestBindStruct +--- PASS: TestBindStruct (0.00s) +=== RUN TestMessage_Param +--- PASS: TestMessage_Param (0.00s) +=== RUN TestMessage_PathParam +--- PASS: TestMessage_PathParam (0.00s) +=== RUN TestMessage_HostName +--- PASS: TestMessage_HostName (0.00s) +=== RUN TestMessage_QueryParam +--- PASS: TestMessage_QueryParam (0.00s) +PASS +ok gofr.dev/pkg/gofr/datasource/pubsub (cached) +=== RUN TestGoogleClient_New_InvalidConfig +--- PASS: TestGoogleClient_New_InvalidConfig (0.00s) +=== RUN TestGoogleClient_New_EmptyClient +connecting to google pubsub client with projectID 'test' and subscriptionName 'test +could not create Google PubSub client, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information +--- PASS: TestGoogleClient_New_EmptyClient (0.06s) +=== RUN TestGoogleClient_Publish_Success +could not create Google PubSub client, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information +could not connect to Google PubSub, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information +--- PASS: TestGoogleClient_Publish_Success (0.04s) +=== RUN TestGoogleClient_PublishTopic_Error +could not create topic 'test-topic', error: rpc error: code = Canceled desc = context canceled +--- PASS: TestGoogleClient_PublishTopic_Error (0.00s) +=== RUN TestGoogleClient_getTopic_Success +--- PASS: TestGoogleClient_getTopic_Success (0.01s) +=== RUN TestGoogleClient_getTopic_Error +--- PASS: TestGoogleClient_getTopic_Error (0.00s) +=== RUN TestGoogleClient_getSubscription +--- PASS: TestGoogleClient_getSubscription (0.01s) +=== RUN Test_validateConfigs +--- PASS: Test_validateConfigs (0.00s) +=== RUN TestGoogleClient_CloseReturnsError +--- PASS: TestGoogleClient_CloseReturnsError (0.00s) +=== RUN TestGoogleClient_CreateTopic_Success +=== RUN TestGoogleClient_CreateTopic_Success/CreateTopic_Success +=== RUN TestGoogleClient_CreateTopic_Success/CreateTopic_AlreadyExists +--- PASS: TestGoogleClient_CreateTopic_Success (0.00s) + --- PASS: TestGoogleClient_CreateTopic_Success/CreateTopic_Success (0.00s) + --- PASS: TestGoogleClient_CreateTopic_Success/CreateTopic_AlreadyExists (0.00s) +=== RUN TestGoogleClient_CreateTopic_Error +--- PASS: TestGoogleClient_CreateTopic_Error (0.00s) +=== RUN TestGoogleClient_CreateTopic_EmptyClient +--- PASS: TestGoogleClient_CreateTopic_EmptyClient (0.00s) +=== RUN TestGoogleClient_DeleteTopic +=== RUN TestGoogleClient_DeleteTopic/DeleteTopic_Success +=== RUN TestGoogleClient_DeleteTopic/DeleteTopic_NotFound +--- PASS: TestGoogleClient_DeleteTopic (0.02s) + --- PASS: TestGoogleClient_DeleteTopic/DeleteTopic_Success (0.01s) + --- PASS: TestGoogleClient_DeleteTopic/DeleteTopic_NotFound (0.00s) +=== RUN TestGoogleClient_DeleteTopic_EmptyClient +--- PASS: TestGoogleClient_DeleteTopic_EmptyClient (0.00s) +=== RUN TestGoogleClient_Query +Query: collected message 1 +--- PASS: TestGoogleClient_Query (1.02s) +=== RUN TestIsConnected_WhenClientNotNil +--- PASS: TestIsConnected_WhenClientNotNil (0.00s) +=== RUN TestClose_ClientNil +--- PASS: TestClose_ClientNil (0.00s) +=== RUN TestClose_MultipleReceiveChans_ClientNil +--- PASS: TestClose_MultipleReceiveChans_ClientNil (0.00s) +=== RUN TestSubscribe_ClientNil +--- PASS: TestSubscribe_ClientNil (0.00s) +=== RUN TestGetTopic_ClientNil +--- PASS: TestGetTopic_ClientNil (0.00s) +=== RUN TestIsConnected_WhenClientNil +--- PASS: TestIsConnected_WhenClientNil (0.00s) +=== RUN TestGoogleClient_getTopic_CreateFailure +--- PASS: TestGoogleClient_getTopic_CreateFailure (0.00s) +=== RUN TestGoogleClient_collectMessages_LimitReached +Query: collected message 1 +Query: collected message 2 +--- PASS: TestGoogleClient_collectMessages_LimitReached (0.00s) +=== RUN TestGoogleClient_getQuerySubscription_CreateFails +--- PASS: TestGoogleClient_getQuerySubscription_CreateFails (0.01s) +=== RUN TestNew +--- PASS: TestNew (0.00s) +=== RUN TestGoogleMessage_Commit +--- PASS: TestGoogleMessage_Commit (0.00s) +PASS +ok gofr.dev/pkg/gofr/datasource/pubsub/google (cached) +=== RUN TestKafkaHealth_AllBrokersUp +--- PASS: TestKafkaHealth_AllBrokersUp (0.00s) +=== RUN TestKafkaHealth_SomeBrokersUpSomeDown +--- PASS: TestKafkaHealth_SomeBrokersUpSomeDown (0.00s) +=== RUN TestKafkaHealth_AllBrokersDown +--- PASS: TestKafkaHealth_AllBrokersDown (0.00s) +=== RUN TestKafkaHealth_InvalidConnType +--- PASS: TestKafkaHealth_InvalidConnType (0.00s) +=== RUN TestGetSASLMechanism_Success +--- PASS: TestGetSASLMechanism_Success (0.00s) +=== RUN TestGetSASLMechanism_Failure +--- PASS: TestGetSASLMechanism_Failure (0.00s) +=== RUN TestValidateConfigs_ValidCases +=== RUN TestValidateConfigs_ValidCases/Valid_Config +=== RUN TestValidateConfigs_ValidCases/Valid_PLAINTEXT_Protocol +=== RUN TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_TLS_Configs +=== RUN TestValidateConfigs_ValidCases/Valid_SASL_SSL_Protocol_with_TLS_and_SASL_Configs +=== RUN TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_InsecureSkipVerify +--- PASS: TestValidateConfigs_ValidCases (0.00s) + --- PASS: TestValidateConfigs_ValidCases/Valid_Config (0.00s) + --- PASS: TestValidateConfigs_ValidCases/Valid_PLAINTEXT_Protocol (0.00s) + --- PASS: TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_TLS_Configs (0.00s) + --- PASS: TestValidateConfigs_ValidCases/Valid_SASL_SSL_Protocol_with_TLS_and_SASL_Configs (0.00s) + --- PASS: TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_InsecureSkipVerify (0.00s) +=== RUN TestValidateConfigs_InvalidCases +=== RUN TestValidateConfigs_InvalidCases/Empty_Broker +=== RUN TestValidateConfigs_InvalidCases/Zero_BatchSize +=== RUN TestValidateConfigs_InvalidCases/Zero_BatchBytes +=== RUN TestValidateConfigs_InvalidCases/Zero_BatchTimeout +=== RUN TestValidateConfigs_InvalidCases/SASL_PLAINTEXT_with_Missing_SASLMechanism +=== RUN TestValidateConfigs_InvalidCases/Unsupported_Security_Protocol +--- PASS: TestValidateConfigs_InvalidCases (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/Empty_Broker (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchSize (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchBytes (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchTimeout (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/SASL_PLAINTEXT_with_Missing_SASLMechanism (0.00s) + --- PASS: TestValidateConfigs_InvalidCases/Unsupported_Security_Protocol (0.00s) +=== RUN TestKafkaClient_PublishError +--- PASS: TestKafkaClient_PublishError (0.00s) +=== RUN TestKafkaClient_Publish +--- PASS: TestKafkaClient_Publish (0.00s) +=== RUN TestKafkaClient_SubscribeSuccess +--- PASS: TestKafkaClient_SubscribeSuccess (0.00s) +=== RUN TestKafkaClient_Subscribe_ErrConsumerGroupID +cannot subscribe as consumer_id is not provided in configs +--- PASS: TestKafkaClient_Subscribe_ErrConsumerGroupID (0.00s) +=== RUN TestKafkaClient_SubscribeError +--- PASS: TestKafkaClient_SubscribeError (0.00s) +=== RUN TestKafkaClient_Close +--- PASS: TestKafkaClient_Close (0.00s) +=== RUN TestKafkaClient_CloseError +--- PASS: TestKafkaClient_CloseError (0.00s) +=== RUN TestKafkaClient_getNewReader +--- PASS: TestKafkaClient_getNewReader (0.00s) +=== RUN TestNewKafkaClient +=== RUN TestNewKafkaClient/validation_of_configs_fail_(Empty_Broker) +could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 +=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Bytes) +could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 +=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Size) +could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 +=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Timeout) +could not initialize kafka, error: batch timeout must be greater than 0: KAFKA_BATCH_TIMEOUT must be greater than 0 +=== RUN TestNewKafkaClient/successful_initialization +failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host +failed to connect to kafka at [kafka-broker], error: failed to connect to any kafka brokers +--- PASS: TestNewKafkaClient (2.71s) + --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Empty_Broker) (0.00s) + --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Bytes) (0.00s) + --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Size) (0.00s) + --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Timeout) (0.00s) + --- PASS: TestNewKafkaClient/successful_initialization (2.71s) +=== RUN TestKafkaClient_Controller +--- PASS: TestKafkaClient_Controller (0.00s) +=== RUN TestKafkaClient_DeleteTopic +--- PASS: TestKafkaClient_DeleteTopic (0.00s) +=== RUN TestKafkaClient_CreateTopic +=== RUN TestKafkaClient_CreateTopic/successfully_creates_topic +=== RUN TestKafkaClient_CreateTopic/controller_returns_error +--- PASS: TestKafkaClient_CreateTopic (0.00s) + --- PASS: TestKafkaClient_CreateTopic/successfully_creates_topic (0.00s) + --- PASS: TestKafkaClient_CreateTopic/controller_returns_error (0.00s) +=== RUN TestKafkaClient_Subscribe_NotConnected +--- PASS: TestKafkaClient_Subscribe_NotConnected (10.00s) +=== RUN TestKafkaClient_Query_Failures +=== RUN TestKafkaClient_Query_Failures/Client_not_connected +=== RUN TestKafkaClient_Query_Failures/Empty_topic_name +=== RUN TestKafkaClient_Query_Failures/ReadMessage_fails_with_non-EOF_error +--- PASS: TestKafkaClient_Query_Failures (1.42s) + --- PASS: TestKafkaClient_Query_Failures/Client_not_connected (0.00s) + --- PASS: TestKafkaClient_Query_Failures/Empty_topic_name (0.00s) + --- PASS: TestKafkaClient_Query_Failures/ReadMessage_fails_with_non-EOF_error (1.42s) +=== RUN TestKafkaClient_Query_ArgumentParsing +=== RUN TestKafkaClient_Query_ArgumentParsing/No_arguments_-_defaults +failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host +could not connect to Kafka at 'kafka-broker', error: failed to connect to any kafka brokers +=== RUN TestKafkaClient_Query_ArgumentParsing/Only_offset_provided +=== RUN TestKafkaClient_Query_ArgumentParsing/Offset_and_limit_provided +=== RUN TestKafkaClient_Query_ArgumentParsing/Invalid_offset_type_-_ignored +=== RUN TestKafkaClient_Query_ArgumentParsing/Invalid_limit_type_-_ignored +=== RUN TestKafkaClient_Query_ArgumentParsing/Both_invalid_types_-_defaults +--- PASS: TestKafkaClient_Query_ArgumentParsing (8.49s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/No_arguments_-_defaults (1.41s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/Only_offset_provided (1.41s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/Offset_and_limit_provided (1.42s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/Invalid_offset_type_-_ignored (1.41s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/Invalid_limit_type_-_ignored (1.41s) + --- PASS: TestKafkaClient_Query_ArgumentParsing/Both_invalid_types_-_defaults (1.41s) +=== RUN TestKafkaClient_Query_ContextHandling +=== RUN TestKafkaClient_Query_ContextHandling/Context_with_existing_deadline +=== RUN TestKafkaClient_Query_ContextHandling/Context_without_deadline +=== RUN TestKafkaClient_Query_ContextHandling/Canceled_context +--- PASS: TestKafkaClient_Query_ContextHandling (2.83s) + --- PASS: TestKafkaClient_Query_ContextHandling/Context_with_existing_deadline (1.42s) + --- PASS: TestKafkaClient_Query_ContextHandling/Context_without_deadline (1.41s) + --- PASS: TestKafkaClient_Query_ContextHandling/Canceled_context (0.00s) +=== RUN TestNewMessage +--- PASS: TestNewMessage (0.00s) +=== RUN TestKafkaMessage_Commit +--- PASS: TestKafkaMessage_Commit (0.00s) +=== RUN TestKafkaMessage_CommitError +--- PASS: TestKafkaMessage_CommitError (0.00s) +=== RUN Test_CreateTLSConfig_Success +=== RUN Test_CreateTLSConfig_Success/Only_CA_Cert +failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host +could not connect to Kafka at 'kafka-broker', error: failed to connect to any kafka brokers +=== RUN Test_CreateTLSConfig_Success/CA_Cert_+_Client_Cert/Key +=== RUN Test_CreateTLSConfig_Success/Only_Client_Cert/Key +--- PASS: Test_CreateTLSConfig_Success (0.09s) + --- PASS: Test_CreateTLSConfig_Success/Only_CA_Cert (0.03s) + --- PASS: Test_CreateTLSConfig_Success/CA_Cert_+_Client_Cert/Key (0.05s) + --- PASS: Test_CreateTLSConfig_Success/Only_Client_Cert/Key (0.00s) +=== RUN TestCreateTLSConfig_Errors +=== RUN TestCreateTLSConfig_Errors/Invalid_CA_Cert_File +=== RUN TestCreateTLSConfig_Errors/Invalid_Client_Cert_File +=== RUN TestCreateTLSConfig_Errors/Invalid_Client_Key_File +--- PASS: TestCreateTLSConfig_Errors (0.00s) + --- PASS: TestCreateTLSConfig_Errors/Invalid_CA_Cert_File (0.00s) + --- PASS: TestCreateTLSConfig_Errors/Invalid_Client_Cert_File (0.00s) + --- PASS: TestCreateTLSConfig_Errors/Invalid_Client_Key_File (0.00s) +PASS +ok gofr.dev/pkg/gofr/datasource/pubsub/kafka (cached) +=== RUN TestMessage +--- PASS: TestMessage (0.00s) +=== RUN TestMQTT_New +--- PASS: TestMQTT_New (0.04s) +=== RUN TestMQTT_EmptyConfigs +--- PASS: TestMQTT_EmptyConfigs (0.82s) +=== RUN TestMQTT_getMQTTClientOptions +--- PASS: TestMQTT_getMQTTClientOptions (0.00s) +=== RUN TestMQTT_Ping +--- PASS: TestMQTT_Ping (0.00s) +=== RUN TestMQTT_Disconnect +error while publishing message, error: connection error with MQTT +--- PASS: TestMQTT_Disconnect (0.00s) +=== RUN TestMQTT_DisconnectWithSubscriptions +--- PASS: TestMQTT_DisconnectWithSubscriptions (0.00s) +=== RUN TestMQTT_PublishSuccess +--- PASS: TestMQTT_PublishSuccess (0.00s) +=== RUN TestMQTT_PublishFailure +error while publishing message, error: connection error with MQTT +--- PASS: TestMQTT_PublishFailure (0.00s) +=== RUN TestMQTT_SubscribeSuccess +--- PASS: TestMQTT_SubscribeSuccess (0.00s) +=== RUN TestMQTT_SubscribeFailure +error getting a message from MQTT, error: connection error with MQTT +--- PASS: TestMQTT_SubscribeFailure (0.00s) +=== RUN TestMQTT_SubscribeWithFunc +--- PASS: TestMQTT_SubscribeWithFunc (0.00s) +=== RUN Test_getHandler +--- PASS: Test_getHandler (0.00s) +=== RUN TestMQTT_Unsubscribe +--- PASS: TestMQTT_Unsubscribe (0.00s) +=== RUN TestMQTT_CreateTopic +--- PASS: TestMQTT_CreateTopic (0.00s) +=== RUN TestMQTT_Health +--- PASS: TestMQTT_Health (0.00s) +=== RUN TestMQTT_DeleteTopic +--- PASS: TestMQTT_DeleteTopic (0.00s) +=== RUN TestReconnectingHandler +--- PASS: TestReconnectingHandler (0.00s) +=== RUN TestConnectionLostHandler +--- PASS: TestConnectionLostHandler (0.00s) +=== RUN TestReconnectHandler +--- PASS: TestReconnectHandler (0.00s) +=== RUN TestMQTT_createMqttHandler +--- PASS: TestMQTT_createMqttHandler (0.00s) +=== RUN TestMQTT_Close +--- PASS: TestMQTT_Close (0.00s) +=== RUN Test_parseQueryArgs +=== RUN Test_parseQueryArgs/no_args +=== RUN Test_parseQueryArgs/only_timeout_arg +=== RUN Test_parseQueryArgs/timeout_and_limit_args +=== RUN Test_parseQueryArgs/invalid_timeout_type,_valid_limit +=== RUN Test_parseQueryArgs/valid_timeout,_invalid_limit_type +=== RUN Test_parseQueryArgs/only_limit_arg_(nil_for_timeout) +--- PASS: Test_parseQueryArgs (0.00s) + --- PASS: Test_parseQueryArgs/no_args (0.00s) + --- PASS: Test_parseQueryArgs/only_timeout_arg (0.00s) + --- PASS: Test_parseQueryArgs/timeout_and_limit_args (0.00s) + --- PASS: Test_parseQueryArgs/invalid_timeout_type,_valid_limit (0.00s) + --- PASS: Test_parseQueryArgs/valid_timeout,_invalid_limit_type (0.00s) + --- PASS: Test_parseQueryArgs/only_limit_arg_(nil_for_timeout) (0.00s) +=== RUN TestMQTT_createQueryMessageHandler +--- PASS: TestMQTT_createQueryMessageHandler (0.00s) +=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors +=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/success +=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_without_token_error +=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_with_token_error +=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/completed_but_token_error +--- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors (0.00s) + --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/success (0.00s) + --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_without_token_error (0.00s) + --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_with_token_error (0.00s) + --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/completed_but_token_error (0.00s) +=== RUN TestMQTT_subscribeToTopicForQuery_ContextError +=== RUN TestMQTT_subscribeToTopicForQuery_ContextError/error_context_canceled_during_wait +=== RUN TestMQTT_subscribeToTopicForQuery_ContextError/error_context_deadline_exceeded_during_wait +--- PASS: TestMQTT_subscribeToTopicForQuery_ContextError (0.01s) + --- PASS: TestMQTT_subscribeToTopicForQuery_ContextError/error_context_canceled_during_wait (0.00s) + --- PASS: TestMQTT_subscribeToTopicForQuery_ContextError/error_context_deadline_exceeded_during_wait (0.01s) +=== RUN TestMQTT_Query_SuccessCases +=== RUN TestMQTT_Query_SuccessCases/one_message_default_args +=== RUN TestMQTT_Query_SuccessCases/multiple_messages_limit_reached +=== RUN TestMQTT_Query_SuccessCases/timeout_reached_before_limit +=== RUN TestMQTT_Query_SuccessCases/no_messages_collected +Query: no messages collected for topic test/query/success within timeout/limit +--- PASS: TestMQTT_Query_SuccessCases (0.08s) + --- PASS: TestMQTT_Query_SuccessCases/one_message_default_args (0.01s) + --- PASS: TestMQTT_Query_SuccessCases/multiple_messages_limit_reached (0.01s) + --- PASS: TestMQTT_Query_SuccessCases/timeout_reached_before_limit (0.03s) + --- PASS: TestMQTT_Query_SuccessCases/no_messages_collected (0.03s) +PASS +ok gofr.dev/pkg/gofr/datasource/pubsub/mqtt (cached) +=== RUN TestRedis_HealthHandlerError +connecting to redis at '127.0.0.1:55825' on database 0 +hello 3 + hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 1239 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:27 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to ping (string) + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:29 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to info (string) + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:27 + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to info (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:29 + controller.go:251: aborting test due to missing call(s) +--- FAIL: TestRedis_HealthHandlerError (0.01s) +=== RUN TestRedisHealth_WithoutRedis +--- PASS: TestRedisHealth_WithoutRedis (0.00s) +=== RUN TestQueryLog_PrettyPrint +--- PASS: TestQueryLog_PrettyPrint (0.00s) +=== RUN Test_NewClient_HostNameMissing +--- PASS: Test_NewClient_HostNameMissing (0.00s) +=== RUN Test_NewClient_InvalidPort +could not connect to redis at 'localhost:6379' , error: dial tcp [::1]:6379: connectex: No connection could be made because the target machine actively refused it. +--- PASS: Test_NewClient_InvalidPort (0.10s) +=== RUN TestRedis_QueryLogging + hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 0 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:55 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to ping (string) + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:56 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to set (string) + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:55 + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to set (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:56 + controller.go:251: aborting test due to missing call(s) +--- FAIL: TestRedis_QueryLogging (0.00s) +=== RUN TestRedis_PipelineQueryLogging + hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 509 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:90 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to ping (string) + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:91 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to pipeline (string) + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:90 + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to pipeline (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:91 + controller.go:251: aborting test due to missing call(s) +--- FAIL: TestRedis_PipelineQueryLogging (0.00s) +=== RUN TestRedis_Close + hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 649 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: + expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:138 doesn't match the argument at index 6. + Got: [hello] ([]interface {}) + Want: is equal to ping (string) + controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:138 + controller.go:251: aborting test due to missing call(s) +--- FAIL: TestRedis_Close (0.00s) +=== RUN Test_TLSConfig +--- PASS: Test_TLSConfig (0.00s) +=== RUN Test_TLSConfigWithDummyPEM +failed to read CA cert file: open -----BEGIN CERTIFICATE-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzQw\n-----END CERTIFICATE-----: The system cannot find the path specified. +failed to load client cert/key pair: open -----BEGIN CERTIFICATE-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzQw\n-----END CERTIFICATE-----: The system cannot find the path specified. +--- PASS: Test_TLSConfigWithDummyPEM (0.00s) +FAIL gofr.dev/pkg/gofr/datasource/redis 3.222s +=== RUN Test_BindType +=== RUN Test_BindType/mysql_bind_type +=== RUN Test_BindType/postgres_bind_type +=== RUN Test_BindType/any-other-dialect_bind_type +--- PASS: Test_BindType (0.00s) + --- PASS: Test_BindType/mysql_bind_type (0.00s) + --- PASS: Test_BindType/postgres_bind_type (0.00s) + --- PASS: Test_BindType/any-other-dialect_bind_type (0.00s) +=== RUN Test_BindVar +=== RUN Test_BindVar/Postgres_bind_var +=== RUN Test_BindVar/MySQL_bind_var +=== RUN Test_BindVar/Unknown_dialect_bind_var +--- PASS: Test_BindVar (0.00s) + --- PASS: Test_BindVar/Postgres_bind_var (0.00s) + --- PASS: Test_BindVar/MySQL_bind_var (0.00s) + --- PASS: Test_BindVar/Unknown_dialect_bind_var (0.00s) +=== RUN Test_Quote +=== RUN Test_Quote/Postgres_quote +=== RUN Test_Quote/MySQL_quote +=== RUN Test_Quote/Unknown_dialect_quote +--- PASS: Test_Quote (0.00s) + --- PASS: Test_Quote/Postgres_quote (0.00s) + --- PASS: Test_Quote/MySQL_quote (0.00s) + --- PASS: Test_Quote/Unknown_dialect_quote (0.00s) +=== RUN Test_QuotedString +=== RUN Test_QuotedString/Double_quote +=== RUN Test_QuotedString/Back_quote +--- PASS: Test_QuotedString (0.00s) + --- PASS: Test_QuotedString/Double_quote (0.00s) + --- PASS: Test_QuotedString/Back_quote (0.00s) +=== RUN TestDB_SelectSingleColumnFromIntToString +--- PASS: TestDB_SelectSingleColumnFromIntToString (0.00s) +=== RUN TestDB_SelectSingleColumnFromStringToString +--- PASS: TestDB_SelectSingleColumnFromStringToString (0.00s) +=== RUN TestDB_SelectSingleColumnFromIntToInt +--- PASS: TestDB_SelectSingleColumnFromIntToInt (0.00s) +=== RUN TestDB_SelectSingleColumnFromIntToCustomInt +--- PASS: TestDB_SelectSingleColumnFromIntToCustomInt (0.00s) +=== RUN TestDB_SelectSingleColumnFromStringToCustomInt +--- PASS: TestDB_SelectSingleColumnFromStringToCustomInt (0.00s) +=== RUN TestDB_SelectContextError +--- PASS: TestDB_SelectContextError (0.00s) +=== RUN TestDB_SelectDataPointerError +--- PASS: TestDB_SelectDataPointerError (0.00s) +=== RUN TestDB_SelectSingleColumnFromStringToCustomString +--- PASS: TestDB_SelectSingleColumnFromStringToCustomString (0.00s) +=== RUN TestDB_SelectSingleRowMultiColumn +--- PASS: TestDB_SelectSingleRowMultiColumn (0.00s) +=== RUN TestDB_SelectSingleRowMultiColumnWithTags +--- PASS: TestDB_SelectSingleRowMultiColumnWithTags (0.00s) +=== RUN TestDB_SelectMultiRowMultiColumnWithTags +--- PASS: TestDB_SelectMultiRowMultiColumnWithTags (0.00s) +=== RUN TestDB_SelectSingleColumnError +--- PASS: TestDB_SelectSingleColumnError (0.00s) +=== RUN TestDB_SelectDataPointerNotExpected +--- PASS: TestDB_SelectDataPointerNotExpected (0.00s) +=== RUN TestDB_Query +--- PASS: TestDB_Query (0.00s) +=== RUN TestDB_QueryError +--- PASS: TestDB_QueryError (0.00s) +=== RUN TestDB_QueryContext +--- PASS: TestDB_QueryContext (0.00s) +=== RUN TestDB_QueryContextError +--- PASS: TestDB_QueryContextError (0.00s) +=== RUN TestDB_QueryRow +--- PASS: TestDB_QueryRow (0.00s) +=== RUN TestDB_QueryRowContext +--- PASS: TestDB_QueryRowContext (0.00s) +=== RUN TestDB_Exec +--- PASS: TestDB_Exec (0.00s) +=== RUN TestDB_ExecError +--- PASS: TestDB_ExecError (0.00s) +=== RUN TestDB_ExecContext +--- PASS: TestDB_ExecContext (0.00s) +=== RUN TestDB_ExecContextError +--- PASS: TestDB_ExecContextError (0.00s) +=== RUN TestDB_Prepare +--- PASS: TestDB_Prepare (0.00s) +=== RUN TestDB_PrepareError +--- PASS: TestDB_PrepareError (0.00s) +=== RUN TestDB_Begin +--- PASS: TestDB_Begin (0.00s) +=== RUN TestDB_BeginError +--- PASS: TestDB_BeginError (0.00s) +=== RUN TestDB_Close +--- PASS: TestDB_Close (0.00s) +=== RUN TestTx_Query +--- PASS: TestTx_Query (0.00s) +=== RUN TestTx_QueryError +--- PASS: TestTx_QueryError (0.00s) +=== RUN TestTx_QueryRow +--- PASS: TestTx_QueryRow (0.00s) +=== RUN TestTx_QueryRowContext +--- PASS: TestTx_QueryRowContext (0.00s) +=== RUN TestTx_Exec +--- PASS: TestTx_Exec (0.00s) +=== RUN TestTx_ExecError +--- PASS: TestTx_ExecError (0.00s) +=== RUN TestTx_ExecContext +--- PASS: TestTx_ExecContext (0.00s) +=== RUN TestTx_ExecContextError +--- PASS: TestTx_ExecContextError (0.00s) +=== RUN TestTx_Prepare +--- PASS: TestTx_Prepare (0.00s) +=== RUN TestTx_PrepareError +--- PASS: TestTx_PrepareError (0.00s) +=== RUN TestTx_Commit +--- PASS: TestTx_Commit (0.00s) +=== RUN TestTx_CommitError +--- PASS: TestTx_CommitError (0.00s) +=== RUN TestTx_RollBack +--- PASS: TestTx_RollBack (0.00s) +=== RUN TestTx_RollbackError +--- PASS: TestTx_RollbackError (0.00s) +=== RUN TestPrettyPrint +--- PASS: TestPrettyPrint (0.00s) +=== RUN TestClean +--- PASS: TestClean (0.00s) +=== RUN TestDB_CloseWhenNil +--- PASS: TestDB_CloseWhenNil (0.00s) +=== RUN TestDB_BeginTx +--- PASS: TestDB_BeginTx (0.00s) +=== RUN TestDB_PingSuccess +--- PASS: TestDB_PingSuccess (0.00s) +=== RUN TestDB_PingFailure +--- PASS: TestDB_PingFailure (0.00s) +=== RUN TestGetOperationType_EdgeCases +--- PASS: TestGetOperationType_EdgeCases (0.00s) +=== RUN TestClean_EmptyString +--- PASS: TestClean_EmptyString (0.00s) +=== RUN TestDB_Dialect +--- PASS: TestDB_Dialect (0.00s) +=== RUN TestGetOperationType +--- PASS: TestGetOperationType (0.00s) +=== RUN TestDB_Begin_Error +--- PASS: TestDB_Begin_Error (0.00s) +=== RUN TestDB_sendOperationStats_RecordsMilliseconds +&{SELECT SELECT * FROM users 1500 []} +--- PASS: TestDB_sendOperationStats_RecordsMilliseconds (0.00s) +=== RUN TestHealth_HealthCheck +--- PASS: TestHealth_HealthCheck (0.00s) +=== RUN TestHealth_HealthCheckDBNotConnected +--- PASS: TestHealth_HealthCheckDBNotConnected (0.00s) +=== RUN TestHealth_HealthCheckDBPingFailed +--- PASS: TestHealth_HealthCheckDBPingFailed (0.00s) +=== RUN Test_InsertQuery_Success +=== RUN Test_InsertQuery_Success/Basic_INSERT_(MySQL) +=== RUN Test_InsertQuery_Success/Basic_INSERT_(Postgres) +=== RUN Test_InsertQuery_Success/Skip_Auto-Increment_(MySQL) +=== RUN Test_InsertQuery_Success/Skip_Auto-Increment_(Postgres) +--- PASS: Test_InsertQuery_Success (0.00s) + --- PASS: Test_InsertQuery_Success/Basic_INSERT_(MySQL) (0.00s) + --- PASS: Test_InsertQuery_Success/Basic_INSERT_(Postgres) (0.00s) + --- PASS: Test_InsertQuery_Success/Skip_Auto-Increment_(MySQL) (0.00s) + --- PASS: Test_InsertQuery_Success/Skip_Auto-Increment_(Postgres) (0.00s) +=== RUN Test_InsertQuery_Error +=== RUN Test_InsertQuery_Error/NotNull_Validation_Error_(MySQL) +=== RUN Test_InsertQuery_Error/NotNull_Validation_Error_(Postgres) +--- PASS: Test_InsertQuery_Error (0.00s) + --- PASS: Test_InsertQuery_Error/NotNull_Validation_Error_(MySQL) (0.00s) + --- PASS: Test_InsertQuery_Error/NotNull_Validation_Error_(Postgres) (0.00s) +=== RUN Test_SelectQuery +=== RUN Test_SelectQuery/mysql +=== RUN Test_SelectQuery/postgres +--- PASS: Test_SelectQuery (0.00s) + --- PASS: Test_SelectQuery/mysql (0.00s) + --- PASS: Test_SelectQuery/postgres (0.00s) +=== RUN Test_SelectByQuery +=== RUN Test_SelectByQuery/mysql +=== RUN Test_SelectByQuery/postgres +--- PASS: Test_SelectByQuery (0.00s) + --- PASS: Test_SelectByQuery/mysql (0.00s) + --- PASS: Test_SelectByQuery/postgres (0.00s) +=== RUN Test_UpdateByQuery +=== RUN Test_UpdateByQuery/mysql +=== RUN Test_UpdateByQuery/postgres +--- PASS: Test_UpdateByQuery (0.00s) + --- PASS: Test_UpdateByQuery/mysql (0.00s) + --- PASS: Test_UpdateByQuery/postgres (0.00s) +=== RUN Test_DeleteByQuery +=== RUN Test_DeleteByQuery/mysql +=== RUN Test_DeleteByQuery/postgres +--- PASS: Test_DeleteByQuery (0.00s) + --- PASS: Test_DeleteByQuery/mysql (0.00s) + --- PASS: Test_DeleteByQuery/postgres (0.00s) +=== RUN Test_validateNotNull_Error +=== RUN Test_validateNotNull_Error/Float_null_error +=== RUN Test_validateNotNull_Error/Nil_channel +=== RUN Test_validateNotNull_Error/Custom_type_nil +--- PASS: Test_validateNotNull_Error (0.00s) + --- PASS: Test_validateNotNull_Error/Float_null_error (0.00s) + --- PASS: Test_validateNotNull_Error/Nil_channel (0.00s) + --- PASS: Test_validateNotNull_Error/Custom_type_nil (0.00s) +=== RUN TestNewSQL_ErrorCase +--- PASS: TestNewSQL_ErrorCase (0.00s) +=== RUN TestNewSQL_InvalidDialect +--- PASS: TestNewSQL_InvalidDialect (0.00s) +=== RUN TestNewSQL_GetDBDialect +could not connect '' user to '' database at 'localhost:3306', error: dial tcp [::1]:3306: connectex: No connection could be made because the target machine actively refused it. +could not connect '' user to '' database at 'localhost:3306', error: dial tcp [::1]:3306: connectex: No connection could be made because the target machine actively refused it. +--- PASS: TestNewSQL_GetDBDialect (0.13s) +=== RUN TestNewSQL_InvalidConfig +--- PASS: TestNewSQL_InvalidConfig (0.00s) +=== RUN TestSQL_GetDBConfig +--- PASS: TestSQL_GetDBConfig (0.00s) +=== RUN TestSQL_ConfigCases +--- PASS: TestSQL_ConfigCases (0.00s) +=== RUN TestSQL_getDBConnectionString +=== RUN TestSQL_getDBConnectionString/mysql_dialect +=== RUN TestSQL_getDBConnectionString/mysql_dialect_with_Configurable_charset +=== RUN TestSQL_getDBConnectionString/postgresql_dialect +=== RUN TestSQL_getDBConnectionString/postgresql_dialect#01 +=== RUN TestSQL_getDBConnectionString/sqlite_dialect +=== RUN TestSQL_getDBConnectionString/cockroachdb_dialect +=== RUN TestSQL_getDBConnectionString/unsupported_dialect +--- PASS: TestSQL_getDBConnectionString (0.00s) + --- PASS: TestSQL_getDBConnectionString/mysql_dialect (0.00s) + --- PASS: TestSQL_getDBConnectionString/mysql_dialect_with_Configurable_charset (0.00s) + --- PASS: TestSQL_getDBConnectionString/postgresql_dialect (0.00s) + --- PASS: TestSQL_getDBConnectionString/postgresql_dialect#01 (0.00s) + --- PASS: TestSQL_getDBConnectionString/sqlite_dialect (0.00s) + --- PASS: TestSQL_getDBConnectionString/cockroachdb_dialect (0.00s) + --- PASS: TestSQL_getDBConnectionString/unsupported_dialect (0.00s) +=== RUN Test_NewSQLMock +--- PASS: Test_NewSQLMock (0.00s) +=== RUN Test_NewSQLMockWithConfig +--- PASS: Test_NewSQLMockWithConfig (0.00s) +=== RUN Test_sqliteSuccessfulConnLogs +--- PASS: Test_sqliteSuccessfulConnLogs (0.00s) +=== RUN Test_sqliteErrConnLogs +--- PASS: Test_sqliteErrConnLogs (0.00s) +=== RUN Test_SQLRetryConnectionInfoLog +could not connect 'user' user to 'test' database at 'host:3201', error: dial tcp: lookup host: no such host + sql_test.go:366: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/sql/sql_test.go:366 + Error: "generating database connection string for 'postgres'\nregistering sql dialect 'postgres' for traces\nconnecting to 'user' user to 'test' database at 'host:3201'\n" does not contain "retrying SQL database connection" + Test: Test_SQLRetryConnectionInfoLog +--- FAIL: Test_SQLRetryConnectionInfoLog (2.81s) +=== RUN TestNewSQL_CockroachDB +generating database connection string for 'cockroachdb' +registering sql dialect 'cockroachdb' for traces +using 'postgres' as an alias for 'cockroachdb' for otel-sql registration +connecting to 'testuser' user to 'testdb' database at 'localhost:26257' +could not connect 'testuser' user to 'testdb' database at 'localhost:26257', error: dial tcp [::1]:26257: connectex: No connection could be made because the target machine actively refused it. +Test Logs for CockroachDB: +--- PASS: TestNewSQL_CockroachDB (0.00s) +=== RUN TestGetSupabaseConfig +=== RUN TestGetSupabaseConfig/Complete_Supabase_Config +=== RUN TestGetSupabaseConfig/Non-Supabase_Dialect +=== RUN TestGetSupabaseConfig/With_DB_URL +=== RUN TestGetSupabaseConfig/With_Default_Values +--- PASS: TestGetSupabaseConfig (0.00s) + --- PASS: TestGetSupabaseConfig/Complete_Supabase_Config (0.00s) + --- PASS: TestGetSupabaseConfig/Non-Supabase_Dialect (0.00s) + --- PASS: TestGetSupabaseConfig/With_DB_URL (0.00s) + --- PASS: TestGetSupabaseConfig/With_Default_Values (0.00s) +=== RUN TestConfigureSupabaseConnection +=== RUN TestConfigureSupabaseConnection/Direct_Connection +=== RUN TestConfigureSupabaseConnection/Session_Pooler_Connection +=== RUN TestConfigureSupabaseConnection/Transaction_Pooler_Connection +=== RUN TestConfigureSupabaseConnection/Unknown_Connection_Type +=== RUN TestConfigureSupabaseConnection/Default_Database_For_Empty_Database_Name +=== RUN TestConfigureSupabaseConnection/Direct_Connection_With_Non-Require_SSL_Mode +--- PASS: TestConfigureSupabaseConnection (0.00s) + --- PASS: TestConfigureSupabaseConnection/Direct_Connection (0.00s) + --- PASS: TestConfigureSupabaseConnection/Session_Pooler_Connection (0.00s) + --- PASS: TestConfigureSupabaseConnection/Transaction_Pooler_Connection (0.00s) + --- PASS: TestConfigureSupabaseConnection/Unknown_Connection_Type (0.00s) + --- PASS: TestConfigureSupabaseConnection/Default_Database_For_Empty_Database_Name (0.00s) + --- PASS: TestConfigureSupabaseConnection/Direct_Connection_With_Non-Require_SSL_Mode (0.00s) +=== RUN TestExtractProjectRefFromConnStr +=== RUN TestExtractProjectRefFromConnStr/Valid_Supabase_Connection_String +=== RUN TestExtractProjectRefFromConnStr/Valid_Connection_String_With_Extra_Parts +=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_No_@_Symbol +=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_No_db._Prefix +=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_Not_Supabase_Domain +--- PASS: TestExtractProjectRefFromConnStr (0.00s) + --- PASS: TestExtractProjectRefFromConnStr/Valid_Supabase_Connection_String (0.00s) + --- PASS: TestExtractProjectRefFromConnStr/Valid_Connection_String_With_Extra_Parts (0.00s) + --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_No_@_Symbol (0.00s) + --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_No_db._Prefix (0.00s) + --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_Not_Supabase_Domain (0.00s) +=== RUN TestNewSupabaseSQL +=== RUN TestNewSupabaseSQL/Valid_Supabase_Config +retrying SQL database connection +could not connect 'testuser' user to 'testdb' database at 'localhost:26257', error: dial tcp [::1]:26257: connectex: No connection could be made because the target machine actively refused it. +could not connect 'postgres' user to 'postgres' database at 'db.abc123.supabase.co:5432', error: dial tcp: lookup db.abc123.supabase.co: no such host +=== RUN TestNewSupabaseSQL/Non-Supabase_Dialect +=== RUN TestNewSupabaseSQL/Empty_DB_HOST_with_automatic_configuration +could not connect 'postgres' user to 'postgres' database at 'db.abc123.supabase.co:5432', error: dial tcp: lookup db.abc123.supabase.co: no such host +--- PASS: TestNewSupabaseSQL (0.03s) + --- PASS: TestNewSupabaseSQL/Valid_Supabase_Config (0.03s) + --- PASS: TestNewSupabaseSQL/Non-Supabase_Dialect (0.00s) + --- PASS: TestNewSupabaseSQL/Empty_DB_HOST_with_automatic_configuration (0.00s) +=== RUN TestIsSupabaseDialect +--- PASS: TestIsSupabaseDialect (0.00s) +=== RUN TestSupabaseWithConnectionString +--- PASS: TestSupabaseWithConnectionString (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/datasource/sql 3.263s +=== RUN TestFile +--- PASS: TestFile (0.00s) +=== RUN TestNewZip +--- PASS: TestNewZip (0.00s) +=== RUN TestNewZipError +--- PASS: TestNewZipError (0.00s) +=== RUN TestCreateLocalCopies_Success +--- PASS: TestCreateLocalCopies_Success (0.00s) +=== RUN TestCopyToBuffer +=== RUN TestCopyToBuffer/WithinSizeLimit +=== RUN TestCopyToBuffer/ExceedsMaxSize +=== RUN TestCopyToBuffer/CopyError +--- PASS: TestCopyToBuffer (0.00s) + --- PASS: TestCopyToBuffer/WithinSizeLimit (0.00s) + --- PASS: TestCopyToBuffer/ExceedsMaxSize (0.00s) + --- PASS: TestCopyToBuffer/CopyError (0.00s) +=== RUN TestCreateLocalCopies_WithDirectory +--- PASS: TestCreateLocalCopies_WithDirectory (0.00s) +=== RUN TestCreateLocalCopies_Failure +--- PASS: TestCreateLocalCopies_Failure (0.00s) +PASS +ok gofr.dev/pkg/gofr/file (cached) +=== RUN TestRPCLog_String +--- PASS: TestRPCLog_String (0.00s) +=== RUN Test_colorForGRPCCode +--- PASS: Test_colorForGRPCCode (0.00s) +=== RUN TestRPCLog_PrettyPrint +--- PASS: TestRPCLog_PrettyPrint (0.00s) +PASS +ok gofr.dev/pkg/gofr/grpc (cached) +=== RUN TestErrorEntityNotFound +--- PASS: TestErrorEntityNotFound (0.00s) +=== RUN TestErrorEntityNotFound_StatusCode +--- PASS: TestErrorEntityNotFound_StatusCode (0.00s) +=== RUN TestErrorEntityAlreadyExist +--- PASS: TestErrorEntityAlreadyExist (0.00s) +=== RUN TestErrorEntityAlreadyExist_StatusCode +--- PASS: TestErrorEntityAlreadyExist_StatusCode (0.00s) +=== RUN TestErrorInvalidParam +--- PASS: TestErrorInvalidParam (0.00s) +=== RUN TestInvalidParameter_StatusCode +--- PASS: TestInvalidParameter_StatusCode (0.00s) +=== RUN TestErrorMissingParam +--- PASS: TestErrorMissingParam (0.00s) +=== RUN TestMissingParameter_StatusCode +--- PASS: TestMissingParameter_StatusCode (0.00s) +=== RUN TestErrorInvalidRoute +--- PASS: TestErrorInvalidRoute (0.00s) +=== RUN Test_ErrorRequestTimeout +--- PASS: Test_ErrorRequestTimeout (0.00s) +=== RUN Test_ErrorErrorPanicRecovery +--- PASS: Test_ErrorErrorPanicRecovery (0.00s) +=== RUN Test_ServiceUnavailable +--- PASS: Test_ServiceUnavailable (0.00s) +=== RUN Test_setFieldValueFromData +=== RUN Test_setFieldValueFromData/String_Field +=== RUN Test_setFieldValueFromData/Int_Field +=== RUN Test_setFieldValueFromData/Float_Field +=== RUN Test_setFieldValueFromData/Bool_Field +=== RUN Test_setFieldValueFromData/Unsupported_Kind +--- PASS: Test_setFieldValueFromData (0.00s) + --- PASS: Test_setFieldValueFromData/String_Field (0.00s) + --- PASS: Test_setFieldValueFromData/Int_Field (0.00s) + --- PASS: Test_setFieldValueFromData/Float_Field (0.00s) + --- PASS: Test_setFieldValueFromData/Bool_Field (0.00s) + --- PASS: Test_setFieldValueFromData/Unsupported_Kind (0.00s) +=== RUN TestGetFieldName +=== RUN TestGetFieldName/Field_with_form_tag +=== RUN TestGetFieldName/Field_with_file_tag +=== RUN TestGetFieldName/Field_with_exported_name +=== RUN TestGetFieldName/Unexported_field_with_tag +=== RUN TestGetFieldName/Field_with_omitted_tag +--- PASS: TestGetFieldName (0.00s) + --- PASS: TestGetFieldName/Field_with_form_tag (0.00s) + --- PASS: TestGetFieldName/Field_with_file_tag (0.00s) + --- PASS: TestGetFieldName/Field_with_exported_name (0.00s) + --- PASS: TestGetFieldName/Unexported_field_with_tag (0.00s) + --- PASS: TestGetFieldName/Field_with_omitted_tag (0.00s) +=== RUN Test_SetFieldValue_Success +--- PASS: Test_SetFieldValue_Success (0.00s) +=== RUN TestSetFieldValue_InvalidKinds +--- PASS: TestSetFieldValue_InvalidKinds (0.00s) +=== RUN TestSetSliceOrArrayValue +--- PASS: TestSetSliceOrArrayValue (0.00s) +=== RUN TestSetStructValue_Success +=== RUN TestSetStructValue_Success/Valid_input_with_correct_case +=== RUN TestSetStructValue_Success/Valid_input_with_case_insensitive_fields +=== RUN TestSetStructValue_Success/Mixed_Case_and_invalid_field_names +=== RUN TestSetStructValue_Success/Case-insensitive_field_name_but_not_in_dataMap +--- PASS: TestSetStructValue_Success (0.00s) + --- PASS: TestSetStructValue_Success/Valid_input_with_correct_case (0.00s) + --- PASS: TestSetStructValue_Success/Valid_input_with_case_insensitive_fields (0.00s) + --- PASS: TestSetStructValue_Success/Mixed_Case_and_invalid_field_names (0.00s) + --- PASS: TestSetStructValue_Success/Case-insensitive_field_name_but_not_in_dataMap (0.00s) +=== RUN TestSetStructValue_Errors +=== RUN TestSetStructValue_Errors/Unexported_field +=== RUN TestSetStructValue_Errors/Unsupported_field_type +=== RUN TestSetStructValue_Errors/Invalid_JSON +=== RUN TestSetStructValue_Errors/Field_not_settable +--- PASS: TestSetStructValue_Errors (0.00s) + --- PASS: TestSetStructValue_Errors/Unexported_field (0.00s) + --- PASS: TestSetStructValue_Errors/Unsupported_field_type (0.00s) + --- PASS: TestSetStructValue_Errors/Invalid_JSON (0.00s) + --- PASS: TestSetStructValue_Errors/Field_not_settable (0.00s) +=== RUN TestParam +--- PASS: TestParam (0.00s) +=== RUN TestBind +--- PASS: TestBind (0.00s) +=== RUN TestBind_FileSuccess +--- PASS: TestBind_FileSuccess (0.00s) +=== RUN TestBind_NoContentType +--- PASS: TestBind_NoContentType (0.00s) +=== RUN Test_GetContext +--- PASS: Test_GetContext (0.00s) +=== RUN Test_bindMultipart_Fails +--- PASS: Test_bindMultipart_Fails (0.00s) +=== RUN Test_bindMultipart_Fail_ParseMultiPart +--- PASS: Test_bindMultipart_Fail_ParseMultiPart (0.00s) +=== RUN Test_Params +--- PASS: Test_Params (0.00s) +=== RUN TestBind_FormURLEncoded +--- PASS: TestBind_FormURLEncoded (0.00s) +=== RUN TestBind_BinaryOctetStream +=== RUN TestBind_BinaryOctetStream/Raw_Binary_Data +=== RUN TestBind_BinaryOctetStream/Text-Based_Binary_Data +--- PASS: TestBind_BinaryOctetStream (0.00s) + --- PASS: TestBind_BinaryOctetStream/Raw_Binary_Data (0.00s) + --- PASS: TestBind_BinaryOctetStream/Text-Based_Binary_Data (0.00s) +=== RUN TestBind_BinaryOctetStream_NotPointerToByteSlice +--- PASS: TestBind_BinaryOctetStream_NotPointerToByteSlice (0.00s) +=== RUN TestResponder +--- PASS: TestResponder (0.00s) +=== RUN TestResponder_getStatusCode +--- PASS: TestResponder_getStatusCode (0.00s) +=== RUN TestRespondWithApplicationJSON +--- PASS: TestRespondWithApplicationJSON (0.00s) +=== RUN TestIsNil +--- PASS: TestIsNil (0.00s) +=== RUN TestResponder_TemplateResponse +--- PASS: TestResponder_TemplateResponse (0.07s) +=== RUN TestResponder_CustomErrorWithResponse +--- PASS: TestResponder_CustomErrorWithResponse (0.00s) +=== RUN TestResponder_ReservedMessageField +--- PASS: TestResponder_ReservedMessageField (0.00s) +=== RUN TestResponder_EmptyErrorStruct +--- PASS: TestResponder_EmptyErrorStruct (0.00s) +=== RUN TestIsEmptyStruct +--- PASS: TestIsEmptyStruct (0.00s) +=== RUN TestResponder_RedirectResponse_Post +--- PASS: TestResponder_RedirectResponse_Post (0.00s) +=== RUN TestResponder_RedirectResponse_Head +--- PASS: TestResponder_RedirectResponse_Head (0.00s) +=== RUN TestRouter +--- PASS: TestRouter (0.03s) +=== RUN TestRouterWithMiddleware +--- PASS: TestRouterWithMiddleware (0.00s) +=== RUN Test_StaticFileServing_Static +=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/static +registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt +=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/ +registered static files at endpoint / from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt +=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/public +registered static files at endpoint /public/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt +=== RUN Test_StaticFileServing_Static/Serve_404.html_for_non-existent_file +registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +requested file not found: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\nonexistent.html +serving custom 404 page: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\404.html +=== RUN Test_StaticFileServing_Static/Serve_default_404_message_when_404.html_is_missing +registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +requested file not found: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\nonexistent.html +=== RUN Test_StaticFileServing_Static/Access_forbidden_OpenAPI_JSON +registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +unauthorized attempt to access restricted file: openapi.json +=== RUN Test_StaticFileServing_Static/Serving_File_with_no_Read_permission +registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 +serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\restricted.txt + router_test.go:192: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/router_test.go:192 + Error: Not equal: + expected: 500 + actual : 200 + Test: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission + router_test.go:193: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/router_test.go:193 + Error: Not equal: + expected: "500 Internal Server Error" + actual : "Restricted content" + + Diff: + --- Expected + +++ Actual + @@ -1 +1 @@ + -500 Internal Server Error + +Restricted content + Test: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission +--- FAIL: Test_StaticFileServing_Static (0.24s) + --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/static (0.20s) + --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/ (0.01s) + --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/public (0.01s) + --- PASS: Test_StaticFileServing_Static/Serve_404.html_for_non-existent_file (0.01s) + --- PASS: Test_StaticFileServing_Static/Serve_default_404_message_when_404.html_is_missing (0.00s) + --- PASS: Test_StaticFileServing_Static/Access_forbidden_OpenAPI_JSON (0.00s) + --- FAIL: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission (0.01s) +FAIL +FAIL gofr.dev/pkg/gofr/http 0.905s +=== RUN Test_NewAPIKeyAuthProvider +=== RUN Test_NewAPIKeyAuthProvider/0 +=== RUN Test_NewAPIKeyAuthProvider/1 +=== RUN Test_NewAPIKeyAuthProvider/2 +--- PASS: Test_NewAPIKeyAuthProvider (0.00s) + --- PASS: Test_NewAPIKeyAuthProvider/0 (0.00s) + --- PASS: Test_NewAPIKeyAuthProvider/1 (0.00s) + --- PASS: Test_NewAPIKeyAuthProvider/2 (0.00s) +=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc +=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/0 +=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/1 +=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/2 +--- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc (0.00s) + --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/0 (0.00s) + --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/1 (0.00s) + --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/2 (0.00s) +=== RUN Test_extractAuthHeader +=== RUN Test_extractAuthHeader/0 +=== RUN Test_extractAuthHeader/1 +=== RUN Test_extractAuthHeader/2 +--- PASS: Test_extractAuthHeader (0.00s) + --- PASS: Test_extractAuthHeader/0 (0.00s) + --- PASS: Test_extractAuthHeader/1 (0.00s) + --- PASS: Test_extractAuthHeader/2 (0.00s) +=== RUN Test_authMethod +--- PASS: Test_authMethod (0.00s) +=== RUN Test_validateAPIKey +=== RUN Test_validateAPIKey/0 +=== RUN Test_validateAPIKey/1 +=== RUN Test_validateAPIKey/2 +=== RUN Test_validateAPIKey/3 +=== RUN Test_validateAPIKey/4 +=== RUN Test_validateAPIKey/5 +=== RUN Test_validateAPIKey/6 +=== RUN Test_validateAPIKey/7 +=== RUN Test_validateAPIKey/8 +=== RUN Test_validateAPIKey/9 +=== RUN Test_validateAPIKey/10 +=== RUN Test_validateAPIKey/11 +=== RUN Test_validateAPIKey/12 +=== RUN Test_validateAPIKey/13 +=== RUN Test_validateAPIKey/14 +=== RUN Test_validateAPIKey/15 +=== RUN Test_validateAPIKey/16 +=== RUN Test_validateAPIKey/17 +=== RUN Test_validateAPIKey/18 +--- PASS: Test_validateAPIKey (0.00s) + --- PASS: Test_validateAPIKey/0 (0.00s) + --- PASS: Test_validateAPIKey/1 (0.00s) + --- PASS: Test_validateAPIKey/2 (0.00s) + --- PASS: Test_validateAPIKey/3 (0.00s) + --- PASS: Test_validateAPIKey/4 (0.00s) + --- PASS: Test_validateAPIKey/5 (0.00s) + --- PASS: Test_validateAPIKey/6 (0.00s) + --- PASS: Test_validateAPIKey/7 (0.00s) + --- PASS: Test_validateAPIKey/8 (0.00s) + --- PASS: Test_validateAPIKey/9 (0.00s) + --- PASS: Test_validateAPIKey/10 (0.00s) + --- PASS: Test_validateAPIKey/11 (0.00s) + --- PASS: Test_validateAPIKey/12 (0.00s) + --- PASS: Test_validateAPIKey/13 (0.00s) + --- PASS: Test_validateAPIKey/14 (0.00s) + --- PASS: Test_validateAPIKey/15 (0.00s) + --- PASS: Test_validateAPIKey/16 (0.00s) + --- PASS: Test_validateAPIKey/17 (0.00s) + --- PASS: Test_validateAPIKey/18 (0.00s) +=== RUN Test_APIKeyAuthMiddleware + apikey_auth_test.go:176: Test_APIKeyAuthMiddleware +--- PASS: Test_APIKeyAuthMiddleware (0.00s) +=== RUN TestAuthMiddleware +=== RUN TestAuthMiddleware/0 +=== RUN TestAuthMiddleware/1 +=== RUN TestAuthMiddleware/2 +=== RUN TestAuthMiddleware/3 +--- PASS: TestAuthMiddleware (0.00s) + --- PASS: TestAuthMiddleware/0 (0.00s) + --- PASS: TestAuthMiddleware/1 (0.00s) + --- PASS: TestAuthMiddleware/2 (0.00s) + --- PASS: TestAuthMiddleware/3 (0.00s) +=== RUN Test_getAuthHeaderValue +=== RUN Test_getAuthHeaderValue/0 +=== RUN Test_getAuthHeaderValue/1 +=== RUN Test_getAuthHeaderValue/2 +=== RUN Test_getAuthHeaderValue/3 +=== RUN Test_getAuthHeaderValue/4 +=== RUN Test_getAuthHeaderValue/5 +=== RUN Test_getAuthHeaderValue/6 +=== RUN Test_getAuthHeaderValue/7 +=== RUN Test_getAuthHeaderValue/8 +--- PASS: Test_getAuthHeaderValue (0.00s) + --- PASS: Test_getAuthHeaderValue/0 (0.00s) + --- PASS: Test_getAuthHeaderValue/1 (0.00s) + --- PASS: Test_getAuthHeaderValue/2 (0.00s) + --- PASS: Test_getAuthHeaderValue/3 (0.00s) + --- PASS: Test_getAuthHeaderValue/4 (0.00s) + --- PASS: Test_getAuthHeaderValue/5 (0.00s) + --- PASS: Test_getAuthHeaderValue/6 (0.00s) + --- PASS: Test_getAuthHeaderValue/7 (0.00s) + --- PASS: Test_getAuthHeaderValue/8 (0.00s) +=== RUN TestNewBasicAuthProvider +--- PASS: TestNewBasicAuthProvider (0.00s) +=== RUN TestNewBasicAuthProviderWithValidateFunc +=== RUN TestNewBasicAuthProviderWithValidateFunc/0 +=== RUN TestNewBasicAuthProviderWithValidateFunc/1 +=== RUN TestNewBasicAuthProviderWithValidateFunc/2 +--- PASS: TestNewBasicAuthProviderWithValidateFunc (0.00s) + --- PASS: TestNewBasicAuthProviderWithValidateFunc/0 (0.00s) + --- PASS: TestNewBasicAuthProviderWithValidateFunc/1 (0.00s) + --- PASS: TestNewBasicAuthProviderWithValidateFunc/2 (0.00s) +=== RUN TestBasicAuthMiddleware_extractAuthHeader +=== RUN TestBasicAuthMiddleware_extractAuthHeader/0 + basic_auth_test.go:89: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/basic_auth_test.go:89 + Error: Not equal: + expected: string("") + actual : () + Test: TestBasicAuthMiddleware_extractAuthHeader/0 +=== RUN TestBasicAuthMiddleware_extractAuthHeader/1 +=== RUN TestBasicAuthMiddleware_extractAuthHeader/2 +--- FAIL: TestBasicAuthMiddleware_extractAuthHeader (0.00s) + --- FAIL: TestBasicAuthMiddleware_extractAuthHeader/0 (0.00s) + --- PASS: TestBasicAuthMiddleware_extractAuthHeader/1 (0.00s) + --- PASS: TestBasicAuthMiddleware_extractAuthHeader/2 (0.00s) +=== RUN TestBasicAuthProvider_getAuthMethod +--- PASS: TestBasicAuthProvider_getAuthMethod (0.00s) +=== RUN TestParseBasicAuth +=== RUN TestParseBasicAuth/Valid_Basic_Auth +=== RUN TestParseBasicAuth/Invalid_Encoding +=== RUN TestParseBasicAuth/Missing_Colon_Separator +=== RUN TestParseBasicAuth/Empty_Authorization_Header +--- PASS: TestParseBasicAuth (0.00s) + --- PASS: TestParseBasicAuth/Valid_Basic_Auth (0.00s) + --- PASS: TestParseBasicAuth/Invalid_Encoding (0.00s) + --- PASS: TestParseBasicAuth/Missing_Colon_Separator (0.00s) + --- PASS: TestParseBasicAuth/Empty_Authorization_Header (0.00s) +=== RUN TestBasicAuthMiddleware_validateCredentials +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#0 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#1 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#2 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#3 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#4 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#5 +=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#6 +--- PASS: TestBasicAuthMiddleware_validateCredentials (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#0 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#1 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#2 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#3 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#4 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#5 (0.00s) + --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#6 (0.00s) +=== RUN TestGetConfigs +--- PASS: TestGetConfigs (0.00s) +=== RUN TestLogDisableProbesConfig +--- PASS: TestLogDisableProbesConfig (0.00s) +=== RUN Test_CORS +--- PASS: Test_CORS (0.00s) +=== RUN TestSetMiddlewareHeaders +--- PASS: TestSetMiddlewareHeaders (0.00s) +=== RUN TestHTTPError +=== RUN TestHTTPError/Test_Case_#0 +=== RUN TestHTTPError/Test_Case_#1 + errors_test.go:47: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/errors_test.go:47 + Error: Not equal: + expected: "invalid auth header, required errMessage `Bearer {value}` in key 'Authorization'" + actual : "invalid value in 'Authorization' header - Bearer {value}" + + Diff: + --- Expected + +++ Actual + @@ -1 +1 @@ + -invalid auth header, required errMessage `Bearer {value}` in key 'Authorization' + +invalid value in 'Authorization' header - Bearer {value} + Test: TestHTTPError/Test_Case_#1 +=== RUN TestHTTPError/Test_Case_#2 +=== RUN TestHTTPError/Test_Case_#3 +=== RUN TestHTTPError/Test_Case_#4 +--- FAIL: TestHTTPError (0.00s) + --- PASS: TestHTTPError/Test_Case_#0 (0.00s) + --- FAIL: TestHTTPError/Test_Case_#1 (0.00s) + --- PASS: TestHTTPError/Test_Case_#2 (0.00s) + --- PASS: TestHTTPError/Test_Case_#3 (0.00s) + --- PASS: TestHTTPError/Test_Case_#4 (0.00s) +=== RUN Test_getIPAddress +--- PASS: Test_getIPAddress (0.00s) +=== RUN Test_LoggingMiddleware +--- PASS: Test_LoggingMiddleware (0.00s) +=== RUN Test_LoggingMiddlewareProbesEnable +--- PASS: Test_LoggingMiddlewareProbesEnable (0.00s) +=== RUN Test_LoggingMiddlewareProbesDisable +--- PASS: Test_LoggingMiddlewareProbesDisable (0.00s) +=== RUN Test_LoggingMiddlewareError +--- PASS: Test_LoggingMiddlewareError (0.00s) +=== RUN Test_LoggingMiddlewareStringPanicHandling +&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} +--- PASS: Test_LoggingMiddlewareStringPanicHandling (0.00s) +=== RUN Test_LoggingMiddlewareErrorPanicHandling +&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} +--- PASS: Test_LoggingMiddlewareErrorPanicHandling (0.00s) +=== RUN Test_LoggingMiddlewareUnknownPanicHandling +&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} +--- PASS: Test_LoggingMiddlewareUnknownPanicHandling (0.00s) +=== RUN TestRequestLog_PrettyPrint +--- PASS: TestRequestLog_PrettyPrint (0.00s) +=== RUN Test_ColorForStatusCode +--- PASS: Test_ColorForStatusCode (0.00s) +=== RUN Test_StatusResponseWriter_WriteHeader +=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_200 +=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_404 +=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_500 +--- PASS: Test_StatusResponseWriter_WriteHeader (0.00s) + --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_200 (0.00s) + --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_404 (0.00s) + --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_500 (0.00s) +=== RUN Test_StatusResponseWriter_WriteHeader_DuplicateCalls +--- PASS: Test_StatusResponseWriter_WriteHeader_DuplicateCalls (0.00s) +=== RUN Test_StatusResponseWriter_Hijack_Supported +--- PASS: Test_StatusResponseWriter_Hijack_Supported (0.00s) +=== RUN Test_StatusResponseWriter_Hijack_NotSupported +--- PASS: Test_StatusResponseWriter_Hijack_NotSupported (0.00s) +=== RUN TestMetrics +--- PASS: TestMetrics (0.00s) +=== RUN TestMetrics_StaticFile +--- PASS: TestMetrics_StaticFile (0.15s) +=== RUN TestMetrics_StaticFileWithQueryParam +--- PASS: TestMetrics_StaticFileWithQueryParam (0.01s) +=== RUN TestOAuthProvider_extractAuthHeader +=== RUN TestOAuthProvider_extractAuthHeader/0 +=== RUN TestOAuthProvider_extractAuthHeader/1 +=== RUN TestOAuthProvider_extractAuthHeader/2 +=== RUN TestOAuthProvider_extractAuthHeader/3 +=== RUN TestOAuthProvider_extractAuthHeader/4 +=== RUN TestOAuthProvider_extractAuthHeader/5 +=== RUN TestOAuthProvider_extractAuthHeader/6 +--- PASS: TestOAuthProvider_extractAuthHeader (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/0 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/1 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/2 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/3 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/4 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/5 (0.00s) + --- PASS: TestOAuthProvider_extractAuthHeader/6 (0.00s) +=== RUN Test_NewOAuthProvider +=== RUN Test_NewOAuthProvider/0 + oauth_test.go:112: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth_test.go:112 + Error: Not equal: + expected: &errors.errorString{s:"require non-empty provider"} + actual : &errors.errorString{s:"invalid interval, require a value greater than 1 second"} + + Diff: + --- Expected + +++ Actual + @@ -1,3 +1,3 @@ + (*errors.errorString)({ + - s: (string) (len=26) "require non-empty provider" + + s: (string) (len=55) "invalid interval, require a value greater than 1 second" + }) + Test: Test_NewOAuthProvider/0 +=== RUN Test_NewOAuthProvider/1 + oauth_test.go:112: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth_test.go:112 + Error: Not equal: + expected: *errors.errorString(&errors.errorString{s:"require non-empty provider"}) + actual : () + Test: Test_NewOAuthProvider/1 +=== RUN Test_NewOAuthProvider/2 +=== RUN Test_NewOAuthProvider/3 +=== RUN Test_NewOAuthProvider/4 +=== RUN Test_NewOAuthProvider/5 +--- FAIL: Test_NewOAuthProvider (0.00s) + --- FAIL: Test_NewOAuthProvider/0 (0.00s) + --- FAIL: Test_NewOAuthProvider/1 (0.00s) + --- PASS: Test_NewOAuthProvider/2 (0.00s) + --- PASS: Test_NewOAuthProvider/3 (0.00s) + --- PASS: Test_NewOAuthProvider/4 (0.00s) + --- PASS: Test_NewOAuthProvider/5 (0.00s) +=== RUN TestOAuthProvider_getAuthMethod +panic: runtime error: invalid memory address or nil pointer dereference +[signal 0xc0000005 code=0x0 addr=0x18 pc=0x1850cf8] + +goroutine 163 [running]: +gofr.dev/pkg/gofr/http/middleware.getPublicKeys({0x1e3fe98, 0x2a27620}, {0x0, 0x0}, {0x0, 0x0}) + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:106 +0x58 +gofr.dev/pkg/gofr/http/middleware.(*PublicKeys).updateKeys(0xc00034bf40, {{0x0, 0x0}, 0x2540be400, {0x0, 0x0}}) + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:87 +0x4d +gofr.dev/pkg/gofr/http/middleware.NewOAuth.func1() + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:72 +0x4a +created by gofr.dev/pkg/gofr/http/middleware.NewOAuth in goroutine 162 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:71 +0xb3 +FAIL gofr.dev/pkg/gofr/http/middleware 0.689s +? gofr.dev/pkg/gofr/http/response [no test files] +=== RUN TestNewContextLogger +--- PASS: TestNewContextLogger (0.00s) +=== RUN TestContextLogger_WithTraceInfo_NoTraceID +--- PASS: TestContextLogger_WithTraceInfo_NoTraceID (0.00s) +=== RUN TestContextLogger_WithTraceInfo_WithTraceID +--- PASS: TestContextLogger_WithTraceInfo_WithTraceID (0.00s) +=== RUN TestContextLogger_LoggingMethods_NoTrace +--- PASS: TestContextLogger_LoggingMethods_NoTrace (0.00s) +=== RUN TestContextLogger_LoggingMethods_WithTrace +--- PASS: TestContextLogger_LoggingMethods_WithTrace (0.00s) +=== RUN TestContextLogger_Integration +--- PASS: TestContextLogger_Integration (0.00s) +=== RUN TestContextLogger_ChangeLevel +--- PASS: TestContextLogger_ChangeLevel (0.00s) +=== RUN TestLevelString +--- PASS: TestLevelString (0.00s) +=== RUN TestLevelColor +--- PASS: TestLevelColor (0.00s) +=== RUN TestGetLevelFromString +--- PASS: TestGetLevelFromString (0.00s) +=== RUN Test_changeLevel +--- PASS: Test_changeLevel (0.00s) +=== RUN TestLogger_LevelInfo +{"level":"ERROR","time":"2025-08-22T00:04:28.733986+05:30","message":"Test Error Log","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:04:28.733986+05:30","message":"Test Info Log","gofrVersion":"dev"} +--- PASS: TestLogger_LevelInfo (0.00s) +=== RUN TestLogger_LevelError +{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} +--- PASS: TestLogger_LevelError (0.00s) +=== RUN TestLogger_LevelDebug +{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Log","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Debug Log","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Info Log","gofrVersion":"dev"} +--- PASS: TestLogger_LevelDebug (0.00s) +=== RUN TestLogger_LevelNotice +{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} +{"level":"NOTICE","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Notice Log","gofrVersion":"dev"} +--- PASS: TestLogger_LevelNotice (0.00s) +=== RUN TestLogger_LevelWarn +{"level":"ERROR","time":"2025-08-22T00:04:28.7350302+05:30","message":"Test Error Log","gofrVersion":"dev"} +{"level":"WARN","time":"2025-08-22T00:04:28.7350302+05:30","message":"Test Warn Log","gofrVersion":"dev"} +--- PASS: TestLogger_LevelWarn (0.00s) +=== RUN TestLogger_LevelFatal +--- PASS: TestLogger_LevelFatal (1.00s) +=== RUN TestCheckIfTerminal +--- PASS: TestCheckIfTerminal (0.00s) +=== RUN Test_NewSilentLoggerSTDOutput +--- PASS: Test_NewSilentLoggerSTDOutput (0.00s) +=== RUN TestPrettyPrint +--- PASS: TestPrettyPrint (0.00s) +=== RUN TestNewFileLogger_UnwritablePath +--- PASS: TestNewFileLogger_UnwritablePath (0.00s) +=== RUN TestNewFileLogger_NilPath +--- PASS: TestNewFileLogger_NilPath (0.00s) +=== RUN Test_NewMockLogger +--- PASS: Test_NewMockLogger (0.00s) +=== RUN Test_NewMockLoggerErrorLogs +--- PASS: Test_NewMockLoggerErrorLogs (0.00s) +PASS +ok gofr.dev/pkg/gofr/logging (cached) +=== RUN TestRemoteLogger_UpdateLevel +&{2025-08-22 00:04:31.0195487 +0530 IST m=+0.108655601 3780 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} +LOG_LEVEL updated from INFO to DEBUG +--- PASS: TestRemoteLogger_UpdateLevel (0.20s) +=== RUN TestRemoteLogger_UpdateLevelError +&{0xc0002121e0 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.1191373 +0530 IST m=+0.208244201 665 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} +&{0xc000108b40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108c60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108d80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108ea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108fc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001090e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109200 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001097a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001098c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001099e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001983c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001984e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198600 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198720 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198840 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198960 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198a80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198ba0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198cc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109b00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198de0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000198f00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199020 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199140 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199260 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199380 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109c20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001993e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001997a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001998c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001999e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199b00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000109f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001580c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199c20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199d40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001581e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000199e60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0000 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0120 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0240 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0360 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001588a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001589c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000158f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d05a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d06c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d07e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0900 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0a20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0b40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0c60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0d80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0ea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d0fc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d10e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1200 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d17a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d18c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d19e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1b00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1c20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1d40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001d1e60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea000 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea120 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea240 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea360 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea5a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea6c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea7e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ea900 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eaa20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eab40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eac60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ead80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eaea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eafc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb0e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb200 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb7a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb8c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001591a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001eb9e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ebb00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ebc20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ebd40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001ebe60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c000 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c120 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c240 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c360 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c5a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c6c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c7e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028c900 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028ca20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001592c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028cb40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028cc60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028cd80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028cea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028cfc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d0e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d200 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001593e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000159aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d7a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d8c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028d9e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028db00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028dc20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028dd40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00028de60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa000 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa120 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa240 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa360 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa5a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa6c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa7e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aa900 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aaa20 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.2186777 +0530 IST m=+0.307784601 558 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} +&{0xc0002aaba0 Get "invalid%20url": unsupported protocol scheme ""} +--- PASS: TestRemoteLogger_UpdateLevelError (0.10s) +=== RUN Test_fetchAndUpdateLogLevel_InvalidResponse +&{0xc000080600 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aacc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002aade0 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.2198102 +0530 IST m=+0.308917101 1175 00000000000000000000000000000000 200 GET http://127.0.0.1:59991} +&{0xc00017a540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212540 Get "invalid%20url": unsupported protocol scheme ""} +--- PASS: Test_fetchAndUpdateLogLevel_InvalidResponse (0.00s) +=== RUN Test_fetchAndUpdateLogLevel_InvalidLogLevel +&{0xc000212660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a660 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.2228187 +0530 IST m=+0.311925601 1670 00000000000000000000000000000000 200 GET http://127.0.0.1:59993} +&{0xc0002aaf00 Get "invalid%20url": unsupported protocol scheme ""} +--- PASS: Test_fetchAndUpdateLogLevel_InvalidLogLevel (0.00s) +=== RUN TestDynamicLoggerSuccess +&{0xc0002ab080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab1a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab2c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab3e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ab980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002abaa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002abbc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002abce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002abe00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002abf20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d60c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d61e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000212f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d68a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002131a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002132c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002133e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d69c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d6f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d71a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d72c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d73e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7bc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7ce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002d7f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee8a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ee9c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eeae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213bc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213ce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eec00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eed20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000213f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003820c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003821e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003828a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003829c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eee40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eef60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef1a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef2c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef3e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002ef980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002efaa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000382f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002efbc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002efce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002efe00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0002eff20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e8a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040e9c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040eae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003831a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003832c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0003833e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040ec00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040ed20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040ee40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040ef60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f1a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f2c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f3e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040f980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040faa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040fbc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040fce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040fe00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00040ff20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00042c660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383da0 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.3186855 +0530 IST m=+0.407792401 2048 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} +&{0xc00017a8a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a9c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017aae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ac00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ad20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ae40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017af60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00050c0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00050c1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000080cc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000383ec0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000080e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000080f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0000811a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0000812c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0000813e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081bc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081ce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000081f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004900c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004901e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004908a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004909c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000490f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004911a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004912c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004913e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491bc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491ce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000491f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b00c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b01e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b08a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b09c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0ae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0c00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0d20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0e40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b0f60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b11a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b12c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b13e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1aa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1bc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1ce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1e00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004b1f20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc8a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cc9c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ccae0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ccc00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ccd20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cce40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ccf60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd080 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd1a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd2c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd3e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd500 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd620 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd740 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cd980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cdaa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cdbc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cdce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cde00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004cdf20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea0c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea420 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea540 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea660 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea780 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea8a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0004ea9c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b680 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b7a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00050c5a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a000 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a120 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00039e1e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00039e300 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a240 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a5a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a6c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a7e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017a900 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017aa20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ab40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ac60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017ad80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017aea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017afc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b0e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b200 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b320 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b440 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b560 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b860 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017b980 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017baa0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017bbc0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017bce0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00017be00 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00050c720 Get "invalid%20url": unsupported protocol scheme ""} +&{2025-08-22 00:04:31.4186529 +0530 IST m=+0.507759801 616 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} +&{0xc0001082a0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001086c0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc0001087e0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108a20 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108b40 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108c60 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108d80 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc000108ea0 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00039e480 Get "invalid%20url": unsupported protocol scheme ""} +&{0xc00039e5a0 Get "invalid%20url": unsupported protocol scheme ""} +--- PASS: TestDynamicLoggerSuccess (0.20s) +PASS +&{0xc00050cba0 Get "invalid%20url": unsupported protocol scheme ""} +ok gofr.dev/pkg/gofr/logging/remotelogger (cached) +=== RUN Test_MetricsGetHandler_MetricsNotRegistered +--- PASS: Test_MetricsGetHandler_MetricsNotRegistered (0.01s) +=== RUN Test_MetricsGetHandler_SystemMetricsRegistered + handler_test.go:73: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:73 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_go_sys{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" + Test: Test_MetricsGetHandler_SystemMetricsRegistered + handler_test.go:74: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:74 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" + Test: Test_MetricsGetHandler_SystemMetricsRegistered + handler_test.go:75: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:75 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" + Test: Test_MetricsGetHandler_SystemMetricsRegistered + handler_test.go:76: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:76 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" + Test: Test_MetricsGetHandler_SystemMetricsRegistered + handler_test.go:77: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:77 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_go_numGC{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" + Test: Test_MetricsGetHandler_SystemMetricsRegistered +--- FAIL: Test_MetricsGetHandler_SystemMetricsRegistered (0.01s) +=== RUN Test_MetricsGetHandler_RegisteredProfilingRoutes +--- PASS: Test_MetricsGetHandler_RegisteredProfilingRoutes (0.00s) +=== RUN Test_NewMetricsManagerSuccess +Metrics app_go_routines is not registered +Metrics app_sys_memory_alloc is not registered +Metrics app_sys_total_alloc is not registered +Metrics app_go_numGC is not registered +Metrics app_go_sys is not registered + register_test.go:41: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:41 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"" + Test: Test_NewMetricsManagerSuccess + Messages: TEST Failed. service name and version not coming in metrics + register_test.go:47: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:47 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "counter_test_total{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 1" + Test: Test_NewMetricsManagerSuccess + Messages: TEST Failed. gauge-test metrics registration failed + register_test.go:52: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:52 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "gauge_test{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 50" + Test: Test_NewMetricsManagerSuccess + Messages: TEST Failed. gauge_test metrics value not set + register_test.go:55: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:55 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "p_down_counter{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 10" + Test: Test_NewMetricsManagerSuccess + Messages: TEST Failed. up-down-counter metrics value did not reflect + register_test.go:64: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:64 + Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "histogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0" + Test: Test_NewMetricsManagerSuccess + Messages: TEST Failed. histogram metrics value did not reflect +--- FAIL: Test_NewMetricsManagerSuccess (0.01s) +=== RUN Test_NewMetricsManagerMetricsNotRegistered +--- PASS: Test_NewMetricsManagerMetricsNotRegistered (0.00s) +=== RUN Test_NewMetricsManagerInvalidMetricsName +--- PASS: Test_NewMetricsManagerInvalidMetricsName (0.00s) +=== RUN Test_NewMetricsManagerDuplicateMetricsRegistration +--- PASS: Test_NewMetricsManagerDuplicateMetricsRegistration (0.00s) +=== RUN Test_NewMetricsManagerInvalidLabelPairErrors +--- PASS: Test_NewMetricsManagerInvalidLabelPairErrors (0.00s) +=== RUN Test_NewMetricsManagerLabelHighCardinality +--- PASS: Test_NewMetricsManagerLabelHighCardinality (0.00s) +=== RUN TestStore_SetAndGetCounter +--- PASS: TestStore_SetAndGetCounter (0.00s) +=== RUN TestStore_SetAndGetUpDownCounter +--- PASS: TestStore_SetAndGetUpDownCounter (0.00s) +=== RUN TestStore_SetAndGetHistogram +--- PASS: TestStore_SetAndGetHistogram (0.00s) +=== RUN TestStore_SetAndGetGauge +--- PASS: TestStore_SetAndGetGauge (0.00s) +=== RUN TestStore_DuplicateMetricRegistration +--- PASS: TestStore_DuplicateMetricRegistration (0.00s) +=== RUN TestStore_GetNonExistentMetric +--- PASS: TestStore_GetNonExistentMetric (0.00s) +=== RUN TestStore_ConcurrentGaugeSetGet +--- PASS: TestStore_ConcurrentGaugeSetGet (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/metrics 0.410s +? gofr.dev/pkg/gofr/metrics/exporters [no test files] +=== RUN Test_ArangoCheckAndCreateMigrationTable +--- PASS: Test_ArangoCheckAndCreateMigrationTable (0.00s) +=== RUN Test_ArangoGetLastMigration +--- PASS: Test_ArangoGetLastMigration (0.00s) +=== RUN Test_ArangoCommitMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.0427633+05:30","message":"Inserted record for migration 10 in ArangoDB gofr_migrations collection","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:39.0433291+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} +--- PASS: Test_ArangoCommitMigration (0.00s) +=== RUN Test_ArangoBeginTransaction +--- PASS: Test_ArangoBeginTransaction (0.00s) +=== RUN Test_CassandraCheckAndCreateMigrationTable +--- PASS: Test_CassandraCheckAndCreateMigrationTable (0.00s) +=== RUN Test_CassandraGetLastMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.044601+05:30","message":"cassandra last migration fetched value is: 0","gofrVersion":"dev"} +--- PASS: Test_CassandraGetLastMigration (0.00s) +=== RUN Test_CassandraCommitMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.044601+05:30","message":"inserted record for migration 10 in cassandra gofr_migrations table","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:39.044601+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} +--- PASS: Test_CassandraCommitMigration (0.00s) +=== RUN Test_CassandraBeginTransaction +--- PASS: Test_CassandraBeginTransaction (0.00s) +=== RUN Test_ClickHouseCheckAndCreateMigrationTable +--- PASS: Test_ClickHouseCheckAndCreateMigrationTable (0.00s) +=== RUN Test_ClickHouseGetLastMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.0462285+05:30","message":"SQL last migration fetched value is: 0","gofrVersion":"dev"} +--- PASS: Test_ClickHouseGetLastMigration (0.00s) +=== RUN Test_ClickHouseCommitMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.0468089+05:30","message":"inserted record for migration 10 in clickhouse gofr_migrations table","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:39.0468089+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} +--- PASS: Test_ClickHouseCommitMigration (0.00s) +=== RUN Test_ClickHouseBeginTransaction +--- PASS: Test_ClickHouseBeginTransaction (0.00s) +=== RUN Test_getMigratorDatastoreNotInitialised +--- PASS: Test_getMigratorDatastoreNotInitialised (0.00s) +=== RUN Test_DGraphCheckAndCreateMigrationTable +--- PASS: Test_DGraphCheckAndCreateMigrationTable (0.00s) +=== RUN Test_DGraphGetLastMigration +=== RUN Test_DGraphGetLastMigration/success +=== RUN Test_DGraphGetLastMigration/query_error +{"level":"DEBUG","time":"2025-08-22T00:07:39.0478706+05:30","message":["Error fetching last migration:",{}],"gofrVersion":"dev"} +=== RUN Test_DGraphGetLastMigration/empty_response +--- PASS: Test_DGraphGetLastMigration (0.00s) + --- PASS: Test_DGraphGetLastMigration/success (0.00s) + --- PASS: Test_DGraphGetLastMigration/query_error (0.00s) + --- PASS: Test_DGraphGetLastMigration/empty_response (0.00s) +=== RUN Test_DGraphCommitMigration +{"level":"DEBUG","time":"2025-08-22T00:07:39.0484418+05:30","message":"Inserted record for migration 10 in Dgraph migrations","gofrVersion":"dev"} +{"level":"INFO","time":"2025-08-22T00:07:39.0484418+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} +--- PASS: Test_DGraphCommitMigration (0.00s) +=== RUN Test_DGraphBeginTransaction +--- PASS: Test_DGraphBeginTransaction (0.00s) +=== RUN Test_DGraphDS_ApplySchema +--- PASS: Test_DGraphDS_ApplySchema (0.00s) +=== RUN Test_DGraphDS_AddOrUpdateField +--- PASS: Test_DGraphDS_AddOrUpdateField (0.00s) +=== RUN Test_DGraphDS_DropField +--- PASS: Test_DGraphDS_DropField (0.00s) +=== RUN TestMigrationRunElasticsearchSuccess +--- PASS: TestMigrationRunElasticsearchSuccess (0.00s) +=== RUN TestMigrationRunElasticsearchMigrationFailure +initialized data source for Elasticsearch +Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) +Created Elasticsearch migration index: gofr_migrations +Elasticsearch last migration fetched value is: 0 +running migration 1 +Migration 1 failed. +--- PASS: TestMigrationRunElasticsearchMigrationFailure (0.00s) +=== RUN TestMigrationRunElasticsearchMigrationFailureWhileCheckingTable +initialized data source for Elasticsearch +Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) +failed to create gofr_migration table, err: failed to create migration index: assert.AnError general error for testing +--- PASS: TestMigrationRunElasticsearchMigrationFailureWhileCheckingTable (0.00s) +=== RUN TestMigrationRunElasticsearchCurrentMigrationEqualLastMigration +--- PASS: TestMigrationRunElasticsearchCurrentMigrationEqualLastMigration (0.00s) +=== RUN TestMigrationRunElasticsearchCommitError +initialized data source for Elasticsearch +Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) +Created Elasticsearch migration index: gofr_migrations +Elasticsearch last migration fetched value is: 0 +running migration 1 +Migration 1 failed. +--- PASS: TestMigrationRunElasticsearchCommitError (0.00s) +=== RUN TestElasticsearchMigrator_checkAndCreateMigrationTable_IndexExists +--- PASS: TestElasticsearchMigrator_checkAndCreateMigrationTable_IndexExists (0.00s) +=== RUN TestElasticsearchMigrator_getLastMigration_WithMigrations +Elasticsearch last migration fetched value is: 5 +--- PASS: TestElasticsearchMigrator_getLastMigration_WithMigrations (0.00s) +=== RUN TestElasticsearchMigrator_getLastMigration_NoMigrations +Elasticsearch last migration fetched value is: 0 +--- PASS: TestElasticsearchMigrator_getLastMigration_NoMigrations (0.00s) +=== RUN TestElasticsearchMigrator_commitMigration_Success +Inserted record for migration 1 in Elasticsearch gofr_migrations index +Migration 1 ran successfully +--- PASS: TestElasticsearchMigrator_commitMigration_Success (0.00s) +=== RUN TestElasticsearchMigrator_commitMigration_Failure +--- PASS: TestElasticsearchMigrator_commitMigration_Failure (0.00s) +=== RUN TestMigration_InvalidKeys +--- PASS: TestMigration_InvalidKeys (0.00s) +=== RUN TestMigration_NoDatasource +--- PASS: TestMigration_NoDatasource (0.00s) +=== RUN Test_getMigratorDBInitialisation +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for SQL","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Redis","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for DGraph","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Clickhouse","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Oracle","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Cassandra","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Mongo","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for ArangoDB","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for SurrealDB","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for Elasticsearch","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for OpenTSDB","gofrVersion":"dev"} +{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for ScyllaDB","gofrVersion":"dev"} +--- PASS: Test_getMigratorDBInitialisation (0.00s) +=== RUN TestMigrationRunClickhouseSuccess + oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver + controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:77 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations + ( + version Int64 NOT NULL, + method String NOT NULL, + start_time DateTime NOT NULL, + duration Int64 NULL, + PRIMARY KEY (version, method) + ) ENGINE = MergeTree() + ORDER BY (version, method); + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:76 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:78 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to INSERT INTO gofr_migrations (version, method, start_time, duration) VALUES (?, ?, ?, ?); (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:79 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunClickhouseSuccess (0.00s) +=== RUN TestMigrationRunClickhouseMigrationFailure + oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations + ( + version Int64 NOT NULL, + method String NOT NULL, + start_time DateTime NOT NULL, + duration Int64 NULL, + PRIMARY KEY (version, method) + ) ENGINE = MergeTree() + ORDER BY (version, method); + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:104 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:106 + controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:105 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunClickhouseMigrationFailure (0.00s) +=== RUN TestMigrationRunClickhouseMigrationFailureWhileCheckingTable + oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations + ( + version Int64 NOT NULL, + method String NOT NULL, + start_time DateTime NOT NULL, + duration Int64 NULL, + PRIMARY KEY (version, method) + ) ENGINE = MergeTree() + ORDER BY (version, method); + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:131 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunClickhouseMigrationFailureWhileCheckingTable (0.00s) +=== RUN TestMigrationRunClickhouseCurrentMigrationEqualLastMigration + oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations + ( + version Int64 NOT NULL, + method String NOT NULL, + start_time DateTime NOT NULL, + duration Int64 NULL, + PRIMARY KEY (version, method) + ) ENGINE = MergeTree() + ORDER BY (version, method); + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:154 + controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:155 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunClickhouseCurrentMigrationEqualLastMigration (0.00s) +=== RUN TestMigrationRunClickhouseCommitError + oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations + ( + version Int64 NOT NULL, + method String NOT NULL, + start_time DateTime NOT NULL, + duration Int64 NULL, + PRIMARY KEY (version, method) + ) ENGINE = MergeTree() + ORDER BY (version, method); + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:178 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:180 + controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to INSERT INTO gofr_migrations (version, method, start_time, duration) VALUES (?, ?, ?, ?); (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:181 + controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:179 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunClickhouseCommitError (0.00s) +=== RUN TestMigrationRunOracleSuccess + pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:207 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to CREATE TABLE test_oracle (id int) (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:209 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + INSERT INTO gofr_migrations (version, method, start_time, duration) + VALUES (:1, :2, :3, :4) + (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:210 + controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to + SELECT NVL(MAX(version), 0) AS last_migration + FROM gofr_migrations + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:208 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunOracleSuccess (0.00s) +=== RUN TestMigrationRunOracleCreateTableFailure + pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:226 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunOracleCreateTableFailure (0.00s) +=== RUN TestMigrationRunOracleMigrationFailure + pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:246 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to INVALID SQL (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:248 + controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to + SELECT NVL(MAX(version), 0) AS last_migration + FROM gofr_migrations + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:247 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunOracleMigrationFailure (0.00s) +=== RUN TestMigrationRunOracleCommitFailure + pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver + controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to + SELECT NVL(MAX(version), 0) AS last_migration + FROM gofr_migrations + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:268 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:267 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to CREATE TABLE ok (id int) (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:269 + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + INSERT INTO gofr_migrations (version, method, start_time, duration) + VALUES (:1, :2, :3, :4) + (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:270 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunOracleCommitFailure (0.00s) +=== RUN TestMigrationRunOracleSkipApplied + pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver + controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to + BEGIN + EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( + version NUMBER NOT NULL, + method VARCHAR2(64) NOT NULL, + start_time TIMESTAMP NOT NULL, + duration NUMBER NULL, + PRIMARY KEY (version, method) + )'; + EXCEPTION WHEN OTHERS THEN + IF SQLCODE != -955 THEN RAISE; END IF; + END; + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:291 + controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to + SELECT NVL(MAX(version), 0) AS last_migration + FROM gofr_migrations + (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:292 + controller.go:97: aborting test due to missing call(s) +--- FAIL: TestMigrationRunOracleSkipApplied (0.00s) +=== RUN Test_MongoCheckAndCreateMigrationTable +--- PASS: Test_MongoCheckAndCreateMigrationTable (0.00s) +=== RUN Test_MongoGetLastMigration +--- PASS: Test_MongoGetLastMigration (0.00s) +=== RUN Test_MongoCommitMigration +--- PASS: Test_MongoCommitMigration (0.00s) +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/creates_new_migration_file_successfully +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_already_exists_with_valid_JSON +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_contains_invalid_JSON +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) + opentsdb_test.go:84: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 + Error: An error is expected but got nil. + Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) + Messages: TEST[3] file exists but cannot be opened (permission denied) Failed! Expected error but got none +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory + opentsdb_test.go:84: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 + Error: An error is expected but got nil. + Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory + Messages: TEST[4] file creation fails due to permission denied on directory Failed! Expected error but got none +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_existing_file_with_same_name +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent + opentsdb_test.go:84: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 + Error: An error is expected but got nil. + Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent + Messages: TEST[6] directory creation fails due to permission denied on parent Failed! Expected error but got none +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/migration_file_path_is_a_directory +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/empty_file_path_directory_(current_directory) +--- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced (0.04s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/creates_new_migration_file_successfully (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_already_exists_with_valid_JSON (0.01s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_contains_invalid_JSON (0.01s) + --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) (0.00s) + --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_existing_file_with_same_name (0.00s) + --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/migration_file_path_is_a_directory (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/empty_file_path_directory_(current_directory) (0.00s) +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_ConcurrentAccess +--- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_ConcurrentAccess (0.01s) +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_MutexProtection +--- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_MutexProtection (0.00s) +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/very_long_file_path +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_special_characters +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_unicode_characters +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/nested_deep_directory_structure +=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_dots_and_relative_components +--- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases (0.02s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/very_long_file_path (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_special_characters (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_unicode_characters (0.00s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/nested_deep_directory_structure (0.01s) + --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_dots_and_relative_components (0.00s) +=== RUN Test_OpenTSDBGetLastMigration +=== RUN Test_OpenTSDBGetLastMigration/empty_migration_file +=== RUN Test_OpenTSDBGetLastMigration/file_with_migrations +=== RUN Test_OpenTSDBGetLastMigration/file_doesn't_exist +=== RUN Test_OpenTSDBGetLastMigration/invalid_JSON_file +--- PASS: Test_OpenTSDBGetLastMigration (0.01s) + --- PASS: Test_OpenTSDBGetLastMigration/empty_migration_file (0.00s) + --- PASS: Test_OpenTSDBGetLastMigration/file_with_migrations (0.01s) + --- PASS: Test_OpenTSDBGetLastMigration/file_doesn't_exist (0.00s) + --- PASS: Test_OpenTSDBGetLastMigration/invalid_JSON_file (0.00s) +=== RUN Test_OpenTSDBCommitMigration_ConcurrentAccess + opentsdb_test.go:769: Concurrent commit errors: [failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process.] + opentsdb_test.go:773: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:839 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:773 + Error: "[]" should have 20 item(s), but has 0 + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected 20 migrations but found 0 + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 1 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 2 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 3 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 4 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 5 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 6 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 7 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 8 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 9 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 10 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 11 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 12 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 13 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 14 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 15 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 16 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 17 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 18 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 19 not found in file + opentsdb_test.go:777: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 + Error: Should be true + Test: Test_OpenTSDBCommitMigration_ConcurrentAccess + Messages: Expected migration version 20 not found in file +--- FAIL: Test_OpenTSDBCommitMigration_ConcurrentAccess (0.09s) +=== RUN Test_OpenTSDBCommitMigration_ConcurrentDuplicates + opentsdb_test.go:821: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:821 + Error: Received unexpected error: + failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentDuplicates1520936309\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentDuplicates1520936309\001\test_migrations.json: The process cannot access the file because it is being used by another process. + Test: Test_OpenTSDBCommitMigration_ConcurrentDuplicates + Messages: Duplicate migration commits should not error +--- FAIL: Test_OpenTSDBCommitMigration_ConcurrentDuplicates (0.04s) +=== RUN Test_OpenTSDBCommitMigration_JSONFormatValidation + opentsdb_test.go:861: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:861 + Error: Received unexpected error: + failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_JSONFormatValidation3723859633\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_JSONFormatValidation3723859633\001\test_migrations.json: The process cannot access the file because it is being used by another process. + Test: Test_OpenTSDBCommitMigration_JSONFormatValidation +--- FAIL: Test_OpenTSDBCommitMigration_JSONFormatValidation (0.01s) +=== RUN Test_OpenTSDBCommitMigration_TimestampAccuracy + opentsdb_test.go:905: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:905 + Error: Received unexpected error: + failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_TimestampAccuracy4231843189\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_TimestampAccuracy4231843189\001\test_migrations.json: The process cannot access the file because it is being used by another process. + Test: Test_OpenTSDBCommitMigration_TimestampAccuracy +--- FAIL: Test_OpenTSDBCommitMigration_TimestampAccuracy (0.01s) +=== RUN Test_OpenTSDBValidateExistingFile +=== RUN Test_OpenTSDBValidateExistingFile/valid_empty_JSON_array +=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_single_migration +=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_multiple_migrations +=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_mixed_field_types +=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_malformed +=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_incomplete_array +=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_wrong_structure +=== RUN Test_OpenTSDBValidateExistingFile/empty_file +=== RUN Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) + opentsdb_test.go:963: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:1240 + D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:963 + Error: An error is expected but got nil. + Test: Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) + Messages: TEST[8] file exists but cannot be opened (permission denied) Failed! Expected error but got none +--- FAIL: Test_OpenTSDBValidateExistingFile (0.04s) + --- PASS: Test_OpenTSDBValidateExistingFile/valid_empty_JSON_array (0.00s) + --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_single_migration (0.00s) + --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_multiple_migrations (0.01s) + --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_mixed_field_types (0.00s) + --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_malformed (0.01s) + --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_incomplete_array (0.01s) + --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_wrong_structure (0.00s) + --- PASS: Test_OpenTSDBValidateExistingFile/empty_file (0.00s) + --- FAIL: Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) (0.00s) +=== RUN Test_OpenTSDBValidateExistingFile_ConcurrentAccess +--- PASS: Test_OpenTSDBValidateExistingFile_ConcurrentAccess (0.01s) +=== RUN Test_OpenTSDBValidateExistingFile_FileModifiedDuringRead +--- PASS: Test_OpenTSDBValidateExistingFile_FileModifiedDuringRead (0.01s) +=== RUN Test_OracleCheckAndCreateMigrationTable +--- PASS: Test_OracleCheckAndCreateMigrationTable (0.00s) +=== RUN Test_OracleGetLastMigration +--- PASS: Test_OracleGetLastMigration (0.00s) +=== RUN Test_OracleCommitMigration +--- PASS: Test_OracleCommitMigration (0.00s) +=== RUN Test_OracleBeginTransaction + oracle_test.go:98: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle_test.go:98 + Error: "" does not contain "OracleDB Migrator begin successfully" + Test: Test_OracleBeginTransaction +--- FAIL: Test_OracleBeginTransaction (0.00s) +=== RUN Test_CreateTopic +--- PASS: Test_CreateTopic (0.00s) +=== RUN Test_DeleteTopic +--- PASS: Test_DeleteTopic (0.00s) +=== RUN Test_Query +--- PASS: Test_Query (0.00s) +=== RUN Test_PubSubCheckAndCreateMigrationTable +--- PASS: Test_PubSubCheckAndCreateMigrationTable (0.00s) +=== RUN Test_PubSubCommitMigration_Success +--- PASS: Test_PubSubCommitMigration_Success (0.00s) +=== RUN Test_PubSubCommitMigration_PublishError +--- PASS: Test_PubSubCommitMigration_PublishError (0.00s) +=== RUN Test_PubSubGetLastMigration +=== RUN Test_PubSubGetLastMigration/pubsub_has_higher_version_than_next_migrator +=== RUN Test_PubSubGetLastMigration/next_migrator_has_higher_version_than_pubsub +=== RUN Test_PubSubGetLastMigration/query_error_but_next_migrator_has_value +=== RUN Test_PubSubGetLastMigration/empty_result_but_next_migrator_has_value +--- PASS: Test_PubSubGetLastMigration (0.00s) + --- PASS: Test_PubSubGetLastMigration/pubsub_has_higher_version_than_next_migrator (0.00s) + --- PASS: Test_PubSubGetLastMigration/next_migrator_has_higher_version_than_pubsub (0.00s) + --- PASS: Test_PubSubGetLastMigration/query_error_but_next_migrator_has_value (0.00s) + --- PASS: Test_PubSubGetLastMigration/empty_result_but_next_migrator_has_value (0.00s) +=== RUN TestRedis_Get +--- PASS: TestRedis_Get (0.00s) +=== RUN TestRedis_Set +--- PASS: TestRedis_Set (0.00s) +=== RUN TestRedis_Del +--- PASS: TestRedis_Del (0.00s) +=== RUN TestRedis_Rename +--- PASS: TestRedis_Rename (0.00s) +=== RUN TestRedisMigrator_GetLastMigration +--- PASS: TestRedisMigrator_GetLastMigration (0.00s) +=== RUN TestRedisMigrator_beginTransaction +--- PASS: TestRedisMigrator_beginTransaction (0.00s) +=== RUN TestScyllaCheckAndCreateMigrationTable +--- PASS: TestScyllaCheckAndCreateMigrationTable (0.00s) +=== RUN TestScyllaGetLastMigration +--- PASS: TestScyllaGetLastMigration (0.00s) +=== RUN TestScyllaCommitMigration +--- PASS: TestScyllaCommitMigration (0.00s) +=== RUN TestScyllaBeginTransaction +--- PASS: TestScyllaBeginTransaction (0.00s) +=== RUN TestScyllaMigrator_Rollback +--- PASS: TestScyllaMigrator_Rollback (0.00s) +=== RUN TestQuery +=== RUN TestQuery/successful_query +=== RUN TestQuery/query_error +--- PASS: TestQuery (0.00s) + --- PASS: TestQuery/successful_query (0.00s) + --- PASS: TestQuery/query_error (0.00s) +=== RUN TestQueryRow +=== RUN TestQueryRow/successful_query_row +--- PASS: TestQueryRow (0.00s) + --- PASS: TestQueryRow/successful_query_row (0.00s) +=== RUN TestQueryRowContext +=== RUN TestQueryRowContext/successful_query_row_context +--- PASS: TestQueryRowContext (0.00s) + --- PASS: TestQueryRowContext/successful_query_row_context (0.00s) +=== RUN TestExec +=== RUN TestExec/successful_exec +=== RUN TestExec/exec_error +--- PASS: TestExec (0.00s) + --- PASS: TestExec/successful_exec (0.00s) + --- PASS: TestExec/exec_error (0.00s) +=== RUN TestExecContext +=== RUN TestExecContext/successful_exec_context +--- PASS: TestExecContext (0.00s) + --- PASS: TestExecContext/successful_exec_context (0.00s) +=== RUN TestCheckAndCreateMigrationTableSuccess +--- PASS: TestCheckAndCreateMigrationTableSuccess (0.00s) +=== RUN TestCheckAndCreateMigrationTableExecError +--- PASS: TestCheckAndCreateMigrationTableExecError (0.00s) +=== RUN TestBeginTransactionSuccess +--- PASS: TestBeginTransactionSuccess (0.00s) +=== RUN TestBeginTransactionDBError +--- PASS: TestBeginTransactionDBError (0.00s) +=== RUN TestRollbackNoTransaction +--- PASS: TestRollbackNoTransaction (0.00s) +=== RUN TestApply +--- PASS: TestApply (0.00s) +=== RUN TestGetLastMigration_UseMigratorFallback +--- PASS: TestGetLastMigration_UseMigratorFallback (0.00s) +=== RUN TestGetLastMigration_MigratorReturnsLesser +--- PASS: TestGetLastMigration_MigratorReturnsLesser (0.00s) +=== RUN TestBeginTransaction_ReplaceSQLTx +--- PASS: TestBeginTransaction_ReplaceSQLTx (0.00s) +=== RUN TestCheckAndCreateMigrationTable_ErrorCreatingTable +--- PASS: TestCheckAndCreateMigrationTable_ErrorCreatingTable (0.00s) +=== RUN Test_SurrealCheckAndCreateMigrationTable +--- PASS: Test_SurrealCheckAndCreateMigrationTable (0.00s) +=== RUN Test_SurrealGetLastMigration +--- PASS: Test_SurrealGetLastMigration (0.00s) +=== RUN Test_SurrealCommitMigration +--- PASS: Test_SurrealCommitMigration (0.00s) +=== RUN Test_SurrealBeginTransaction +--- PASS: Test_SurrealBeginTransaction (0.00s) +=== RUN TestSurrealDS_Query +--- PASS: TestSurrealDS_Query (0.00s) +=== RUN TestSurrealDS_CreateNamespace +--- PASS: TestSurrealDS_CreateNamespace (0.00s) +=== RUN TestSurrealDS_CreateDatabase +--- PASS: TestSurrealDS_CreateDatabase (0.00s) +=== RUN TestSurrealDS_DropNamespace +--- PASS: TestSurrealDS_DropNamespace (0.00s) +=== RUN TestSurrealDS_DropDatabase +--- PASS: TestSurrealDS_DropDatabase (0.00s) +FAIL gofr.dev/pkg/gofr/migration 0.805s +=== RUN TestNewAPIKeyConfig +--- PASS: TestNewAPIKeyConfig (0.00s) +=== RUN TestAddAuthorizationHeader_APIKey +--- PASS: TestAddAuthorizationHeader_APIKey (0.00s) +=== RUN TestAuthProvider +=== RUN TestAuthProvider/Test_Case_#0 +&{2025-08-22 00:07:41.4463643 +0530 IST m=+0.730737201 332 00000000000000000000000000000000 200 GET http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4489343 +0530 IST m=+0.733307201 1036 00000000000000000000000000000000 200 POST http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 PUT http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55860/test} +=== RUN TestAuthProvider/Test_Case_#1 +&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 1082 00000000000000000000000000000000 401 GET http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4515608 +0530 IST m=+0.735933701 0 00000000000000000000000000000000 401 POST http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4515608 +0530 IST m=+0.735933701 526 00000000000000000000000000000000 401 PUT http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4520869 +0530 IST m=+0.736459801 0 00000000000000000000000000000000 401 PATCH http://127.0.0.1:55860/test} +&{2025-08-22 00:07:41.4520869 +0530 IST m=+0.736459801 0 00000000000000000000000000000000 401 DELETE http://127.0.0.1:55860/test} +=== RUN TestAuthProvider/Test_Case_#2 +=== RUN TestAuthProvider/Test_Case_#3 +&{2025-08-22 00:07:41.452615 +0530 IST m=+0.736987901 529 00000000000000000000000000000000 200 GET http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4536537 +0530 IST m=+0.738026601 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4536537 +0530 IST m=+0.738026601 510 00000000000000000000000000000000 200 PUT http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 0 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55863/test} +=== RUN TestAuthProvider/Test_Case_#4 +&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 793 00000000000000000000000000000000 401 GET http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 POST http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 PUT http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 PATCH http://127.0.0.1:55863/test} +&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 DELETE http://127.0.0.1:55863/test} +=== RUN TestAuthProvider/Test_Case_#5 +=== RUN TestAuthProvider/Test_Case_#6 +&{2025-08-22 00:07:41.4572818 +0530 IST m=+0.741654701 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55862/test} +&{2025-08-22 00:07:41.4625728 +0530 IST m=+0.746945701 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55862/test} +&{2025-08-22 00:07:41.4644058 +0530 IST m=+0.748778701 0 00000000000000000000000000000000 200 PUT http://127.0.0.1:55862/test} +&{2025-08-22 00:07:41.4670311 +0530 IST m=+0.751404001 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55862/test} +&{2025-08-22 00:07:41.4686866 +0530 IST m=+0.753059501 1520 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55862/test} +=== RUN TestAuthProvider/Test_Case_#7 +=== RUN TestAuthProvider/Test_Case_#8 +=== RUN TestAuthProvider/Test_Case_#9 +=== RUN TestAuthProvider/Test_Case_#10 +--- PASS: TestAuthProvider (0.75s) + --- PASS: TestAuthProvider/Test_Case_#0 (0.01s) + --- PASS: TestAuthProvider/Test_Case_#1 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#2 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#3 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#4 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#5 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#6 (0.01s) + --- PASS: TestAuthProvider/Test_Case_#7 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#8 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#9 (0.00s) + --- PASS: TestAuthProvider/Test_Case_#10 (0.00s) +=== RUN TestNewBasicAuthConfig +--- PASS: TestNewBasicAuthConfig (0.00s) +=== RUN TestAddAuthorizationHeader_BasicAuth +--- PASS: TestAddAuthorizationHeader_BasicAuth (0.00s) +=== RUN TestHttpService_GetSuccessRequests +&{2025-08-22 00:07:41.4719261 +0530 IST m=+0.756299001 1046 00000000000000000000000000000000 200 GET http://127.0.0.1:55867/test} +--- PASS: TestHttpService_GetSuccessRequests (0.00s) +=== RUN TestHttpService_GetWithHeaderSuccessRequests +&{2025-08-22 00:07:41.4738591 +0530 IST m=+0.758232001 527 00000000000000000000000000000000 200 GET http://127.0.0.1:55869/test} +--- PASS: TestHttpService_GetWithHeaderSuccessRequests (0.00s) +=== RUN TestHttpService_GetCBOpenRequests +&{0xc0003e8960 Get "http://127.0.0.1:55871/invalid": cb error} +&{0xc0003e8ae0 Get "http://127.0.0.1:55871/invalid": cb error} + circuit_breaker_test.go:125: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:125 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_GetCBOpenRequests +--- FAIL: TestHttpService_GetCBOpenRequests (0.00s) +=== RUN TestHttpService_GetWithHeaderCBOpenRequests +&{2025-08-22 00:07:41.4754697 +0530 IST m=+0.759842601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55871/.well-known/alive} +&{0xc000109620 Get "http://127.0.0.1:55872/invalid": cb error} +&{0xc0001097a0 Get "http://127.0.0.1:55872/invalid": cb error} + circuit_breaker_test.go:156: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:156 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_GetWithHeaderCBOpenRequests +--- FAIL: TestHttpService_GetWithHeaderCBOpenRequests (0.00s) +=== RUN TestHttpService_PutSuccessRequests +&{2025-08-22 00:07:41.4765757 +0530 IST m=+0.760948601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55872/.well-known/alive} +&{2025-08-22 00:07:41.4765757 +0530 IST m=+0.760948601 676 00000000000000000000000000000000 200 PUT http://127.0.0.1:55873/test} +--- PASS: TestHttpService_PutSuccessRequests (0.00s) +=== RUN TestHttpService_PutWithHeaderSuccessRequests +&{2025-08-22 00:07:41.4780588 +0530 IST m=+0.762431701 1119 00000000000000000000000000000000 200 PUT http://127.0.0.1:55875/test} +--- PASS: TestHttpService_PutWithHeaderSuccessRequests (0.00s) +=== RUN TestHttpService_PutCBOpenRequests +&{0xc000514a80 Put "http://127.0.0.1:55877/invalid": cb error} +&{0xc000514c00 Put "http://127.0.0.1:55877/invalid": cb error} + circuit_breaker_test.go:231: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:231 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PutCBOpenRequests +--- FAIL: TestHttpService_PutCBOpenRequests (0.00s) +&{2025-08-22 00:07:41.4803371 +0530 IST m=+0.764710001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55877/.well-known/alive} +=== RUN TestHttpService_PutWithHeaderCBOpenRequests +&{0xc000080420 Put "http://127.0.0.1:55878/invalid": cb error} +&{0xc0000805a0 Put "http://127.0.0.1:55878/invalid": cb error} + circuit_breaker_test.go:262: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:262 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PutWithHeaderCBOpenRequests +--- FAIL: TestHttpService_PutWithHeaderCBOpenRequests (0.00s) +=== RUN TestHttpService_PatchSuccessRequests +&{2025-08-22 00:07:41.4814281 +0530 IST m=+0.765801001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55878/.well-known/alive} +&{2025-08-22 00:07:41.4814281 +0530 IST m=+0.765801001 1071 00000000000000000000000000000000 200 GET http://127.0.0.1:55879/test} +--- PASS: TestHttpService_PatchSuccessRequests (0.00s) +=== RUN TestHttpService_PatchWithHeaderSuccessRequests +&{2025-08-22 00:07:41.4830395 +0530 IST m=+0.767412401 1278 00000000000000000000000000000000 200 GET http://127.0.0.1:55881/test} +--- PASS: TestHttpService_PatchWithHeaderSuccessRequests (0.00s) +=== RUN TestHttpService_PatchCBOpenRequests +&{0xc000515380 Patch "http://127.0.0.1:55883/invalid": cb error} +&{0xc000515500 Patch "http://127.0.0.1:55883/invalid": cb error} + circuit_breaker_test.go:337: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:337 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PatchCBOpenRequests +--- FAIL: TestHttpService_PatchCBOpenRequests (0.00s) +=== RUN TestHttpService_PatchWithHeaderCBOpenRequests +&{2025-08-22 00:07:41.4854451 +0530 IST m=+0.769818001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55883/.well-known/alive} +&{0xc0003217a0 Patch "http://127.0.0.1:55884/invalid": cb error} +&{0xc000321920 Patch "http://127.0.0.1:55884/invalid": cb error} + circuit_breaker_test.go:368: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:368 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PatchWithHeaderCBOpenRequests +--- FAIL: TestHttpService_PatchWithHeaderCBOpenRequests (0.00s) +=== RUN TestHttpService_PostSuccessRequests +&{2025-08-22 00:07:41.4860284 +0530 IST m=+0.770401301 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55884/.well-known/alive} +&{2025-08-22 00:07:41.4860284 +0530 IST m=+0.770401301 943 00000000000000000000000000000000 200 POST http://127.0.0.1:55885/test} +--- PASS: TestHttpService_PostSuccessRequests (0.00s) +=== RUN TestHttpService_PostWithHeaderSuccessRequests +&{2025-08-22 00:07:41.4875391 +0530 IST m=+0.771912001 1114 00000000000000000000000000000000 200 POST http://127.0.0.1:55887/test} +--- PASS: TestHttpService_PostWithHeaderSuccessRequests (0.00s) +=== RUN TestHttpService_PostCBOpenRequests +&{0xc0002421e0 Post "http://127.0.0.1:55889/invalid": cb error} +&{0xc000242360 Post "http://127.0.0.1:55889/invalid": cb error} + circuit_breaker_test.go:443: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:443 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PostCBOpenRequests +--- FAIL: TestHttpService_PostCBOpenRequests (0.00s) +=== RUN TestHttpService_PostWithHeaderCBOpenRequests +&{2025-08-22 00:07:41.4898052 +0530 IST m=+0.774178101 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55889/.well-known/alive} +&{0xc000080de0 Post "http://127.0.0.1:55890/invalid": cb error} +&{0xc000080f60 Post "http://127.0.0.1:55890/invalid": cb error} + circuit_breaker_test.go:474: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:474 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_PostWithHeaderCBOpenRequests +--- FAIL: TestHttpService_PostWithHeaderCBOpenRequests (0.00s) +=== RUN TestHttpService_DeleteSuccessRequests +&{2025-08-22 00:07:41.4903516 +0530 IST m=+0.774724501 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55890/.well-known/alive} +&{2025-08-22 00:07:41.4903516 +0530 IST m=+0.774724501 587 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55891/test} +--- PASS: TestHttpService_DeleteSuccessRequests (0.00s) +=== RUN TestHttpService_DeleteWithHeaderSuccessRequests +&{2025-08-22 00:07:41.4920884 +0530 IST m=+0.776461301 587 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55893/test} +--- PASS: TestHttpService_DeleteWithHeaderSuccessRequests (0.00s) +=== RUN TestHttpService_DeleteCBOpenRequests +&{0xc00038f620 Delete "http://127.0.0.1:55895/invalid": cb error} +&{0xc00038f7a0 Delete "http://127.0.0.1:55895/invalid": cb error} + circuit_breaker_test.go:549: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:549 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_DeleteCBOpenRequests +--- FAIL: TestHttpService_DeleteCBOpenRequests (0.00s) +=== RUN TestHttpService_DeleteWithHeaderCBOpenRequests +&{2025-08-22 00:07:41.4939397 +0530 IST m=+0.778312601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55895/.well-known/alive} +&{0xc000081680 Delete "http://127.0.0.1:55896/invalid": cb error} +&{0xc000081800 Delete "http://127.0.0.1:55896/invalid": cb error} + circuit_breaker_test.go:580: + Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:580 + Error: Received unexpected error: + unable to connect to server at host + Test: TestHttpService_DeleteWithHeaderCBOpenRequests +--- FAIL: TestHttpService_DeleteWithHeaderCBOpenRequests (0.00s) +=== RUN Test_CustomDomainProvider_Get +&{2025-08-22 00:07:41.4946082 +0530 IST m=+0.778981101 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55896/.well-known/alive} +&{2025-08-22 00:07:41.4946082 +0530 IST m=+0.778981101 583 00000000000000000000000000000000 200 GET http://127.0.0.1:55897//path} +--- PASS: Test_CustomDomainProvider_Get (0.00s) +=== RUN Test_CustomDomainProvider_Post +&{2025-08-22 00:07:41.4963137 +0530 IST m=+0.780686601 583 00000000000000000000000000000000 201 POST http://127.0.0.1:55899//path} +--- PASS: Test_CustomDomainProvider_Post (0.00s) +=== RUN TestCustomDomainProvider_Put +&{2025-08-22 00:07:41.4974693 +0530 IST m=+0.781842201 1064 00000000000000000000000000000000 200 PUT http://127.0.0.1:55901//path} +--- PASS: TestCustomDomainProvider_Put (0.00s) +=== RUN TestCustomDomainProvider_Patch +&{2025-08-22 00:07:41.499096 +0530 IST m=+0.783468901 1164 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55903//path} +--- PASS: TestCustomDomainProvider_Patch (0.00s) +=== RUN TestCustomDomainProvider_Delete +&{2025-08-22 00:07:41.5008391 +0530 IST m=+0.785212001 528 00000000000000000000000000000000 204 DELETE http://127.0.0.1:55905//path} +--- PASS: TestCustomDomainProvider_Delete (0.00s) +=== RUN TestHttpService_OAuthError +--- PASS: TestHttpService_OAuthError (0.00s) +=== RUN TestHTTPService_HealthCheck +2025/08/22 00:07:41 http: superfluous response.WriteHeader call from gofr.dev/pkg/gofr/service.initializeTest.func1 (health_test.go:116) +&{2025-08-22 00:07:41.5027214 +0530 IST m=+0.787094301 536 00000000000000000000000000000000 200 GET http://127.0.0.1:55907/.well-known/alive} +--- PASS: TestHTTPService_HealthCheck (0.00s) +=== RUN TestHTTPService_HealthCheckCustomURL +2025/08/22 00:07:41 http: superfluous response.WriteHeader call from gofr.dev/pkg/gofr/service.initializeTest.func1 (health_test.go:116) +&{2025-08-22 00:07:41.5038441 +0530 IST m=+0.788217001 1156 00000000000000000000000000000000 200 GET http://127.0.0.1:55909/.well-known/ready} +--- PASS: TestHTTPService_HealthCheckCustomURL (0.00s) +=== RUN TestHTTPService_HealthCheckErrorResponse +&{0xc0003e80c0 Get "http://test/.well-known/alive": dial tcp: lookup test: no such host} +--- PASS: TestHTTPService_HealthCheckErrorResponse (2.73s) +=== RUN TestHTTPService_HealthCheckDifferentStatusCode +&{2025-08-22 00:07:44.2324765 +0530 IST m=+3.516849401 2589 00000000000000000000000000000000 400 GET http://127.0.0.1:55911/.well-known/bad-request} +--- PASS: TestHTTPService_HealthCheckDifferentStatusCode (0.00s) +=== RUN TestHTTPService_HealthCheckTimeout +--- PASS: TestHTTPService_HealthCheckTimeout (1.00s) +=== RUN TestLog_PrettyPrint +--- PASS: TestLog_PrettyPrint (0.00s) +=== RUN TestErrorLog_PrettyPrint +--- PASS: TestErrorLog_PrettyPrint (0.00s) +=== RUN Test_ColorForStatusCode +--- PASS: Test_ColorForStatusCode (0.00s) +=== RUN TestNewHTTPService +=== RUN TestNewHTTPService/Valid_Address +=== RUN TestNewHTTPService/Empty_Address +=== RUN TestNewHTTPService/Invalid_Address +--- PASS: TestNewHTTPService (0.00s) + --- PASS: TestNewHTTPService/Valid_Address (0.00s) + --- PASS: TestNewHTTPService/Empty_Address (0.00s) + --- PASS: TestNewHTTPService/Invalid_Address (0.00s) +=== RUN TestHTTPService_createAndSendRequest +&{2025-08-22 00:07:45.2368383 +0530 IST m=+4.521211201 1662 00000000000000000000000000000000 200 POST http://127.0.0.1:55915/test-path} +&{2025-08-22 00:07:45.239082 +0530 IST m=+4.523454901 1183 00000000000000000000000000000000 200 POST http://127.0.0.1:55917/test-path} +&{2025-08-22 00:07:45.2402655 +0530 IST m=+4.524638401 1652 00000000000000000000000000000000 200 POST http://127.0.0.1:55919/test-path} +&{2025-08-22 00:07:45.2426713 +0530 IST m=+4.527044201 1201 00000000000000000000000000000000 200 POST http://127.0.0.1:55921/test-path} +--- PASS: TestHTTPService_createAndSendRequest (0.01s) +=== RUN TestHTTPService_Get +&{2025-08-22 00:07:45.2438726 +0530 IST m=+4.528245501 1016 00000000000000000000000000000000 200 GET http://127.0.0.1:55923/test-path} +--- PASS: TestHTTPService_Get (0.00s) +=== RUN TestHTTPService_GetWithHeaders +&{2025-08-22 00:07:45.2460936 +0530 IST m=+4.530466501 1295 00000000000000000000000000000000 200 GET http://127.0.0.1:55925/test-path} +--- PASS: TestHTTPService_GetWithHeaders (0.00s) +=== RUN TestHTTPService_Put +&{2025-08-22 00:07:45.2499973 +0530 IST m=+4.534370201 1178 00000000000000000000000000000000 200 PUT http://127.0.0.1:55927/test-path} +--- PASS: TestHTTPService_Put (0.00s) +=== RUN TestHTTPService_PutWithHeaders +&{2025-08-22 00:07:45.2511753 +0530 IST m=+4.535548201 1233 00000000000000000000000000000000 200 PUT http://127.0.0.1:55929/test-path} +--- PASS: TestHTTPService_PutWithHeaders (0.00s) +=== RUN TestHTTPService_Patch +&{2025-08-22 00:07:45.2540278 +0530 IST m=+4.538400701 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55931/test-path} +--- PASS: TestHTTPService_Patch (0.00s) +=== RUN TestHTTPService_PatchWithHeaders +&{2025-08-22 00:07:45.2555649 +0530 IST m=+4.539937801 620 00000000000000000000000000000000 200 PUT http://127.0.0.1:55933/test-path} +--- PASS: TestHTTPService_PatchWithHeaders (0.00s) +=== RUN TestHTTPService_Post +&{2025-08-22 00:07:45.2572839 +0530 IST m=+4.541656801 854 00000000000000000000000000000000 200 POST http://127.0.0.1:55935/test-path} +--- PASS: TestHTTPService_Post (0.00s) +=== RUN TestHTTPService_PostWithHeaders +&{2025-08-22 00:07:45.2586451 +0530 IST m=+4.543018001 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55937/test-path} +--- PASS: TestHTTPService_PostWithHeaders (0.00s) +=== RUN TestHTTPService_Delete +&{2025-08-22 00:07:45.2603349 +0530 IST m=+4.544707801 1825 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55939/test-path} +--- PASS: TestHTTPService_Delete (0.00s) +=== RUN TestHTTPService_DeleteWithHeaders +&{2025-08-22 00:07:45.2627893 +0530 IST m=+4.547162201 601 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55941/test-path} +--- PASS: TestHTTPService_DeleteWithHeaders (0.00s) +=== RUN TestHTTPService_createAndSendRequestCreateRequestFailure +--- PASS: TestHTTPService_createAndSendRequestCreateRequestFailure (0.00s) +=== RUN TestHTTPService_createAndSendRequestServerError +&{0xc0005146c0 Post "/test-path?key=value&name=gofr&name=test": unsupported protocol scheme ""} +--- PASS: TestHTTPService_createAndSendRequestServerError (0.00s) +=== RUN TestNewOAuthConfig +=== RUN TestNewOAuthConfig/Test_case_#0 +=== RUN TestNewOAuthConfig/Test_case_#1 +=== RUN TestNewOAuthConfig/Test_case_#2 +=== RUN TestNewOAuthConfig/Test_case_#3 +=== RUN TestNewOAuthConfig/Test_case_#4 +=== RUN TestNewOAuthConfig/Test_case_#5 +=== RUN TestNewOAuthConfig/Test_case_#6 +=== RUN TestNewOAuthConfig/Test_case_#7 +=== RUN TestNewOAuthConfig/Test_case_#8 +=== RUN TestNewOAuthConfig/Test_case_#9 +=== RUN TestNewOAuthConfig/Test_case_#10 +--- PASS: TestNewOAuthConfig (0.42s) + --- PASS: TestNewOAuthConfig/Test_case_#0 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#1 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#2 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#3 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#4 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#5 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#6 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#7 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#8 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#9 (0.00s) + --- PASS: TestNewOAuthConfig/Test_case_#10 (0.00s) +=== RUN TestHttpService_validateTokenURL +=== RUN TestHttpService_validateTokenURL/Test_Case_#0 +=== RUN TestHttpService_validateTokenURL/Test_Case_#1 +=== RUN TestHttpService_validateTokenURL/Test_Case_#2 +=== RUN TestHttpService_validateTokenURL/Test_Case_#3 +=== RUN TestHttpService_validateTokenURL/Test_Case_#4 +=== RUN TestHttpService_validateTokenURL/Test_Case_#5 +=== RUN TestHttpService_validateTokenURL/Test_Case_#6 +=== RUN TestHttpService_validateTokenURL/Test_Case_#7 +=== RUN TestHttpService_validateTokenURL/Test_Case_#8 +=== RUN TestHttpService_validateTokenURL/Test_Case_#9 +--- PASS: TestHttpService_validateTokenURL (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#0 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#1 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#2 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#3 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#4 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#5 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#6 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#7 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#8 (0.00s) + --- PASS: TestHttpService_validateTokenURL/Test_Case_#9 (0.00s) +=== RUN TestAddAuthorizationHeader_OAuth +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#0 +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#1 +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#2 +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#3 +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#4 +=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#5 +--- PASS: TestAddAuthorizationHeader_OAuth (0.79s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#0 (0.00s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#1 (0.00s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#2 (0.00s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#3 (0.00s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#4 (0.00s) + --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#5 (0.00s) +=== RUN TestResponse_GetHeader +--- PASS: TestResponse_GetHeader (0.00s) +=== RUN TestResponse_GetHeaderNil +--- PASS: TestResponse_GetHeaderNil (0.00s) +=== RUN TestRetryProvider_Get +--- PASS: TestRetryProvider_Get (0.00s) +=== RUN TestRetryProvider_GetWithHeaders +--- PASS: TestRetryProvider_GetWithHeaders (0.00s) +=== RUN TestRetryProvider_Post +--- PASS: TestRetryProvider_Post (0.00s) +=== RUN TestRetryProvider_PostWithHeaders +--- PASS: TestRetryProvider_PostWithHeaders (0.00s) +=== RUN TestRetryProvider_Put +--- PASS: TestRetryProvider_Put (0.00s) +=== RUN TestRetryProvider_PutWithHeaders +--- PASS: TestRetryProvider_PutWithHeaders (0.00s) +=== RUN TestRetryProvider_Patch_WithError +&{2025-08-22 00:07:46.4801745 +0530 IST m=+5.764547401 1083 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} +&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} +&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} +&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 563 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} +&{2025-08-22 00:07:46.481822 +0530 IST m=+5.766194901 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} +--- PASS: TestRetryProvider_Patch_WithError (0.00s) +=== RUN TestRetryProvider_PatchWithHeaders +--- PASS: TestRetryProvider_PatchWithHeaders (0.00s) +=== RUN TestRetryProvider_Delete +--- PASS: TestRetryProvider_Delete (0.00s) +=== RUN TestRetryProvider_DeleteWithHeaders +--- PASS: TestRetryProvider_DeleteWithHeaders (0.00s) +FAIL +FAIL gofr.dev/pkg/gofr/service 7.924s +? gofr.dev/pkg/gofr/static [no test files] +=== RUN Test_CustomError +--- PASS: Test_CustomError (0.00s) +=== RUN TestStdoutOutputForFunc +--- PASS: TestStdoutOutputForFunc (0.00s) +=== RUN TestStderrOutputForFunc +--- PASS: TestStderrOutputForFunc (0.00s) +=== RUN TestGetFreePort +--- PASS: TestGetFreePort (0.03s) +=== RUN TestNewServerConfigs +--- PASS: TestNewServerConfigs (0.00s) +=== RUN TestServiceConfigs_Get +=== RUN TestServiceConfigs_Get/empty_key +=== RUN TestServiceConfigs_Get/non-empty_key +=== RUN TestServiceConfigs_Get/random_key +--- PASS: TestServiceConfigs_Get (0.00s) + --- PASS: TestServiceConfigs_Get/empty_key (0.00s) + --- PASS: TestServiceConfigs_Get/non-empty_key (0.00s) + --- PASS: TestServiceConfigs_Get/random_key (0.00s) +=== RUN TestServiceConfigs_GetOrDefault +=== RUN TestServiceConfigs_GetOrDefault/empty_key_and_default +=== RUN TestServiceConfigs_GetOrDefault/non-empty_key_with_default +=== RUN TestServiceConfigs_GetOrDefault/random_key_with_default +--- PASS: TestServiceConfigs_GetOrDefault (0.00s) + --- PASS: TestServiceConfigs_GetOrDefault/empty_key_and_default (0.00s) + --- PASS: TestServiceConfigs_GetOrDefault/non-empty_key_with_default (0.00s) + --- PASS: TestServiceConfigs_GetOrDefault/random_key_with_default (0.00s) +PASS +ok gofr.dev/pkg/gofr/testutil (cached) +? gofr.dev/pkg/gofr/version [no test files] +=== RUN TestConnection_Bind_Success +=== RUN TestConnection_Bind_Success/Bind_to_string +=== RUN TestConnection_Bind_Success/Bind_to_JSON_struct +--- PASS: TestConnection_Bind_Success (1.01s) + --- PASS: TestConnection_Bind_Success/Bind_to_string (0.00s) + --- PASS: TestConnection_Bind_Success/Bind_to_JSON_struct (0.00s) +=== RUN TestNewWSUpgrader_WithOptions +--- PASS: TestNewWSUpgrader_WithOptions (0.00s) +=== RUN Test_Upgrade +--- PASS: Test_Upgrade (0.00s) +=== RUN Test_UnimplementedMethods +--- PASS: Test_UnimplementedMethods (0.00s) +=== RUN TestConcurrentWriteMessageCalls +--- PASS: TestConcurrentWriteMessageCalls (0.00s) +=== RUN TestManager_ListConnections +--- PASS: TestManager_ListConnections (0.00s) +=== RUN TestManager_GetConnectionByServiceName +--- PASS: TestManager_GetConnectionByServiceName (0.00s) +=== RUN TestManager_CloseConnection +--- PASS: TestManager_CloseConnection (0.00s) +PASS +ok gofr.dev/pkg/gofr/websocket (cached) +FAIL From 37310afb2c1c40ea7c7f4517b29c3c82b76c8a66 Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 13:16:04 +0530 Subject: [PATCH 2/9] oracle db migration completed --- test_output.txt | 3850 ----------------------------------------------- 1 file changed, 3850 deletions(-) delete mode 100644 test_output.txt diff --git a/test_output.txt b/test_output.txt deleted file mode 100644 index 57fb772f2..000000000 --- a/test_output.txt +++ /dev/null @@ -1,3850 +0,0 @@ -? gofr.dev/examples/grpc/grpc-streaming-client [no test files] -? gofr.dev/examples/grpc/grpc-streaming-client/client [no test files] -{"level":"INFO","time":"2025-08-22T00:03:44.2108408+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:44.2141481+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2158318+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2460442+05:30","message":"registering gRPC Server: grpc.health.v1.Health","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2460442+05:30","message":"registering gRPC Server: ChatService","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2466719+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2466719+05:30","message":"Starting server on port: 8081","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:44.2474704+05:30","message":"starting gRPC server at :9000","gofrVersion":"dev"} -=== RUN TestServerStream -{"level":"DEBUG","time":"2025-08-22T00:03:44.6073619+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:44.6073619+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:45.6106593+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:45.6106593+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:46.6125409+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:46.6119724+05:30","responseTime":568,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:47.6147331+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:47.6147331+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:48.6150989+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:48.6150989+05:30","responseTime":0,"method":"/ChatService/ServerStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:49.6272304+05:30","message":{"id":"5af902058108b4f3c81cb2465ea1ce5b","startTime":"2025-08-22T00:03:44.6073619+05:30","responseTime":5019868,"method":"/ChatService/ServerStream [SERVER-STREAM]","statusCode":0},"gofrVersion":"dev"} ---- PASS: TestServerStream (5.26s) -=== RUN TestClientStream -{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/Recv","statusCode":2},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:49.9765822+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":0,"method":"/ChatService/ClientStream/SendAndClose","statusCode":0},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:49.9771174+05:30","message":{"id":"874cb066cad685185cd4eaa0be6de0f6","startTime":"2025-08-22T00:03:49.9765822+05:30","responseTime":535,"method":"/ChatService/ClientStream [CLIENT-STREAM]","statusCode":0},"gofrVersion":"dev"} ---- PASS: TestClientStream (0.08s) -=== RUN TestBiDiStream -{"level":"DEBUG","time":"2025-08-22T00:03:50.2756647+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2698263+05:30","responseTime":5838,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.2809409+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2809409+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.3493774+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2809409+05:30","responseTime":68436,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.3493774+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.3493774+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.4489073+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.3493774+05:30","responseTime":99529,"method":"/ChatService/BiDiStream/Recv","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.4489073+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.4489073+05:30","responseTime":0,"method":"/ChatService/BiDiStream/Send","statusCode":0},"gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:50.5504967+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.4489073+05:30","responseTime":101589,"method":"/ChatService/BiDiStream/Recv","statusCode":2},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:50.5504967+05:30","message":{"id":"5dc57e38dbe949a92dd6460aacfca935","startTime":"2025-08-22T00:03:50.2553171+05:30","responseTime":295179,"method":"/ChatService/BiDiStream [BI-DIRECTION_STREAM]","statusCode":0},"gofrVersion":"dev"} ---- PASS: TestBiDiStream (0.54s) -PASS -ok gofr.dev/examples/grpc/grpc-streaming-server (cached) -? gofr.dev/examples/grpc/grpc-streaming-server/server [no test files] -? gofr.dev/examples/grpc/grpc-unary-client [no test files] -? gofr.dev/examples/grpc/grpc-unary-client/client [no test files] -{"level":"INFO","time":"2025-08-22T00:07:20.5198297+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.5220656+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5231358+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5299226+05:30","message":"registering gRPC Server: grpc.health.v1.Health","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5299226+05:30","message":"registering gRPC Server: Hello","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"Starting server on port: 8081","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.5304644+05:30","message":"starting gRPC server at :9000","gofrVersion":"dev"} -=== RUN TestGRPCServer -{"level":"INFO","time":"2025-08-22T00:07:20.8263239+05:30","message":{"id":"3dbcfd8e207beb202cc98893d3892ad2","startTime":"2025-08-22T00:07:20.8263239+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.8274101+05:30","message":{"id":"f5559e7f1fdeec34fabbdd0077ae8f1d","startTime":"2025-08-22T00:07:20.8274101+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.8285251+05:30","message":{"id":"5af949fc79f1f0dc537e2f7216ddbcbb","startTime":"2025-08-22T00:07:20.8285251+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.8296344+05:30","message":{"id":"38817abd3c50200ca147238547cedf8a","startTime":"2025-08-22T00:07:20.8296344+05:30","responseTime":0,"method":"/Hello/SayHello","statusCode":0},"gofrVersion":"dev"} ---- PASS: TestGRPCServer (0.01s) -=== RUN TestHelloProtoMethods ---- PASS: TestHelloProtoMethods (0.00s) -PASS -ok gofr.dev/examples/grpc/grpc-unary-server 0.976s -=== RUN TestServer_SayHello ---- PASS: TestServer_SayHello (0.00s) -PASS -ok gofr.dev/examples/grpc/grpc-unary-server/server (cached) -=== RUN TestIntegration_SimpleAPIServer -{"level":"INFO","time":"2025-08-22T00:07:20.8525236+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:20.9365447+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:20.941072+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.941665+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9440836+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9440836+05:30","message":"registered static files at endpoint /static/ from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\http-server\\static","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9446612+05:30","message":"Starting metrics server on port: 51153","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9446612+05:30","message":"Starting server on port: 9000","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:20.9463195+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9574358+05:30","message":"Name came empty","trace_id":"e797080bcb1994e7b92c0c1d90b78799","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9574358+05:30","message":{"trace_id":"e797080bcb1994e7b92c0c1d90b78799","span_id":"d6ee3694f6fd0cb9","start_time":"2025-08-22T00:07:20.9568708+05:30","response_time":565,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/hello","response":200},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9599066+05:30","message":{"trace_id":"01f7af3ce53081430e6bbf4f62db1d4a","span_id":"657db4d5bb246991","start_time":"2025-08-22T00:07:20.9599066+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/hello?name=gofr","response":200},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.0627654+05:30","message":{"trace_id":"16407365841feb302d866afffb14fccf","error":"error from redis db: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.0639372+05:30","message":{"trace_id":"16407365841feb302d866afffb14fccf","span_id":"0a88fac6fac20caf","start_time":"2025-08-22T00:07:20.9616864+05:30","response_time":102250,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/redis","response":500},"gofrVersion":"dev"} - main_test.go:68: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 - Error: Not equal: - expected: string("") - actual : () - Test: TestIntegration_SimpleAPIServer - Messages: TEST[2], Failed. - redis handler - main_test.go:72: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:72 - Error: Not equal: - expected: 200 - actual : 500 - Test: TestIntegration_SimpleAPIServer - Messages: TEST[2], Failed. - redis handler -{"level":"ERROR","time":"2025-08-22T00:07:21.3456082+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","error":"error from redis db: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.3456082+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","span_id":"6563a080275a1042","start_time":"2025-08-22T00:07:21.2284669+05:30","response_time":117141,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51272","uri":"/redis","response":500},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3461176+05:30","message":{"timestamp":"2025-08-22T00:07:21.2218942+05:30","latency":124223,"correlationId":"c8668777fa1d8ff5f7f904b574f6840a","responseCode":500,"httpMethod":"GET","uri":"http://localhost:9000/redis"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3461176+05:30","message":{"trace_id":"c8668777fa1d8ff5f7f904b574f6840a","span_id":"2792326f5eea3b2a","start_time":"2025-08-22T00:07:21.0672443+05:30","response_time":278873,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/trace","response":200},"gofrVersion":"dev"} - main_test.go:68: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 - Error: Not equal: - expected: string("") - actual : () - Test: TestIntegration_SimpleAPIServer - Messages: TEST[3], Failed. - trace handler -{"level":"ERROR","time":"2025-08-22T00:07:21.3624374+05:30","message":{"trace_id":"827a0dcf1cec9892e27a2c3415690dca","error":"error from sql db: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it."},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.3624374+05:30","message":{"trace_id":"827a0dcf1cec9892e27a2c3415690dca","span_id":"c0573db90e938cde","start_time":"2025-08-22T00:07:21.3461176+05:30","response_time":16319,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/mysql","response":500},"gofrVersion":"dev"} - main_test.go:68: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:68 - Error: Not equal: - expected: float64(4) - actual : () - Test: TestIntegration_SimpleAPIServer - Messages: TEST[4], Failed. - mysql handler - main_test.go:72: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server/main_test.go:72 - Error: Not equal: - expected: 200 - actual : 500 - Test: TestIntegration_SimpleAPIServer - Messages: TEST[4], Failed. - mysql handler ---- FAIL: TestIntegration_SimpleAPIServer (0.58s) -=== RUN TestIntegration_SimpleAPIServer_Errors -{"level":"ERROR","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"26c817ec974aa2803e1748634ee2b861","error":"some error occurred"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"26c817ec974aa2803e1748634ee2b861","span_id":"4744cba21aa84c7e","start_time":"2025-08-22T00:07:21.3644466+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/error","response":500},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"02b7fdff4c7a2a0b99f788ec288ffef1","error":"route not registered"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3644466+05:30","message":{"trace_id":"02b7fdff4c7a2a0b99f788ec288ffef1","span_id":"ab59de2f7e39b02f","start_time":"2025-08-22T00:07:21.3644466+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/","response":404},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3691425+05:30","message":{"trace_id":"1f751e9d304159c0e1aafa2ce09668ca","error":"route not registered"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.3691425+05:30","message":{"trace_id":"1f751e9d304159c0e1aafa2ce09668ca","span_id":"f416286e29d89f12","start_time":"2025-08-22T00:07:21.3691425+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/route","response":404},"gofrVersion":"dev"} ---- PASS: TestIntegration_SimpleAPIServer_Errors (0.01s) -=== RUN TestIntegration_SimpleAPIServer_Health -{"level":"INFO","time":"2025-08-22T00:07:21.4735962+05:30","message":{"trace_id":"69eaf93d70a5246d1c8540725aa4e4d9","span_id":"40e79051a6befaf2","start_time":"2025-08-22T00:07:21.4735962+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51272","uri":"/.well-known/alive","response":200},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.4735962+05:30","message":{"timestamp":"2025-08-22T00:07:21.4735962+05:30","latency":0,"correlationId":"69eaf93d70a5246d1c8540725aa4e4d9","responseCode":200,"httpMethod":"GET","uri":"http://localhost:9000/.well-known/alive"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.4751194+05:30","message":{"trace_id":"69eaf93d70a5246d1c8540725aa4e4d9","span_id":"b9501248a4bcca81","start_time":"2025-08-22T00:07:21.3714826+05:30","response_time":103636,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51187","uri":"/.well-known/health","response":200},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.4780503+05:30","message":{"trace_id":"f995550da7d6c0904747aac2be19928d","span_id":"c465ad493d6bcdfd","start_time":"2025-08-22T00:07:21.4780503+05:30","method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51307","uri":"/favicon.ico","response":200},"gofrVersion":"dev"} ---- PASS: TestIntegration_SimpleAPIServer_Health (0.11s) -=== RUN TestRedisHandler -{"level":"INFO","time":"2025-08-22T00:07:21.4809867+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.598596+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.6023071+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.6023071+05:30","message":"Exporting traces to GoFr at https://tracer.gofr.dev","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.6096918+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.6105313+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.6132377+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.7278009+05:30","message":{"query":"ping","duration":118109,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.7278009+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} ---- PASS: TestRedisHandler (0.25s) -FAIL -FAIL gofr.dev/examples/http-server 1.663s -=== RUN TestHTTPServerUsingRedis -{"level":"INFO","time":"2025-08-22T00:07:20.8573597+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.8614664+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.8667155+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.9468882+05:30","message":{"query":"ping","duration":80172,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:20.9474581+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.9480263+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:20.9509444+05:30","message":"Warming up the cache...","gofrVersion":"dev"} - main_test.go:59: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/http-server-using-redis/main_test.go:59 - Error: Received unexpected error: - Post "http://localhost:51154/redis": dial tcp [::1]:51154: connectex: No connection could be made because the target machine actively refused it. - Test: TestHTTPServerUsingRedis - Messages: TEST[0], Failed. - post handler ---- FAIL: TestHTTPServerUsingRedis (0.19s) -=== RUN TestRedisSetHandler -{"level":"INFO","time":"2025-08-22T00:07:20.9679419+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.9697825+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:20.9697825+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.0300392+05:30","message":{"query":"set","duration":79094,"args":["set","initial-data","This is some data cached at startup."]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"Failed to warm up cache: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"OnStart hook failed: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.0300392+05:30","message":"Startup failed: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1139383+05:30","message":{"query":"ping","duration":144155,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.1139383+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1149985+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1204626+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1811253+05:30","message":{"query":"ping","duration":60662,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.1811253+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} ---- PASS: TestRedisSetHandler (0.22s) -=== RUN TestRedisPipelineHandler -{"level":"INFO","time":"2025-08-22T00:07:21.1891185+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1903223+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.1908771+05:30","message":"connecting to redis at 'localhost:2002' on database 0","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.3304347+05:30","message":{"query":"ping","duration":139557,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.3304347+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.3304347+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.3324629+05:30","message":"connecting to redis at 'localhost:2001' on database 0","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:21.46259+05:30","message":{"query":"ping","duration":130127,"args":["ping"]},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.46259+05:30","message":"could not connect to redis at 'localhost:2001' , error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} ---- PASS: TestRedisPipelineHandler (0.28s) -FAIL -FAIL gofr.dev/examples/http-server-using-redis 1.387s -=== RUN TestCMDRunWithNoArg -Available commands: - - hello - Description: Print 'Hello World!' - Help: hello world option - - params - - spinner - - progress ---- PASS: TestCMDRunWithNoArg (0.01s) -=== RUN TestCMDRunWithProperArg ---- PASS: TestCMDRunWithProperArg (0.00s) -=== RUN TestCMDRunWithParams ---- PASS: TestCMDRunWithParams (0.01s) -=== RUN TestCMDRun_Spinner ---- PASS: TestCMDRun_Spinner (2.01s) -=== RUN TestCMDRun_SpinnerContextCancelled -[?25l[?25h--- PASS: TestCMDRun_SpinnerContextCancelled (0.00s) -=== RUN TestCMDRun_Progress ---- PASS: TestCMDRun_Progress (5.30s) -=== RUN TestCMDRun_ProgressContextCancelled ---- FAIL: TestCMDRun_ProgressContextCancelled (0.00s) -panic: runtime error: invalid memory address or nil pointer dereference [recovered] - panic: runtime error: invalid memory address or nil pointer dereference -[signal 0xc0000005 code=0x0 addr=0x0 pc=0x11116dd] - -goroutine 81 [running]: -testing.tRunner.func1.2({0x12d4940, 0x22cba80}) - C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1734 +0x219 -testing.tRunner.func1() - C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1737 +0x359 -panic({0x12d4940?, 0x22cba80?}) - C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132 -gofr.dev/pkg/gofr/logging.(*ContextLogger).Warn(...) - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/logging/ctx_logger.go:60 -gofr.dev/examples/sample-cmd.progress(0xc0005d7ed8) - D:/Users/user/Desktop/Go_Migration/gofr/examples/sample-cmd/main.go:55 +0xbd -gofr.dev/examples/sample-cmd.TestCMDRun_ProgressContextCancelled(0xc000107880) - D:/Users/user/Desktop/Go_Migration/gofr/examples/sample-cmd/main_test.go:102 +0x231 -testing.tRunner(0xc000107880, 0x157a658) - C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1792 +0xcb -created by testing.(*T).Run in goroutine 1 - C:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/testing/testing.go:1851 +0x3f6 -FAIL gofr.dev/examples/sample-cmd 7.974s -=== RUN TestIntegration_AddRESTHandlers -{"level":"INFO","time":"2025-08-22T00:07:21.5008666+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.5069767+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.5085208+05:30","message":"Exporting traces to zipkin at http://localhost:2005/api/v2/spans","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:21.5112425+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:21.5168898+05:30","message":"could not connect 'root' user to 'test' database at 'localhost:2001', error: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"FATAL","time":"2025-08-22T00:07:21.5201915+05:30","message":"failed to create gofr_migration table, err: dial tcp [::1]:2001: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -FAIL gofr.dev/examples/using-add-rest-handlers 0.448s -=== RUN TestCreateTableUser ---- PASS: TestCreateTableUser (0.00s) -=== RUN TestAll ---- PASS: TestAll (0.00s) -PASS -ok gofr.dev/examples/using-add-rest-handlers/migrations (cached) -=== RUN Test_UserPurgeCron -{"level":"INFO","time":"2025-08-22T00:03:51.6310226+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.6472427+05:30","message":"Exporting traces to zipkin at http://localhost:2005/api/v2/spans","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":"Starting cron job: counter","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":["Count:",1],"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:52.6610671+05:30","message":"Finished cron job: counter in 0s","gofrVersion":"dev"} - main_test.go:33: Metrics server running at: http://localhost:57052 ---- PASS: Test_UserPurgeCron (1.14s) -PASS -ok gofr.dev/examples/using-cron-jobs (cached) -=== RUN TestIntegration -{"level":"INFO","time":"2025-08-22T00:07:22.5584098+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.5636789+05:30","message":"Starting metrics server on port: 51348","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.5644733+05:30","message":"Starting server on port: 51347","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.6533676+05:30","message":{"trace_id":"ce781dcba7aa3ce129ea2c2930a18281","span_id":"becd0c38148d9c68","start_time":"2025-08-22T00:07:22.6533676+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51354","uri":"/transaction","response":201},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.676384+05:30","message":{"trace_id":"abf4a767d6476218bc197e05670ee0e0","span_id":"392a88e25edf05f7","start_time":"2025-08-22T00:07:22.6758757+05:30","response_time":508,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51355","uri":"/return","response":201},"gofrVersion":"dev"} - main_test.go:57: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:57 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "product_stock{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\"} 50" - Test: TestIntegration - main_test.go:58: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:58 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "total_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000" - Test: TestIntegration - main_test.go:59: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:59 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "total_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000" - Test: TestIntegration - main_test.go:60: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-custom-metrics/main_test.go:60 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 19\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1.3060344e+07\n# HELP app_http_response Response time of HTTP requests in seconds.\n# TYPE app_http_response histogram\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 0.0005083\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/return\",status=\"201\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.001\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.003\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.005\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.01\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.02\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.03\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.05\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"0.75\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"1\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"2\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"3\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"5\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"10\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"30\"} 1\napp_http_response_bucket{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\",le=\"+Inf\"} 1\napp_http_response_sum{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 0\napp_http_response_count{method=\"POST\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",path=\"/transaction\",status=\"201\"} 1\n# HELP app_info Info for app_name, app_version and framework_version.\n# TYPE app_info gauge\napp_info{app_name=\"using-metrics\",app_version=\"v0.1.0\",framework_version=\"dev\",otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 2.38208e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 3.169776e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.25\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.5\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"0.75\"} 0.0129067\ngo_gc_duration_seconds{quantile=\"1\"} 0.0129067\ngo_gc_duration_seconds_sum 0.0129067\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 22\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.399296e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.186992e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.452685e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 11010\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.322752e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.399296e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.284992e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.612096e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 16989\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 3.15392e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.897088e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014424938624e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 27999\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 86880\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 97920\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.459218e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 783091\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 491520\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 491520\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3060344e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.109375\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 170\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 2.4113152e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801442e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.16064e+07\n# HELP product_stock used to track the number of products in stock\n# TYPE product_stock gauge\nproduct_stock{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 50\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP total_credit_day_sale used to track the total credit sales in a day\n# TYPE total_credit_day_sale gauge\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit\"} 1000\ntotal_credit_day_sale{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",sale_type=\"credit_return\"} -1000\n# HELP transaction_success_total used to track the count of successful transactions\n# TYPE transaction_success_total counter\ntransaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n# HELP transaction_time used to track the time taken by a transaction\n# TYPE transaction_time histogram\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"5\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"10\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"15\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"20\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"25\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"35\"} 1\ntransaction_time_bucket{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\",le=\"+Inf\"} 1\ntransaction_time_sum{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 0\ntransaction_time_count{otel_scope_name=\"using-metrics\",otel_scope_schema_url=\"\",otel_scope_version=\"v0.1.0\"} 1\n" does not contain "transaction_success_total{otel_scope_name=\"using-metrics\",otel_scope_version=\"v0.1.0\"} 1" - Test: TestIntegration ---- FAIL: TestIntegration (0.22s) -FAIL -FAIL gofr.dev/examples/using-custom-metrics 0.750s -=== RUN TestMain_BindError -{"level":"INFO","time":"2025-08-22T00:03:51.6034896+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:51.6064473+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:03:51.6064473+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.6218498+05:30","message":"Starting server on port: 57042","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.6198096+05:30","message":"Starting metrics server on port: 57044","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:03:51.7100141+05:30","message":{"trace_id":"3916966568d4b7e3c4bdd84b3cc7030b","error":"no multipart boundary param in Content-Type"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:03:51.7105714+05:30","message":{"trace_id":"3916966568d4b7e3c4bdd84b3cc7030b","span_id":"988fdc0cb74ba893","start_time":"2025-08-22T00:03:51.7100141+05:30","response_time":557,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:57061","uri":"/upload","response":500},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.8074953+05:30","message":{"trace_id":"febb69b8cf4670f4e1685f9c7cc3128d","span_id":"731138328cde2d76","start_time":"2025-08-22T00:03:51.7264851+05:30","response_time":81010,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:57062","uri":"/upload","response":201},"gofrVersion":"dev"} ---- PASS: TestMain_BindError (0.31s) -PASS -ok gofr.dev/examples/using-file-bind (cached) -=== RUN Test_ListHandler -{"level":"WARN","time":"2025-08-22T00:03:51.561983+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.5771844+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.5771844+05:30","message":"Starting metrics server on port: 57043","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.5804712+05:30","message":"Starting server on port: 57041","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.8362609+05:30","message":{"trace_id":"6e79d87d1ca7e2f23ac2890555298afa","span_id":"2e1a13c5dd0059e5","start_time":"2025-08-22T00:03:51.7084069+05:30","response_time":127854,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57060","uri":"/list","response":200},"gofrVersion":"dev"} ---- PASS: Test_ListHandler (0.36s) -=== RUN Test_IndexHTML -{"level":"WARN","time":"2025-08-22T00:03:51.8426145+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.8469262+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.8469262+05:30","message":"Starting metrics server on port: 57067","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:51.8475379+05:30","message":"Starting server on port: 57066","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:53.2287678+05:30","message":{"trace_id":"16425917e60b8da157a86f2ecadebd20","span_id":"ec68787f23beb698","start_time":"2025-08-22T00:03:51.9459668+05:30","response_time":1282801,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57078","uri":"/","response":200},"gofrVersion":"dev"} ---- PASS: Test_IndexHTML (1.41s) -=== RUN Test_404HTML -{"level":"WARN","time":"2025-08-22T00:03:53.2518857+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:53.2587736+05:30","message":"registered static files at endpoint / from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\examples\\using-html-template\\static","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:53.2587736+05:30","message":"Starting metrics server on port: 57080","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:53.2607855+05:30","message":"Starting server on port: 57079","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:03:53.486671+05:30","message":{"trace_id":"2906c6986c48c9818b0974882757e0d4","span_id":"ca8df88dd2f06639","start_time":"2025-08-22T00:03:53.3734045+05:30","response_time":113266,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:57084","uri":"/non-existent-page","response":404},"gofrVersion":"dev"} ---- PASS: Test_404HTML (0.25s) -PASS -ok gofr.dev/examples/using-html-template (cached) -? gofr.dev/examples/using-http-auth-middleware [no test files] -=== RUN Test_main -{"level":"INFO","time":"2025-08-22T00:07:22.9540018+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.9700923+05:30","message":"Starting metrics server on port: 51358","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:22.9721243+05:30","message":"Starting server on port: 51357","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:24.3241956+05:30","message":{"timestamp":"2025-08-22T00:07:23.0662831+05:30","latency":1257912,"correlationId":"a9b4c4770ffbf5739ed49ab31184e275","responseCode":200,"httpMethod":"GET","uri":"https://catfact.ninja/fact"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:24.3247378+05:30","message":{"trace_id":"a9b4c4770ffbf5739ed49ab31184e275","span_id":"a5a6f62e92d28209","start_time":"2025-08-22T00:07:23.0662831+05:30","response_time":1258454,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51364","uri":"/fact","response":200},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:24.5942564+05:30","message":{"timestamp":"2025-08-22T00:07:24.3262528+05:30","latency":268003,"correlationId":"2f5fdc12b2d7eb7306182c809bc7b834","responseCode":200,"httpMethod":"GET","uri":"https://catfact.ninja/breeds"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:24.9897792+05:30","message":{"timestamp":"2025-08-22T00:07:24.5942564+05:30","latency":395522,"correlationId":"2f5fdc12b2d7eb7306182c809bc7b834","responseCode":404,"httpMethod":"GET","uri":"https://catfact.ninja/breed"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:24.9902883+05:30","message":{"trace_id":"2f5fdc12b2d7eb7306182c809bc7b834","span_id":"0a232354f44021ca","start_time":"2025-08-22T00:07:24.3262528+05:30","response_time":664035,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51364","uri":"/.well-known/health","response":200},"gofrVersion":"dev"} ---- PASS: Test_main (2.11s) -=== RUN TestHTTPHandlerURLError -{"level":"INFO","time":"2025-08-22T00:07:27.6965591+05:30","message":{"timestamp":"2025-08-22T00:07:24.9902883+05:30","latency":2706270,"correlationId":"d16db2446d2e72b6109a9bd030438035","responseCode":500,"httpMethod":"GET","uri":"http://invalid/fact","errorMessage":"Get \"http://invalid/fact?max_length=20\": dial tcp: lookup invalid: no such host"},"gofrVersion":"dev"} - new.go:206: Unexpected call to *container.MockMetrics.RecordHistogram([*gofr.Context.WithValue(trace.traceContextKeyType, *trace.recordingSpan).WithValue(httptrace.clientEventContextKey, *httptrace.ClientTrace).WithValue(nettrace.TraceKey, *nettrace.Trace) app_http_service_response 2.7062708 path http://invalid method GET status 500]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/new.go:206 because: there are no expected calls of the method "RecordHistogram" for that receiver ---- FAIL: TestHTTPHandlerURLError (2.71s) -=== RUN TestHTTPHandlerResponseUnmarshalError -{"level":"INFO","time":"2025-08-22T00:07:27.7020726+05:30","message":{"timestamp":"2025-08-22T00:07:27.6988989+05:30","latency":3173,"correlationId":"51316ad6146e7213e116d32b6fb43ac2","responseCode":200,"httpMethod":"GET","uri":"http://127.0.0.1:51421/fact"},"gofrVersion":"dev"} ---- PASS: TestHTTPHandlerResponseUnmarshalError (0.01s) -FAIL -FAIL gofr.dev/examples/using-http-service 5.232s -=== RUN TestExampleMigration -{"level":"INFO","time":"2025-08-22T00:07:25.2132332+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.3203237+05:30","message":"could not connect to redis at 'localhost:2002' , error: dial tcp [::1]:2002: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} - main_test.go:51: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-migrations/main_test.go:51 - Error: Received unexpected error: - Post "http://localhost:51366/employee": dial tcp [::1]:51366: connectex: No connection could be made because the target machine actively refused it. - Test: TestExampleMigration - Messages: TEST[0], Failed. - post new employee with valid data ---- FAIL: TestExampleMigration (0.18s) -FAIL -FAIL gofr.dev/examples/using-migrations 0.844s -=== RUN TestCreateTableEmployee ---- PASS: TestCreateTableEmployee (0.00s) -=== RUN TestAddEmployeeInRedis ---- PASS: TestAddEmployeeInRedis (0.00s) -=== RUN TestAddEmployeeInRedis_Error ---- PASS: TestAddEmployeeInRedis_Error (0.00s) -=== RUN TestAll ---- PASS: TestAll (0.00s) -PASS -ok gofr.dev/examples/using-migrations/migrations (cached) -=== RUN TestExamplePublisher -{"level":"INFO","time":"2025-08-22T00:07:25.2469539+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.2522659+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.2527991+05:30","message":"connecting to Kafka broker: 'localhost:9092'","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.2598333+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.2598333+05:30","message":"failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.2603423+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.2684126+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.2690429+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 13 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x1dae040?, 0x2fe1ab0?}, {0x242bee0, 0xc000115560})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x1dae040?, 0x2fe1ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x1b53dcb?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc0001163c0, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00030cc60, {0xc00005da18?, 0xbb8231?}, {0x1fec5d9?, 0x1c57ea3?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x2417ab0?, 0xc000108620?}, {0x241e000?, 0xc0001e6000?}}, 0xc000518420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc00005dfa0, 0xc000518420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x1de62a0?, 0xc00005dfa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-publisher.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main.go:13 +0xd1\ncreated by gofr.dev/examples/using-publisher.TestExamplePublisher in goroutine 6\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:25 +0x3e\n"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.2703058+05:30","message":"Starting metrics server on port: 51372","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.2703058+05:30","message":"Starting server on port: 51371","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4494064+05:30","message":{"trace_id":"bba3e3f9cde762d8c1f377fbe28d4d14","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4494064+05:30","message":{"trace_id":"bba3e3f9cde762d8c1f377fbe28d4d14","span_id":"23e3468664b08d6a","start_time":"2025-08-22T00:07:25.4485786+05:30","response_time":827,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51395","uri":"/publish-order","response":500},"gofrVersion":"dev"} - main_test.go:69: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:69 - Error: Not equal: - expected: 201 - actual : 500 - Test: TestExamplePublisher - Messages: TEST[0], Failed. - valid order -{"level":"ERROR","time":"2025-08-22T00:07:25.4542714+05:30","message":{"trace_id":"bf6efbef7cd1c220db27cc00e10a1dea","error":"invalid character ',' looking for beginning of value"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4542714+05:30","message":{"trace_id":"bf6efbef7cd1c220db27cc00e10a1dea","span_id":"3c43e0d29613d69f","start_time":"2025-08-22T00:07:25.4542714+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51396","uri":"/publish-order","response":500},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4790598+05:30","message":{"trace_id":"50c72b01ffe0009120bb66f4383b12ae","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4790598+05:30","message":{"trace_id":"50c72b01ffe0009120bb66f4383b12ae","span_id":"998b9da5d94d502a","start_time":"2025-08-22T00:07:25.4784906+05:30","response_time":569,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51397","uri":"/publish-product","response":500},"gofrVersion":"dev"} - main_test.go:69: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:69 - Error: Not equal: - expected: 201 - actual : 500 - Test: TestExamplePublisher - Messages: TEST[2], Failed. - valid product -{"level":"ERROR","time":"2025-08-22T00:07:25.4852111+05:30","message":{"trace_id":"10621fa3227816a88128204fea4be0c2","error":"invalid character ',' looking for beginning of value"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.4852111+05:30","message":{"trace_id":"10621fa3227816a88128204fea4be0c2","span_id":"6ce696632462ed29","start_time":"2025-08-22T00:07:25.4852111+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51398","uri":"/publish-product","response":500},"gofrVersion":"dev"} ---- FAIL: TestExamplePublisher (0.31s) -=== RUN TestExamplePublisherError -{"level":"INFO","time":"2025-08-22T00:07:25.4978223+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.4994451+05:30","message":"Container is being created","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.5005755+05:30","message":"connecting to Kafka broker: 'localhost:1012'","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.5030294+05:30","message":"failed to connect to broker localhost:1012: failed to dial: failed to open connection to localhost:1012: dial tcp [::1]:1012: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.5030294+05:30","message":"failed to connect to kafka at [localhost:1012], error: failed to connect to any kafka brokers","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.5030294+05:30","message":"tracing is disabled, as configs are not provided","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:25.5053148+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.506032+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 96 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x1dae040?, 0x2fe1ab0?}, {0x242bee0, 0xc00038d6e0})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x1dae040?, 0x2fe1ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x1b53dcb?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc000117c70, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00039f0e0, {0xc0006a6000?, 0xc00012f758?}, {0x1fec5d9?, 0x1fea036?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x2417ab0?, 0xc0006a6060?}, {0x241e000?, 0xc0001e6380?}}, 0xc0001a9600)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc000137fa0, 0xc0001a9600)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x1de62a0?, 0xc000137fa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-publisher.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main.go:13 +0xd1\ncreated by gofr.dev/examples/using-publisher.TestExamplePublisherError in goroutine 89\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-publisher/main_test.go:81 +0xcf\n"},"gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.506032+05:30","message":"Starting metrics server on port: 51400","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.5074268+05:30","message":"Starting server on port: 51399","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.7031776+05:30","message":{"trace_id":"90a559fab33913a2d76c90d31622035a","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.7031776+05:30","message":{"trace_id":"90a559fab33913a2d76c90d31622035a","span_id":"5ffc95e73fdd68ad","start_time":"2025-08-22T00:07:25.7031776+05:30","method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51416","uri":"/publish-order","response":500},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.7113729+05:30","message":{"trace_id":"121f20574a25898c1f6c34232d0d6604","error":"can't publish message. Publisher not configured or topic is empty"},"gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.7113729+05:30","message":{"trace_id":"121f20574a25898c1f6c34232d0d6604","span_id":"bc027d018c225fe6","start_time":"2025-08-22T00:07:25.7105594+05:30","response_time":813,"method":"POST","user_agent":"Go-http-client/1.1","ip":"[::1]:51417","uri":"/publish-product","response":500},"gofrVersion":"dev"} ---- PASS: TestExamplePublisherError (0.22s) -FAIL -FAIL gofr.dev/examples/using-publisher 1.234s -=== RUN TestAll ---- PASS: TestAll (0.00s) -PASS -ok gofr.dev/examples/using-publisher/migrations (cached) -=== RUN TestExampleSubscriber -{"level":"ERROR","time":"2025-08-22T00:07:25.5782276+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.5791742+05:30","message":"failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.6029386+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 14 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecovery({0x16b1a40?, 0x28dda10?}, {0x1d2d800, 0xc0004a72c0})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/subscriber.go:106 +0x105\ngofr.dev/pkg/gofr.(*App).Migrate.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:221 +0x3d\npanic({0x16b1a40?, 0x28dda10?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).Controller(0x14589ab?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:83 +0x24\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*multiConn).CreateTopics(0x0, {0xc0003de690, 0x1, 0x1})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:103 +0x5d\ngofr.dev/pkg/gofr/datasource/pubsub/kafka.(*kafkaClient).CreateTopic(0xc00015a360, {0xc00005da28?, 0x4c8231?}, {0x18ef4fe?, 0x155be85?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/pubsub/kafka/conn.go:73 +0xdc\ngofr.dev/pkg/gofr/migration.pubsubDS.CreateTopic(...)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36\ngofr.dev/pkg/gofr/migration.pubsubMigrator.checkAndCreateMigrationTable({{0x1d19290?, 0xc0002a8630?}, {0x1d1f940?, 0xc000228000?}}, 0xc000356420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:55 +0x58\ngofr.dev/pkg/gofr/migration.Run(0xc00005dfa0, 0xc000356420)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration.go:49 +0x3fb\ngofr.dev/pkg/gofr.(*App).Migrate(0x16e9bc0?, 0xc00005dfa0?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/gofr.go:224 +0x49\ngofr.dev/examples/using-subscriber.main()\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-subscriber/main.go:11 +0xd1\ncreated by gofr.dev/examples/using-subscriber.TestExampleSubscriber.func1 in goroutine 18\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-subscriber/main_test.go:51 +0x28\n"},"gofrVersion":"dev"} -failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it. -failed to connect to kafka at [localhost:9092], error: failed to connect to any kafka brokers - main_test.go:38: Error while publishing: can't publish message. Publisher not configured or topic is empty - main_test.go:43: Error while publishing: can't publish message. Publisher not configured or topic is empty -{"level":"ERROR","time":"2025-08-22T00:07:35.5947858+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:35.5947858+05:30","message":"could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:35.6040127+05:30","message":"error while reading from topic order-logs, err: kafka client not connected","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:35.6040127+05:30","message":"error in subscription for topic order-logs: kafka client not connected","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:35.6089733+05:30","message":"error while reading from topic products, err: kafka client not connected","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:35.6089733+05:30","message":"error in subscription for topic products: kafka client not connected","gofrVersion":"dev"} -failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it. -could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers -{"level":"ERROR","time":"2025-08-22T00:07:45.6055271+05:30","message":"failed to connect to broker localhost:9092: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connectex: No connection could be made because the target machine actively refused it.","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:45.6055271+05:30","message":"could not connect to Kafka at 'localhost:9092', error: failed to connect to any kafka brokers","gofrVersion":"dev"} - main_test.go:74: TEST[0], Failed. - valid order - main_test.go:74: TEST[1], Failed. - valid product ---- FAIL: TestExampleSubscriber (21.08s) -FAIL -FAIL gofr.dev/examples/using-subscriber 21.861s -=== RUN TestAll ---- PASS: TestAll (0.00s) -PASS -ok gofr.dev/examples/using-subscriber/migrations (cached) -=== RUN Test_WebSocket_Success -{"level":"INFO","time":"2025-08-22T00:07:25.4086078+05:30","message":"Loaded config from file: ./configs/.env","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.4320019+05:30","message":"Starting server on port: 51388","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.4320019+05:30","message":"Starting metrics server on port: 51389","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:25.5165866+05:30","message":"Received message: Hello! GoFr","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:25.5171323+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 74 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecoveryHandler({0x1bbc420, 0x2dd2ab0}, {0x22329a0, 0xc000222090}, 0xc0005a4b40?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:143 +0xa5\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1.1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:80 +0x45\npanic({0x1bbc420?, 0x2dd2ab0?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/websocket.(*Connection).WriteMessage(0x1b308a0?, 0x2207b80?, {0xc00041a040?, 0xc000418030?, 0x1b30f60?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket/websocket.go:86 +0x37\ngofr.dev/pkg/gofr.(*Context).WriteMessageToSocket(0xc00041a020?, {0x1b308a0, 0x2207b80})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context.go:90 +0x69\ngofr.dev/examples/using-web-socket.WSHandler(0xc000268310)\n\tD:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main.go:26 +0x17a\ngofr.dev/pkg/gofr.handleWebSocketConnection(0xc000268310, 0xc000228210, 0x207cf18)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:101 +0x35\ngofr.dev/pkg/gofr.(*App).WebSocket.func1(0xc000268310)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:44 +0x19f\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:83 +0xd4\ncreated by gofr.dev/pkg/gofr.handler.ServeHTTP in goroutine 72\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:78 +0x516\n"},"gofrVersion":"dev"} -2025/08/22 00:07:25 http: response.WriteHeader on hijacked connection from gofr.dev/pkg/gofr/http/middleware.(*StatusResponseWriter).WriteHeader (logger.go:37) -2025/08/22 00:07:25 http: response.Write on hijacked connection from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).Write (resp_writer_wrapper.go:54) -{"level":"ERROR","time":"2025-08-22T00:07:25.5187228+05:30","message":{"trace_id":"234f64a322412917ede998fd80de93c0","span_id":"ee92c3d8909f1e9c","start_time":"2025-08-22T00:07:25.5128476+05:30","response_time":5875,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:51406","uri":"/ws","response":500},"gofrVersion":"dev"} - main_test.go:41: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main_test.go:41 - Error: Expected nil, but got: &websocket.CloseError{Code:1006, Text:"unexpected EOF"} - Test: Test_WebSocket_Success - Messages: Unexpected error while reading message : websocket: close 1006 (abnormal closure): unexpected EOF - main_test.go:43: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/examples/using-web-socket/main_test.go:43 - Error: Not equal: - expected: "" - actual : "Hello! GoFr" - - Diff: - --- Expected - +++ Actual - @@ -1 +1 @@ - - - +Hello! GoFr - Test: Test_WebSocket_Success - Messages: Test_WebSocket_Success Failed! ---- FAIL: Test_WebSocket_Success (0.18s) -FAIL -FAIL gofr.dev/examples/using-web-socket 0.835s -=== RUN Test_Run_SuccessCallRegisteredArgument ---- PASS: Test_Run_SuccessCallRegisteredArgument (0.00s) -=== RUN Test_Run_SuccessSkipEmptySpaceAndMatchCommandWithSpace ---- PASS: Test_Run_SuccessSkipEmptySpaceAndMatchCommandWithSpace (0.00s) -=== RUN Test_Run_SuccessCommandWithMultipleParameters ---- PASS: Test_Run_SuccessCommandWithMultipleParameters (0.00s) -=== RUN Test_Run_SuccessRouteWithSpecialCharacters ---- PASS: Test_Run_SuccessRouteWithSpecialCharacters (0.02s) -=== RUN Test_Run_ErrorRouteWithSpecialCharacters -found a restricted character in the command while registering with GoFr: 36 -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. -Available commands: -found a restricted character in the command while registering with GoFr: 94 -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. -Available commands: ---- PASS: Test_Run_ErrorRouteWithSpecialCharacters (0.00s) -=== RUN Test_Run_ErrorParamNotReadWithoutHyphen ---- PASS: Test_Run_ErrorParamNotReadWithoutHyphen (0.00s) -=== RUN Test_Run_ErrorNotARegisteredCommand -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. -Available commands: ---- PASS: Test_Run_ErrorNotARegisteredCommand (0.00s) -=== RUN Test_Run_ErrorWhenOnlyParamAreGiven -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. -Available commands: - - -route - Description: Route with hyphen ---- PASS: Test_Run_ErrorWhenOnlyParamAreGiven (0.00s) -=== RUN Test_Run_ErrorRouteRegisteredButNilHandler -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. ---- PASS: Test_Run_ErrorRouteRegisteredButNilHandler (0.00s) -=== RUN Test_Run_ErrorNoArgumentGiven ---- PASS: Test_Run_ErrorNoArgumentGiven (0.00s) -=== RUN Test_Run_SuccessCallInvalidHyphens ---- PASS: Test_Run_SuccessCallInvalidHyphens (0.00s) -=== RUN Test_Run_HelpCommand ---- PASS: Test_Run_HelpCommand (0.00s) -=== RUN Test_Run_HelpCommandLong ---- PASS: Test_Run_HelpCommandLong (0.00s) -=== RUN Test_Run_UnknownCommandShowsHelp ---- PASS: Test_Run_UnknownCommandShowsHelp (0.00s) -=== RUN Test_Run_handler_help ---- PASS: Test_Run_handler_help (0.00s) -=== RUN Test_newContextSuccess -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. ---- PASS: Test_newContextSuccess (0.00s) -=== RUN TestContext_AddTrace ---- PASS: TestContext_AddTrace (0.00s) -=== RUN TestContext_WriteMessageToSocket -{"level":"WARN","time":"2025-08-22T00:07:29.0570296+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:29.0667698+05:30","message":"registered static files at endpoint /static/ from directory D:\\Users\\user\\Desktop\\Go_Migration\\gofr\\pkg\\gofr\\static","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:29.067401+05:30","message":"Starting metrics server on port: 2121","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:29.0688033+05:30","message":"Starting server on port: 51427","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:29.1752457+05:30","message":{"error":"runtime error: invalid memory address or nil pointer dereference","stack_trace":"goroutine 42 [running]:\nruntime/debug.Stack()\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/debug/stack.go:26 +0x5e\ngofr.dev/pkg/gofr.panicRecoveryHandler({0x16d1b60, 0x29d7c20}, {0x1d81a10, 0xc0002c77a0}, 0xc0002ca780?)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:143 +0xa5\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1.1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:80 +0x45\npanic({0x16d1b60?, 0x29d7c20?})\n\tC:/Users/user/go-workspace/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.5.windows-amd64/src/runtime/panic.go:792 +0x132\ngofr.dev/pkg/gofr/websocket.(*Connection).WriteMessage(0x1642f40?, 0x1d54e80?, {0xc0002fc210?, 0x3d31e8?, 0xc00012fdd0?})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket/websocket.go:86 +0x37\ngofr.dev/pkg/gofr.(*Context).WriteMessageToSocket(0xc00012fdc0?, {0x1642f40, 0x1d54e80})\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context.go:90 +0x69\ngofr.dev/pkg/gofr.TestContext_WriteMessageToSocket.func1(0xc000242000)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context_test.go:92 +0x45\ngofr.dev/pkg/gofr.handleWebSocketConnection(0xc000242000, 0xc00040a2d0, 0x1bb4e98)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:101 +0x35\ngofr.dev/pkg/gofr.(*App).WebSocket.func1(0xc000242000)\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/websocket.go:44 +0x19f\ngofr.dev/pkg/gofr.handler.ServeHTTP.func1()\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:83 +0xd4\ncreated by gofr.dev/pkg/gofr.handler.ServeHTTP in goroutine 101\n\tD:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/handler.go:78 +0x516\n"},"gofrVersion":"dev"} -2025/08/22 00:07:29 http: response.WriteHeader on hijacked connection from gofr.dev/pkg/gofr/http/middleware.(*StatusResponseWriter).WriteHeader (logger.go:37) -2025/08/22 00:07:29 http: response.Write on hijacked connection from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).Write (resp_writer_wrapper.go:54) -{"level":"ERROR","time":"2025-08-22T00:07:29.176401+05:30","message":{"trace_id":"7c5bbc5e320acd978713839b5d7b4bf2","span_id":"d46f3f000fd42b3b","start_time":"2025-08-22T00:07:29.1737706+05:30","response_time":2630,"method":"GET","user_agent":"Go-http-client/1.1","ip":"[::1]:55809","uri":"/ws","response":500},"gofrVersion":"dev"} - context_test.go:115: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/context_test.go:115 - Error: Received unexpected error: - websocket: close 1006 (abnormal closure): unexpected EOF - Test: TestContext_WriteMessageToSocket - Messages: Failed to read WebSocket message ---- FAIL: TestContext_WriteMessageToSocket (0.15s) -=== RUN TestContext_WriteMessageToService -{"level":"WARN","time":"2025-08-22T00:07:29.1794822+05:30","message":"Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified.","gofrVersion":"dev"} -{"level":"FATAL","time":"2025-08-22T00:07:29.1845014+05:30","message":"metrics port 2121 is blocked or unreachable","gofrVersion":"dev"} -FAIL gofr.dev/pkg/gofr 0.775s -=== RUN TestRequest_Bind ---- PASS: TestRequest_Bind (0.00s) -=== RUN TestRequest_WithOneArg ---- PASS: TestRequest_WithOneArg (0.00s) -=== RUN TestHostName ---- PASS: TestHostName (0.00s) -=== RUN Test_Params ---- PASS: Test_Params (0.00s) -=== RUN TestResponder_Respond ---- PASS: TestResponder_Respond (0.00s) -PASS -ok gofr.dev/pkg/gofr/cmd (cached) -=== RUN TestNewOutput - output_test.go:17: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/cmd/terminal/output_test.go:17 - Error: Not equal: - expected: 0x1 - actual : 0xa20 - Test: TestNewOutput ---- FAIL: TestNewOutput (0.00s) -=== RUN TestReset ---- PASS: TestReset (0.00s) -=== RUN TestRestoreScreen ---- PASS: TestRestoreScreen (0.00s) -=== RUN TestSaveScreen ---- PASS: TestSaveScreen (0.00s) -=== RUN TestAltScreen ---- PASS: TestAltScreen (0.00s) -=== RUN TestExitAltScreen ---- PASS: TestExitAltScreen (0.00s) -=== RUN TestClearScreen ---- PASS: TestClearScreen (0.00s) -=== RUN TestMoveCursor ---- PASS: TestMoveCursor (0.00s) -=== RUN TestHideCursor ---- PASS: TestHideCursor (0.00s) -=== RUN TestShowCursor ---- PASS: TestShowCursor (0.00s) -=== RUN TestSaveCursorPosition ---- PASS: TestSaveCursorPosition (0.00s) -=== RUN TestRestoreCursorPosition ---- PASS: TestRestoreCursorPosition (0.00s) -=== RUN TestCursorUp ---- PASS: TestCursorUp (0.00s) -=== RUN TestCursorDown ---- PASS: TestCursorDown (0.00s) -=== RUN TestCursorForward ---- PASS: TestCursorForward (0.00s) -=== RUN TestCursorBack ---- PASS: TestCursorBack (0.00s) -=== RUN TestCursorNextLine ---- PASS: TestCursorNextLine (0.00s) -=== RUN TestCursorPrevLine ---- PASS: TestCursorPrevLine (0.00s) -=== RUN TestClearLine ---- PASS: TestClearLine (0.00s) -=== RUN TestClearLineLeft ---- PASS: TestClearLineLeft (0.00s) -=== RUN TestClearLineRight ---- PASS: TestClearLineRight (0.00s) -=== RUN TestClearLines ---- PASS: TestClearLines (0.00s) -=== RUN TestChangeScrollingRegion ---- PASS: TestChangeScrollingRegion (0.00s) -=== RUN TestInsertLines ---- PASS: TestInsertLines (0.00s) -=== RUN TestDeleteLines ---- PASS: TestDeleteLines (0.00s) -=== RUN TestSetWindowTitle ---- PASS: TestSetWindowTitle (0.00s) -=== RUN TestOutput_Printf ---- PASS: TestOutput_Printf (0.00s) -=== RUN TestOutput_Print ---- PASS: TestOutput_Print (0.00s) -=== RUN TestOutput_Println ---- PASS: TestOutput_Println (0.00s) -=== RUN TestProgressBar_SuccessCases ---- PASS: TestProgressBar_SuccessCases (0.00s) -=== RUN TestProgressBar_Fail ---- PASS: TestProgressBar_Fail (0.00s) -=== RUN TestProgressBar_Incr ---- PASS: TestProgressBar_Incr (0.00s) -=== RUN TestProgressBar_getString -=== RUN TestProgressBar_getString/current_and_total_negative -=== RUN TestProgressBar_getString/terminal_width_<_110 -=== RUN TestProgressBar_getString/0%_progress,_50_spaces -=== RUN TestProgressBar_getString/100%_progress ---- PASS: TestProgressBar_getString (0.00s) - --- PASS: TestProgressBar_getString/current_and_total_negative (0.00s) - --- PASS: TestProgressBar_getString/terminal_width_<_110 (0.00s) - --- PASS: TestProgressBar_getString/0%_progress,_50_spaces (0.00s) - --- PASS: TestProgressBar_getString/100%_progress (0.00s) -=== RUN TestSpinner -[?25l â–ˆ â–“ â–’[?25h ---- PASS: TestSpinner (3.00s) -=== RUN TestSpinner_contextDone ---- PASS: TestSpinner_contextDone (1.10s) -FAIL -FAIL gofr.dev/pkg/gofr/cmd/terminal 6.346s -=== RUN Test_EnvSuccess -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess3389546715\001/.env ---- PASS: Test_EnvSuccess (0.01s) -=== RUN Test_EnvSuccess_AppEnv_Override -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_AppEnv_Override1949864173\001/.env -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_AppEnv_Override1949864173\001/.prod.env ---- PASS: Test_EnvSuccess_AppEnv_Override (0.02s) -=== RUN Test_EnvSuccess_Local_Override -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_Local_Override3580251418\001/.env -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_Local_Override3580251418\001/.local.env ---- PASS: Test_EnvSuccess_Local_Override (0.04s) -=== RUN Test_EnvSuccess_SystemEnv_Override -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_SystemEnv_Override3548988514\001/.env -Loaded config from file: C:\Users\user\AppData\Local\Temp\Test_EnvSuccess_SystemEnv_Override3548988514\001/.local.env - godotenv_test.go:104: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/config/godotenv_test.go:104 - Error: Not equal: - expected: "system" - actual : "local" - - Diff: - --- Expected - +++ Actual - @@ -1 +1 @@ - -system - +local - Test: Test_EnvSuccess_SystemEnv_Override - Messages: TEST Failed. - system env override ---- FAIL: Test_EnvSuccess_SystemEnv_Override (0.01s) -=== RUN Test_EnvFailureWithHyphen -Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" -Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" -Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" -Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" -Failed to load config from file: C:\Users\user\AppData\Local\Temp\Test_EnvFailureWithHyphen3557965471\001/.local.env, Err: unexpected character "-" in variable name near "KEY-WITH-HYPHEN=DASH-VALUE\nUNABLE_TO_LOAD=VALUE\n" ---- PASS: Test_EnvFailureWithHyphen (0.02s) -=== RUN Test_NewMockConfig ---- PASS: Test_NewMockConfig (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/config 2.383s -=== RUN Test_newContainerSuccessWithLogger -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. ---- PASS: Test_newContainerSuccessWithLogger (0.00s) -=== RUN Test_newContainerDBInitializationFail -Failed to load config from file: /.env, Err: open /.env: The system cannot find the file specified. -{"level":"ERROR","time":"2025-08-22T00:07:34.6397897+05:30","message":"could not connect to redis at 'invalid:6379' , error: dial tcp: lookup invalid: i/o timeout","gofrVersion":"dev"} -{"level":"ERROR","time":"2025-08-22T00:07:36.908978+05:30","message":"could not connect '' user to '' database at 'invalid:3306', error: dial tcp: lookup invalid: no such host","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:39.2015496+05:30","message":"retrying SQL database connection","gofrVersion":"dev"} ---- PASS: Test_newContainerDBInitializationFail (9.57s) -=== RUN Test_newContainerPubSubInitializationFail -{"level":"ERROR","time":"2025-08-22T00:07:39.2031555+05:30","message":"could not configure google pubsub, error: google project id not provided","gofrVersion":"dev"} ---- PASS: Test_newContainerPubSubInitializationFail (0.00s) -=== RUN TestContainer_MQTTInitialization_Default -{"level":"INFO","time":"2025-08-22T00:07:40.739935+05:30","message":"connected to MQTT at 'broker.emqx.io:1883' with clientID '6524d89e-0354-4ecc-b9be-c0bed7d8fabd'","gofrVersion":"dev"} ---- PASS: TestContainer_MQTTInitialization_Default (1.54s) -=== RUN TestContainer_GetHTTPService ---- PASS: TestContainer_GetHTTPService (0.00s) -=== RUN TestContainer_GetAppName ---- PASS: TestContainer_GetAppName (0.00s) -=== RUN TestContainer_GetAppVersion ---- PASS: TestContainer_GetAppVersion (0.00s) -=== RUN TestContainer_GetPublisher ---- PASS: TestContainer_GetPublisher (0.00s) -=== RUN TestContainer_GetSubscriber ---- PASS: TestContainer_GetSubscriber (0.00s) -=== RUN TestContainer_newContainerWithNilConfig ---- PASS: TestContainer_newContainerWithNilConfig (0.00s) -=== RUN TestContainer_Close ---- PASS: TestContainer_Close (0.00s) -=== RUN Test_GetConnectionFromContext -=== RUN Test_GetConnectionFromContext/no_connection_in_context -=== RUN Test_GetConnectionFromContext/connection_in_context -=== RUN Test_GetConnectionFromContext/wrong_type_in_context ---- PASS: Test_GetConnectionFromContext (0.00s) - --- PASS: Test_GetConnectionFromContext/no_connection_in_context (0.00s) - --- PASS: Test_GetConnectionFromContext/connection_in_context (0.00s) - --- PASS: Test_GetConnectionFromContext/wrong_type_in_context (0.00s) -=== RUN TestContainer_CreateSetsAppNameAndVersion -=== RUN TestContainer_CreateSetsAppNameAndVersion/explicit_config_values -=== RUN TestContainer_CreateSetsAppNameAndVersion/empty_config_uses_defaults ---- PASS: TestContainer_CreateSetsAppNameAndVersion (0.00s) - --- PASS: TestContainer_CreateSetsAppNameAndVersion/explicit_config_values (0.00s) - --- PASS: TestContainer_CreateSetsAppNameAndVersion/empty_config_uses_defaults (0.00s) -=== RUN TestContainer_Health - health.go:76: Unexpected call to *container.MockCouchbase.HealthCheck([context.Background.WithCancel]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health.go:76 because: there are no expected calls of the method "HealthCheck" for that receiver - controller.go:97: missing call(s) to *container.MockClickhouse.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:92 - controller.go:97: missing call(s) to *container.MockOracleDB.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:100 - controller.go:97: missing call(s) to *container.MockKVStore.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:108 - controller.go:97: missing call(s) to *container.MockDgraph.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:116 - controller.go:97: missing call(s) to *container.MockMongo.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:76 - controller.go:97: missing call(s) to *container.MockCassandraWithContext.HealthCheck(is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/container/health_test.go:84 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestContainer_Health (0.00s) -=== RUN Test_HttpServiceMock ---- PASS: Test_HttpServiceMock (0.00s) -=== RUN TestExpectSelect_ValidCases -=== RUN TestExpectSelect_ValidCases/Test_with_string_slice -=== RUN TestExpectSelect_ValidCases/Test_with_string_slice_with_multiple_expectations -=== RUN TestExpectSelect_ValidCases/Test_with_struct -=== RUN TestExpectSelect_ValidCases/Test_with_map ---- PASS: TestExpectSelect_ValidCases (0.00s) - --- PASS: TestExpectSelect_ValidCases/Test_with_string_slice (0.00s) - --- PASS: TestExpectSelect_ValidCases/Test_with_string_slice_with_multiple_expectations (0.00s) - --- PASS: TestExpectSelect_ValidCases/Test_with_struct (0.00s) - --- PASS: TestExpectSelect_ValidCases/Test_with_map (0.00s) -=== RUN TestExpectSelect_ErrorCases -=== RUN TestExpectSelect_ErrorCases/NonPointer_Value_In_ExpectSelect -=== RUN TestExpectSelect_ErrorCases/PointerValue_In_ReturnsResponse -=== RUN TestExpectSelect_ErrorCases/Type_Mismatch_Between_Expect_And_Response -=== RUN TestExpectSelect_ErrorCases/Select_Called_Without_Expectations ---- PASS: TestExpectSelect_ErrorCases (0.00s) - --- PASS: TestExpectSelect_ErrorCases/NonPointer_Value_In_ExpectSelect (0.00s) - --- PASS: TestExpectSelect_ErrorCases/PointerValue_In_ReturnsResponse (0.00s) - --- PASS: TestExpectSelect_ErrorCases/Type_Mismatch_Between_Expect_And_Response (0.00s) - --- PASS: TestExpectSelect_ErrorCases/Select_Called_Without_Expectations (0.00s) -=== RUN TestMockSQL_Dialect ---- PASS: TestMockSQL_Dialect (0.00s) -=== RUN TestMockSQL_HealthCheck ---- PASS: TestMockSQL_HealthCheck (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/container 11.702s -=== RUN Test_ErrorDB ---- PASS: Test_ErrorDB (0.00s) -=== RUN TestErrorDB_StatusCode ---- PASS: TestErrorDB_StatusCode (0.00s) -=== RUN TestErrorRecordNotFound_StatusCode ---- PASS: TestErrorRecordNotFound_StatusCode (0.00s) -PASS -ok gofr.dev/pkg/gofr/datasource (cached) -=== RUN Test_LocalFileSystemDirectoryCreation - fs_test.go:26: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:26 - Error: Received unexpected error: - mkdir temp!@#$%^&*(123: The filename, directory name, or volume label syntax is incorrect. - Test: Test_LocalFileSystemDirectoryCreation ---- FAIL: Test_LocalFileSystemDirectoryCreation (0.00s) -=== RUN Test_LocalFileOpenError ---- PASS: Test_LocalFileOpenError (0.00s) -=== RUN Test_LocalFileOpenFileError ---- PASS: Test_LocalFileOpenFileError (0.00s) -=== RUN Test_CreateReadDeleteFile ---- PASS: Test_CreateReadDeleteFile (0.02s) -=== RUN Test_CreateMoveDeleteFile - fs_test.go:101: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:101 - Error: Received unexpected error: - rename temp.txt temp.text: The process cannot access the file because it is being used by another process. - Test: Test_CreateMoveDeleteFile ---- FAIL: Test_CreateMoveDeleteFile (0.00s) -=== RUN Test_CreateUpdateReadFile ---- PASS: Test_CreateUpdateReadFile (0.03s) -=== RUN Test_CreateFileInvalidPath ---- PASS: Test_CreateFileInvalidPath (0.00s) -=== RUN Test_CreateAndDeleteMultipleDirectories ---- PASS: Test_CreateAndDeleteMultipleDirectories (0.00s) -=== RUN Test_ReadFromCSV ---- PASS: Test_ReadFromCSV (0.03s) -=== RUN Test_ReadFromCSVScanError ---- PASS: Test_ReadFromCSVScanError (0.02s) -=== RUN Test_ReadFromJSONArray ---- PASS: Test_ReadFromJSONArray (0.03s) -=== RUN Test_ReadFromJSONObject ---- PASS: Test_ReadFromJSONObject (0.03s) -=== RUN Test_ReadFromJSONArrayInvalidDelimiter -failed to decode JSON token invalid character '!' looking for beginning of value ---- PASS: Test_ReadFromJSONArrayInvalidDelimiter (0.02s) -=== RUN Test_DirectoryOperations - fs_test.go:336: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/file/fs_test.go:336 - Error: Received unexpected error: - mkdir Hello_world: Cannot create a file when that file already exists. - Test: Test_DirectoryOperations ---- FAIL: Test_DirectoryOperations (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/datasource/file 2.333s -=== RUN TestMessage_Context ---- PASS: TestMessage_Context (0.00s) -=== RUN TestMessage_Bind -=== RUN TestMessage_Bind/bind_to_string -=== RUN TestMessage_Bind/bind_to_float64 -=== RUN TestMessage_Bind/bind_to_int -=== RUN TestMessage_Bind/bind_to_bool -=== RUN TestMessage_Bind/bind_to_map[string]any -=== RUN TestMessage_Bind/bind_to_struct -=== RUN TestMessage_Bind/bind_to_not_pointer -=== RUN TestMessage_Bind/bind_to_struct_with_error ---- PASS: TestMessage_Bind (0.00s) - --- PASS: TestMessage_Bind/bind_to_string (0.00s) - --- PASS: TestMessage_Bind/bind_to_float64 (0.00s) - --- PASS: TestMessage_Bind/bind_to_int (0.00s) - --- PASS: TestMessage_Bind/bind_to_bool (0.00s) - --- PASS: TestMessage_Bind/bind_to_map[string]any (0.00s) - --- PASS: TestMessage_Bind/bind_to_struct (0.00s) - --- PASS: TestMessage_Bind/bind_to_not_pointer (0.00s) - --- PASS: TestMessage_Bind/bind_to_struct_with_error (0.00s) -=== RUN TestBindString ---- PASS: TestBindString (0.00s) -=== RUN TestBindFloat64 ---- PASS: TestBindFloat64 (0.00s) -=== RUN TestBindInt ---- PASS: TestBindInt (0.00s) -=== RUN TestBindBool ---- PASS: TestBindBool (0.00s) -=== RUN TestBindStruct ---- PASS: TestBindStruct (0.00s) -=== RUN TestMessage_Param ---- PASS: TestMessage_Param (0.00s) -=== RUN TestMessage_PathParam ---- PASS: TestMessage_PathParam (0.00s) -=== RUN TestMessage_HostName ---- PASS: TestMessage_HostName (0.00s) -=== RUN TestMessage_QueryParam ---- PASS: TestMessage_QueryParam (0.00s) -PASS -ok gofr.dev/pkg/gofr/datasource/pubsub (cached) -=== RUN TestGoogleClient_New_InvalidConfig ---- PASS: TestGoogleClient_New_InvalidConfig (0.00s) -=== RUN TestGoogleClient_New_EmptyClient -connecting to google pubsub client with projectID 'test' and subscriptionName 'test -could not create Google PubSub client, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information ---- PASS: TestGoogleClient_New_EmptyClient (0.06s) -=== RUN TestGoogleClient_Publish_Success -could not create Google PubSub client, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information -could not connect to Google PubSub, error: pubsub(publisher): credentials: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information ---- PASS: TestGoogleClient_Publish_Success (0.04s) -=== RUN TestGoogleClient_PublishTopic_Error -could not create topic 'test-topic', error: rpc error: code = Canceled desc = context canceled ---- PASS: TestGoogleClient_PublishTopic_Error (0.00s) -=== RUN TestGoogleClient_getTopic_Success ---- PASS: TestGoogleClient_getTopic_Success (0.01s) -=== RUN TestGoogleClient_getTopic_Error ---- PASS: TestGoogleClient_getTopic_Error (0.00s) -=== RUN TestGoogleClient_getSubscription ---- PASS: TestGoogleClient_getSubscription (0.01s) -=== RUN Test_validateConfigs ---- PASS: Test_validateConfigs (0.00s) -=== RUN TestGoogleClient_CloseReturnsError ---- PASS: TestGoogleClient_CloseReturnsError (0.00s) -=== RUN TestGoogleClient_CreateTopic_Success -=== RUN TestGoogleClient_CreateTopic_Success/CreateTopic_Success -=== RUN TestGoogleClient_CreateTopic_Success/CreateTopic_AlreadyExists ---- PASS: TestGoogleClient_CreateTopic_Success (0.00s) - --- PASS: TestGoogleClient_CreateTopic_Success/CreateTopic_Success (0.00s) - --- PASS: TestGoogleClient_CreateTopic_Success/CreateTopic_AlreadyExists (0.00s) -=== RUN TestGoogleClient_CreateTopic_Error ---- PASS: TestGoogleClient_CreateTopic_Error (0.00s) -=== RUN TestGoogleClient_CreateTopic_EmptyClient ---- PASS: TestGoogleClient_CreateTopic_EmptyClient (0.00s) -=== RUN TestGoogleClient_DeleteTopic -=== RUN TestGoogleClient_DeleteTopic/DeleteTopic_Success -=== RUN TestGoogleClient_DeleteTopic/DeleteTopic_NotFound ---- PASS: TestGoogleClient_DeleteTopic (0.02s) - --- PASS: TestGoogleClient_DeleteTopic/DeleteTopic_Success (0.01s) - --- PASS: TestGoogleClient_DeleteTopic/DeleteTopic_NotFound (0.00s) -=== RUN TestGoogleClient_DeleteTopic_EmptyClient ---- PASS: TestGoogleClient_DeleteTopic_EmptyClient (0.00s) -=== RUN TestGoogleClient_Query -Query: collected message 1 ---- PASS: TestGoogleClient_Query (1.02s) -=== RUN TestIsConnected_WhenClientNotNil ---- PASS: TestIsConnected_WhenClientNotNil (0.00s) -=== RUN TestClose_ClientNil ---- PASS: TestClose_ClientNil (0.00s) -=== RUN TestClose_MultipleReceiveChans_ClientNil ---- PASS: TestClose_MultipleReceiveChans_ClientNil (0.00s) -=== RUN TestSubscribe_ClientNil ---- PASS: TestSubscribe_ClientNil (0.00s) -=== RUN TestGetTopic_ClientNil ---- PASS: TestGetTopic_ClientNil (0.00s) -=== RUN TestIsConnected_WhenClientNil ---- PASS: TestIsConnected_WhenClientNil (0.00s) -=== RUN TestGoogleClient_getTopic_CreateFailure ---- PASS: TestGoogleClient_getTopic_CreateFailure (0.00s) -=== RUN TestGoogleClient_collectMessages_LimitReached -Query: collected message 1 -Query: collected message 2 ---- PASS: TestGoogleClient_collectMessages_LimitReached (0.00s) -=== RUN TestGoogleClient_getQuerySubscription_CreateFails ---- PASS: TestGoogleClient_getQuerySubscription_CreateFails (0.01s) -=== RUN TestNew ---- PASS: TestNew (0.00s) -=== RUN TestGoogleMessage_Commit ---- PASS: TestGoogleMessage_Commit (0.00s) -PASS -ok gofr.dev/pkg/gofr/datasource/pubsub/google (cached) -=== RUN TestKafkaHealth_AllBrokersUp ---- PASS: TestKafkaHealth_AllBrokersUp (0.00s) -=== RUN TestKafkaHealth_SomeBrokersUpSomeDown ---- PASS: TestKafkaHealth_SomeBrokersUpSomeDown (0.00s) -=== RUN TestKafkaHealth_AllBrokersDown ---- PASS: TestKafkaHealth_AllBrokersDown (0.00s) -=== RUN TestKafkaHealth_InvalidConnType ---- PASS: TestKafkaHealth_InvalidConnType (0.00s) -=== RUN TestGetSASLMechanism_Success ---- PASS: TestGetSASLMechanism_Success (0.00s) -=== RUN TestGetSASLMechanism_Failure ---- PASS: TestGetSASLMechanism_Failure (0.00s) -=== RUN TestValidateConfigs_ValidCases -=== RUN TestValidateConfigs_ValidCases/Valid_Config -=== RUN TestValidateConfigs_ValidCases/Valid_PLAINTEXT_Protocol -=== RUN TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_TLS_Configs -=== RUN TestValidateConfigs_ValidCases/Valid_SASL_SSL_Protocol_with_TLS_and_SASL_Configs -=== RUN TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_InsecureSkipVerify ---- PASS: TestValidateConfigs_ValidCases (0.00s) - --- PASS: TestValidateConfigs_ValidCases/Valid_Config (0.00s) - --- PASS: TestValidateConfigs_ValidCases/Valid_PLAINTEXT_Protocol (0.00s) - --- PASS: TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_TLS_Configs (0.00s) - --- PASS: TestValidateConfigs_ValidCases/Valid_SASL_SSL_Protocol_with_TLS_and_SASL_Configs (0.00s) - --- PASS: TestValidateConfigs_ValidCases/Valid_SSL_Protocol_with_InsecureSkipVerify (0.00s) -=== RUN TestValidateConfigs_InvalidCases -=== RUN TestValidateConfigs_InvalidCases/Empty_Broker -=== RUN TestValidateConfigs_InvalidCases/Zero_BatchSize -=== RUN TestValidateConfigs_InvalidCases/Zero_BatchBytes -=== RUN TestValidateConfigs_InvalidCases/Zero_BatchTimeout -=== RUN TestValidateConfigs_InvalidCases/SASL_PLAINTEXT_with_Missing_SASLMechanism -=== RUN TestValidateConfigs_InvalidCases/Unsupported_Security_Protocol ---- PASS: TestValidateConfigs_InvalidCases (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/Empty_Broker (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchSize (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchBytes (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/Zero_BatchTimeout (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/SASL_PLAINTEXT_with_Missing_SASLMechanism (0.00s) - --- PASS: TestValidateConfigs_InvalidCases/Unsupported_Security_Protocol (0.00s) -=== RUN TestKafkaClient_PublishError ---- PASS: TestKafkaClient_PublishError (0.00s) -=== RUN TestKafkaClient_Publish ---- PASS: TestKafkaClient_Publish (0.00s) -=== RUN TestKafkaClient_SubscribeSuccess ---- PASS: TestKafkaClient_SubscribeSuccess (0.00s) -=== RUN TestKafkaClient_Subscribe_ErrConsumerGroupID -cannot subscribe as consumer_id is not provided in configs ---- PASS: TestKafkaClient_Subscribe_ErrConsumerGroupID (0.00s) -=== RUN TestKafkaClient_SubscribeError ---- PASS: TestKafkaClient_SubscribeError (0.00s) -=== RUN TestKafkaClient_Close ---- PASS: TestKafkaClient_Close (0.00s) -=== RUN TestKafkaClient_CloseError ---- PASS: TestKafkaClient_CloseError (0.00s) -=== RUN TestKafkaClient_getNewReader ---- PASS: TestKafkaClient_getNewReader (0.00s) -=== RUN TestNewKafkaClient -=== RUN TestNewKafkaClient/validation_of_configs_fail_(Empty_Broker) -could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 -=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Bytes) -could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 -=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Size) -could not initialize kafka, error: batch size must be greater than 0: KAFKA_BATCH_SIZE must be greater than 0 -=== RUN TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Timeout) -could not initialize kafka, error: batch timeout must be greater than 0: KAFKA_BATCH_TIMEOUT must be greater than 0 -=== RUN TestNewKafkaClient/successful_initialization -failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host -failed to connect to kafka at [kafka-broker], error: failed to connect to any kafka brokers ---- PASS: TestNewKafkaClient (2.71s) - --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Empty_Broker) (0.00s) - --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Bytes) (0.00s) - --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Size) (0.00s) - --- PASS: TestNewKafkaClient/validation_of_configs_fail_(Zero_Batch_Timeout) (0.00s) - --- PASS: TestNewKafkaClient/successful_initialization (2.71s) -=== RUN TestKafkaClient_Controller ---- PASS: TestKafkaClient_Controller (0.00s) -=== RUN TestKafkaClient_DeleteTopic ---- PASS: TestKafkaClient_DeleteTopic (0.00s) -=== RUN TestKafkaClient_CreateTopic -=== RUN TestKafkaClient_CreateTopic/successfully_creates_topic -=== RUN TestKafkaClient_CreateTopic/controller_returns_error ---- PASS: TestKafkaClient_CreateTopic (0.00s) - --- PASS: TestKafkaClient_CreateTopic/successfully_creates_topic (0.00s) - --- PASS: TestKafkaClient_CreateTopic/controller_returns_error (0.00s) -=== RUN TestKafkaClient_Subscribe_NotConnected ---- PASS: TestKafkaClient_Subscribe_NotConnected (10.00s) -=== RUN TestKafkaClient_Query_Failures -=== RUN TestKafkaClient_Query_Failures/Client_not_connected -=== RUN TestKafkaClient_Query_Failures/Empty_topic_name -=== RUN TestKafkaClient_Query_Failures/ReadMessage_fails_with_non-EOF_error ---- PASS: TestKafkaClient_Query_Failures (1.42s) - --- PASS: TestKafkaClient_Query_Failures/Client_not_connected (0.00s) - --- PASS: TestKafkaClient_Query_Failures/Empty_topic_name (0.00s) - --- PASS: TestKafkaClient_Query_Failures/ReadMessage_fails_with_non-EOF_error (1.42s) -=== RUN TestKafkaClient_Query_ArgumentParsing -=== RUN TestKafkaClient_Query_ArgumentParsing/No_arguments_-_defaults -failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host -could not connect to Kafka at 'kafka-broker', error: failed to connect to any kafka brokers -=== RUN TestKafkaClient_Query_ArgumentParsing/Only_offset_provided -=== RUN TestKafkaClient_Query_ArgumentParsing/Offset_and_limit_provided -=== RUN TestKafkaClient_Query_ArgumentParsing/Invalid_offset_type_-_ignored -=== RUN TestKafkaClient_Query_ArgumentParsing/Invalid_limit_type_-_ignored -=== RUN TestKafkaClient_Query_ArgumentParsing/Both_invalid_types_-_defaults ---- PASS: TestKafkaClient_Query_ArgumentParsing (8.49s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/No_arguments_-_defaults (1.41s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/Only_offset_provided (1.41s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/Offset_and_limit_provided (1.42s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/Invalid_offset_type_-_ignored (1.41s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/Invalid_limit_type_-_ignored (1.41s) - --- PASS: TestKafkaClient_Query_ArgumentParsing/Both_invalid_types_-_defaults (1.41s) -=== RUN TestKafkaClient_Query_ContextHandling -=== RUN TestKafkaClient_Query_ContextHandling/Context_with_existing_deadline -=== RUN TestKafkaClient_Query_ContextHandling/Context_without_deadline -=== RUN TestKafkaClient_Query_ContextHandling/Canceled_context ---- PASS: TestKafkaClient_Query_ContextHandling (2.83s) - --- PASS: TestKafkaClient_Query_ContextHandling/Context_with_existing_deadline (1.42s) - --- PASS: TestKafkaClient_Query_ContextHandling/Context_without_deadline (1.41s) - --- PASS: TestKafkaClient_Query_ContextHandling/Canceled_context (0.00s) -=== RUN TestNewMessage ---- PASS: TestNewMessage (0.00s) -=== RUN TestKafkaMessage_Commit ---- PASS: TestKafkaMessage_Commit (0.00s) -=== RUN TestKafkaMessage_CommitError ---- PASS: TestKafkaMessage_CommitError (0.00s) -=== RUN Test_CreateTLSConfig_Success -=== RUN Test_CreateTLSConfig_Success/Only_CA_Cert -failed to connect to broker kafka-broker: failed to dial: failed to open connection to kafka-broker:9092: dial tcp: lookup kafka-broker: no such host -could not connect to Kafka at 'kafka-broker', error: failed to connect to any kafka brokers -=== RUN Test_CreateTLSConfig_Success/CA_Cert_+_Client_Cert/Key -=== RUN Test_CreateTLSConfig_Success/Only_Client_Cert/Key ---- PASS: Test_CreateTLSConfig_Success (0.09s) - --- PASS: Test_CreateTLSConfig_Success/Only_CA_Cert (0.03s) - --- PASS: Test_CreateTLSConfig_Success/CA_Cert_+_Client_Cert/Key (0.05s) - --- PASS: Test_CreateTLSConfig_Success/Only_Client_Cert/Key (0.00s) -=== RUN TestCreateTLSConfig_Errors -=== RUN TestCreateTLSConfig_Errors/Invalid_CA_Cert_File -=== RUN TestCreateTLSConfig_Errors/Invalid_Client_Cert_File -=== RUN TestCreateTLSConfig_Errors/Invalid_Client_Key_File ---- PASS: TestCreateTLSConfig_Errors (0.00s) - --- PASS: TestCreateTLSConfig_Errors/Invalid_CA_Cert_File (0.00s) - --- PASS: TestCreateTLSConfig_Errors/Invalid_Client_Cert_File (0.00s) - --- PASS: TestCreateTLSConfig_Errors/Invalid_Client_Key_File (0.00s) -PASS -ok gofr.dev/pkg/gofr/datasource/pubsub/kafka (cached) -=== RUN TestMessage ---- PASS: TestMessage (0.00s) -=== RUN TestMQTT_New ---- PASS: TestMQTT_New (0.04s) -=== RUN TestMQTT_EmptyConfigs ---- PASS: TestMQTT_EmptyConfigs (0.82s) -=== RUN TestMQTT_getMQTTClientOptions ---- PASS: TestMQTT_getMQTTClientOptions (0.00s) -=== RUN TestMQTT_Ping ---- PASS: TestMQTT_Ping (0.00s) -=== RUN TestMQTT_Disconnect -error while publishing message, error: connection error with MQTT ---- PASS: TestMQTT_Disconnect (0.00s) -=== RUN TestMQTT_DisconnectWithSubscriptions ---- PASS: TestMQTT_DisconnectWithSubscriptions (0.00s) -=== RUN TestMQTT_PublishSuccess ---- PASS: TestMQTT_PublishSuccess (0.00s) -=== RUN TestMQTT_PublishFailure -error while publishing message, error: connection error with MQTT ---- PASS: TestMQTT_PublishFailure (0.00s) -=== RUN TestMQTT_SubscribeSuccess ---- PASS: TestMQTT_SubscribeSuccess (0.00s) -=== RUN TestMQTT_SubscribeFailure -error getting a message from MQTT, error: connection error with MQTT ---- PASS: TestMQTT_SubscribeFailure (0.00s) -=== RUN TestMQTT_SubscribeWithFunc ---- PASS: TestMQTT_SubscribeWithFunc (0.00s) -=== RUN Test_getHandler ---- PASS: Test_getHandler (0.00s) -=== RUN TestMQTT_Unsubscribe ---- PASS: TestMQTT_Unsubscribe (0.00s) -=== RUN TestMQTT_CreateTopic ---- PASS: TestMQTT_CreateTopic (0.00s) -=== RUN TestMQTT_Health ---- PASS: TestMQTT_Health (0.00s) -=== RUN TestMQTT_DeleteTopic ---- PASS: TestMQTT_DeleteTopic (0.00s) -=== RUN TestReconnectingHandler ---- PASS: TestReconnectingHandler (0.00s) -=== RUN TestConnectionLostHandler ---- PASS: TestConnectionLostHandler (0.00s) -=== RUN TestReconnectHandler ---- PASS: TestReconnectHandler (0.00s) -=== RUN TestMQTT_createMqttHandler ---- PASS: TestMQTT_createMqttHandler (0.00s) -=== RUN TestMQTT_Close ---- PASS: TestMQTT_Close (0.00s) -=== RUN Test_parseQueryArgs -=== RUN Test_parseQueryArgs/no_args -=== RUN Test_parseQueryArgs/only_timeout_arg -=== RUN Test_parseQueryArgs/timeout_and_limit_args -=== RUN Test_parseQueryArgs/invalid_timeout_type,_valid_limit -=== RUN Test_parseQueryArgs/valid_timeout,_invalid_limit_type -=== RUN Test_parseQueryArgs/only_limit_arg_(nil_for_timeout) ---- PASS: Test_parseQueryArgs (0.00s) - --- PASS: Test_parseQueryArgs/no_args (0.00s) - --- PASS: Test_parseQueryArgs/only_timeout_arg (0.00s) - --- PASS: Test_parseQueryArgs/timeout_and_limit_args (0.00s) - --- PASS: Test_parseQueryArgs/invalid_timeout_type,_valid_limit (0.00s) - --- PASS: Test_parseQueryArgs/valid_timeout,_invalid_limit_type (0.00s) - --- PASS: Test_parseQueryArgs/only_limit_arg_(nil_for_timeout) (0.00s) -=== RUN TestMQTT_createQueryMessageHandler ---- PASS: TestMQTT_createQueryMessageHandler (0.00s) -=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors -=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/success -=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_without_token_error -=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_with_token_error -=== RUN TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/completed_but_token_error ---- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors (0.00s) - --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/success (0.00s) - --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_without_token_error (0.00s) - --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/timeout_with_token_error (0.00s) - --- PASS: TestMQTT_subscribeToTopicForQuery_SuccessAndErrors/completed_but_token_error (0.00s) -=== RUN TestMQTT_subscribeToTopicForQuery_ContextError -=== RUN TestMQTT_subscribeToTopicForQuery_ContextError/error_context_canceled_during_wait -=== RUN TestMQTT_subscribeToTopicForQuery_ContextError/error_context_deadline_exceeded_during_wait ---- PASS: TestMQTT_subscribeToTopicForQuery_ContextError (0.01s) - --- PASS: TestMQTT_subscribeToTopicForQuery_ContextError/error_context_canceled_during_wait (0.00s) - --- PASS: TestMQTT_subscribeToTopicForQuery_ContextError/error_context_deadline_exceeded_during_wait (0.01s) -=== RUN TestMQTT_Query_SuccessCases -=== RUN TestMQTT_Query_SuccessCases/one_message_default_args -=== RUN TestMQTT_Query_SuccessCases/multiple_messages_limit_reached -=== RUN TestMQTT_Query_SuccessCases/timeout_reached_before_limit -=== RUN TestMQTT_Query_SuccessCases/no_messages_collected -Query: no messages collected for topic test/query/success within timeout/limit ---- PASS: TestMQTT_Query_SuccessCases (0.08s) - --- PASS: TestMQTT_Query_SuccessCases/one_message_default_args (0.01s) - --- PASS: TestMQTT_Query_SuccessCases/multiple_messages_limit_reached (0.01s) - --- PASS: TestMQTT_Query_SuccessCases/timeout_reached_before_limit (0.03s) - --- PASS: TestMQTT_Query_SuccessCases/no_messages_collected (0.03s) -PASS -ok gofr.dev/pkg/gofr/datasource/pubsub/mqtt (cached) -=== RUN TestRedis_HealthHandlerError -connecting to redis at '127.0.0.1:55825' on database 0 -hello 3 - hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 1239 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:27 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to ping (string) - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:29 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to info (string) - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:27 - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to info (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/health_test.go:29 - controller.go:251: aborting test due to missing call(s) ---- FAIL: TestRedis_HealthHandlerError (0.01s) -=== RUN TestRedisHealth_WithoutRedis ---- PASS: TestRedisHealth_WithoutRedis (0.00s) -=== RUN TestQueryLog_PrettyPrint ---- PASS: TestQueryLog_PrettyPrint (0.00s) -=== RUN Test_NewClient_HostNameMissing ---- PASS: Test_NewClient_HostNameMissing (0.00s) -=== RUN Test_NewClient_InvalidPort -could not connect to redis at 'localhost:6379' , error: dial tcp [::1]:6379: connectex: No connection could be made because the target machine actively refused it. ---- PASS: Test_NewClient_InvalidPort (0.10s) -=== RUN TestRedis_QueryLogging - hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 0 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:55 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to ping (string) - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:56 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to set (string) - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:55 - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to set (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:56 - controller.go:251: aborting test due to missing call(s) ---- FAIL: TestRedis_QueryLogging (0.00s) -=== RUN TestRedis_PipelineQueryLogging - hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 509 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:90 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to ping (string) - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:91 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to pipeline (string) - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:90 - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to pipeline (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:91 - controller.go:251: aborting test due to missing call(s) ---- FAIL: TestRedis_PipelineQueryLogging (0.00s) -=== RUN TestRedis_Close - hook.go:76: Unexpected call to *redis.MockMetrics.RecordHistogram([context.Background app_redis_stats 649 hostname 127.0.0.1 type hello]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/hook.go:76 because: - expected call at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:138 doesn't match the argument at index 6. - Got: [hello] ([]interface {}) - Want: is equal to ping (string) - controller.go:251: missing call(s) to *redis.MockMetrics.RecordHistogram(is anything, is equal to app_redis_stats (string), is anything, is equal to hostname (string), is anything, is equal to type (string), is equal to ping (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/redis/redis_test.go:138 - controller.go:251: aborting test due to missing call(s) ---- FAIL: TestRedis_Close (0.00s) -=== RUN Test_TLSConfig ---- PASS: Test_TLSConfig (0.00s) -=== RUN Test_TLSConfigWithDummyPEM -failed to read CA cert file: open -----BEGIN CERTIFICATE-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzQw\n-----END CERTIFICATE-----: The system cannot find the path specified. -failed to load client cert/key pair: open -----BEGIN CERTIFICATE-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzQw\n-----END CERTIFICATE-----: The system cannot find the path specified. ---- PASS: Test_TLSConfigWithDummyPEM (0.00s) -FAIL gofr.dev/pkg/gofr/datasource/redis 3.222s -=== RUN Test_BindType -=== RUN Test_BindType/mysql_bind_type -=== RUN Test_BindType/postgres_bind_type -=== RUN Test_BindType/any-other-dialect_bind_type ---- PASS: Test_BindType (0.00s) - --- PASS: Test_BindType/mysql_bind_type (0.00s) - --- PASS: Test_BindType/postgres_bind_type (0.00s) - --- PASS: Test_BindType/any-other-dialect_bind_type (0.00s) -=== RUN Test_BindVar -=== RUN Test_BindVar/Postgres_bind_var -=== RUN Test_BindVar/MySQL_bind_var -=== RUN Test_BindVar/Unknown_dialect_bind_var ---- PASS: Test_BindVar (0.00s) - --- PASS: Test_BindVar/Postgres_bind_var (0.00s) - --- PASS: Test_BindVar/MySQL_bind_var (0.00s) - --- PASS: Test_BindVar/Unknown_dialect_bind_var (0.00s) -=== RUN Test_Quote -=== RUN Test_Quote/Postgres_quote -=== RUN Test_Quote/MySQL_quote -=== RUN Test_Quote/Unknown_dialect_quote ---- PASS: Test_Quote (0.00s) - --- PASS: Test_Quote/Postgres_quote (0.00s) - --- PASS: Test_Quote/MySQL_quote (0.00s) - --- PASS: Test_Quote/Unknown_dialect_quote (0.00s) -=== RUN Test_QuotedString -=== RUN Test_QuotedString/Double_quote -=== RUN Test_QuotedString/Back_quote ---- PASS: Test_QuotedString (0.00s) - --- PASS: Test_QuotedString/Double_quote (0.00s) - --- PASS: Test_QuotedString/Back_quote (0.00s) -=== RUN TestDB_SelectSingleColumnFromIntToString ---- PASS: TestDB_SelectSingleColumnFromIntToString (0.00s) -=== RUN TestDB_SelectSingleColumnFromStringToString ---- PASS: TestDB_SelectSingleColumnFromStringToString (0.00s) -=== RUN TestDB_SelectSingleColumnFromIntToInt ---- PASS: TestDB_SelectSingleColumnFromIntToInt (0.00s) -=== RUN TestDB_SelectSingleColumnFromIntToCustomInt ---- PASS: TestDB_SelectSingleColumnFromIntToCustomInt (0.00s) -=== RUN TestDB_SelectSingleColumnFromStringToCustomInt ---- PASS: TestDB_SelectSingleColumnFromStringToCustomInt (0.00s) -=== RUN TestDB_SelectContextError ---- PASS: TestDB_SelectContextError (0.00s) -=== RUN TestDB_SelectDataPointerError ---- PASS: TestDB_SelectDataPointerError (0.00s) -=== RUN TestDB_SelectSingleColumnFromStringToCustomString ---- PASS: TestDB_SelectSingleColumnFromStringToCustomString (0.00s) -=== RUN TestDB_SelectSingleRowMultiColumn ---- PASS: TestDB_SelectSingleRowMultiColumn (0.00s) -=== RUN TestDB_SelectSingleRowMultiColumnWithTags ---- PASS: TestDB_SelectSingleRowMultiColumnWithTags (0.00s) -=== RUN TestDB_SelectMultiRowMultiColumnWithTags ---- PASS: TestDB_SelectMultiRowMultiColumnWithTags (0.00s) -=== RUN TestDB_SelectSingleColumnError ---- PASS: TestDB_SelectSingleColumnError (0.00s) -=== RUN TestDB_SelectDataPointerNotExpected ---- PASS: TestDB_SelectDataPointerNotExpected (0.00s) -=== RUN TestDB_Query ---- PASS: TestDB_Query (0.00s) -=== RUN TestDB_QueryError ---- PASS: TestDB_QueryError (0.00s) -=== RUN TestDB_QueryContext ---- PASS: TestDB_QueryContext (0.00s) -=== RUN TestDB_QueryContextError ---- PASS: TestDB_QueryContextError (0.00s) -=== RUN TestDB_QueryRow ---- PASS: TestDB_QueryRow (0.00s) -=== RUN TestDB_QueryRowContext ---- PASS: TestDB_QueryRowContext (0.00s) -=== RUN TestDB_Exec ---- PASS: TestDB_Exec (0.00s) -=== RUN TestDB_ExecError ---- PASS: TestDB_ExecError (0.00s) -=== RUN TestDB_ExecContext ---- PASS: TestDB_ExecContext (0.00s) -=== RUN TestDB_ExecContextError ---- PASS: TestDB_ExecContextError (0.00s) -=== RUN TestDB_Prepare ---- PASS: TestDB_Prepare (0.00s) -=== RUN TestDB_PrepareError ---- PASS: TestDB_PrepareError (0.00s) -=== RUN TestDB_Begin ---- PASS: TestDB_Begin (0.00s) -=== RUN TestDB_BeginError ---- PASS: TestDB_BeginError (0.00s) -=== RUN TestDB_Close ---- PASS: TestDB_Close (0.00s) -=== RUN TestTx_Query ---- PASS: TestTx_Query (0.00s) -=== RUN TestTx_QueryError ---- PASS: TestTx_QueryError (0.00s) -=== RUN TestTx_QueryRow ---- PASS: TestTx_QueryRow (0.00s) -=== RUN TestTx_QueryRowContext ---- PASS: TestTx_QueryRowContext (0.00s) -=== RUN TestTx_Exec ---- PASS: TestTx_Exec (0.00s) -=== RUN TestTx_ExecError ---- PASS: TestTx_ExecError (0.00s) -=== RUN TestTx_ExecContext ---- PASS: TestTx_ExecContext (0.00s) -=== RUN TestTx_ExecContextError ---- PASS: TestTx_ExecContextError (0.00s) -=== RUN TestTx_Prepare ---- PASS: TestTx_Prepare (0.00s) -=== RUN TestTx_PrepareError ---- PASS: TestTx_PrepareError (0.00s) -=== RUN TestTx_Commit ---- PASS: TestTx_Commit (0.00s) -=== RUN TestTx_CommitError ---- PASS: TestTx_CommitError (0.00s) -=== RUN TestTx_RollBack ---- PASS: TestTx_RollBack (0.00s) -=== RUN TestTx_RollbackError ---- PASS: TestTx_RollbackError (0.00s) -=== RUN TestPrettyPrint ---- PASS: TestPrettyPrint (0.00s) -=== RUN TestClean ---- PASS: TestClean (0.00s) -=== RUN TestDB_CloseWhenNil ---- PASS: TestDB_CloseWhenNil (0.00s) -=== RUN TestDB_BeginTx ---- PASS: TestDB_BeginTx (0.00s) -=== RUN TestDB_PingSuccess ---- PASS: TestDB_PingSuccess (0.00s) -=== RUN TestDB_PingFailure ---- PASS: TestDB_PingFailure (0.00s) -=== RUN TestGetOperationType_EdgeCases ---- PASS: TestGetOperationType_EdgeCases (0.00s) -=== RUN TestClean_EmptyString ---- PASS: TestClean_EmptyString (0.00s) -=== RUN TestDB_Dialect ---- PASS: TestDB_Dialect (0.00s) -=== RUN TestGetOperationType ---- PASS: TestGetOperationType (0.00s) -=== RUN TestDB_Begin_Error ---- PASS: TestDB_Begin_Error (0.00s) -=== RUN TestDB_sendOperationStats_RecordsMilliseconds -&{SELECT SELECT * FROM users 1500 []} ---- PASS: TestDB_sendOperationStats_RecordsMilliseconds (0.00s) -=== RUN TestHealth_HealthCheck ---- PASS: TestHealth_HealthCheck (0.00s) -=== RUN TestHealth_HealthCheckDBNotConnected ---- PASS: TestHealth_HealthCheckDBNotConnected (0.00s) -=== RUN TestHealth_HealthCheckDBPingFailed ---- PASS: TestHealth_HealthCheckDBPingFailed (0.00s) -=== RUN Test_InsertQuery_Success -=== RUN Test_InsertQuery_Success/Basic_INSERT_(MySQL) -=== RUN Test_InsertQuery_Success/Basic_INSERT_(Postgres) -=== RUN Test_InsertQuery_Success/Skip_Auto-Increment_(MySQL) -=== RUN Test_InsertQuery_Success/Skip_Auto-Increment_(Postgres) ---- PASS: Test_InsertQuery_Success (0.00s) - --- PASS: Test_InsertQuery_Success/Basic_INSERT_(MySQL) (0.00s) - --- PASS: Test_InsertQuery_Success/Basic_INSERT_(Postgres) (0.00s) - --- PASS: Test_InsertQuery_Success/Skip_Auto-Increment_(MySQL) (0.00s) - --- PASS: Test_InsertQuery_Success/Skip_Auto-Increment_(Postgres) (0.00s) -=== RUN Test_InsertQuery_Error -=== RUN Test_InsertQuery_Error/NotNull_Validation_Error_(MySQL) -=== RUN Test_InsertQuery_Error/NotNull_Validation_Error_(Postgres) ---- PASS: Test_InsertQuery_Error (0.00s) - --- PASS: Test_InsertQuery_Error/NotNull_Validation_Error_(MySQL) (0.00s) - --- PASS: Test_InsertQuery_Error/NotNull_Validation_Error_(Postgres) (0.00s) -=== RUN Test_SelectQuery -=== RUN Test_SelectQuery/mysql -=== RUN Test_SelectQuery/postgres ---- PASS: Test_SelectQuery (0.00s) - --- PASS: Test_SelectQuery/mysql (0.00s) - --- PASS: Test_SelectQuery/postgres (0.00s) -=== RUN Test_SelectByQuery -=== RUN Test_SelectByQuery/mysql -=== RUN Test_SelectByQuery/postgres ---- PASS: Test_SelectByQuery (0.00s) - --- PASS: Test_SelectByQuery/mysql (0.00s) - --- PASS: Test_SelectByQuery/postgres (0.00s) -=== RUN Test_UpdateByQuery -=== RUN Test_UpdateByQuery/mysql -=== RUN Test_UpdateByQuery/postgres ---- PASS: Test_UpdateByQuery (0.00s) - --- PASS: Test_UpdateByQuery/mysql (0.00s) - --- PASS: Test_UpdateByQuery/postgres (0.00s) -=== RUN Test_DeleteByQuery -=== RUN Test_DeleteByQuery/mysql -=== RUN Test_DeleteByQuery/postgres ---- PASS: Test_DeleteByQuery (0.00s) - --- PASS: Test_DeleteByQuery/mysql (0.00s) - --- PASS: Test_DeleteByQuery/postgres (0.00s) -=== RUN Test_validateNotNull_Error -=== RUN Test_validateNotNull_Error/Float_null_error -=== RUN Test_validateNotNull_Error/Nil_channel -=== RUN Test_validateNotNull_Error/Custom_type_nil ---- PASS: Test_validateNotNull_Error (0.00s) - --- PASS: Test_validateNotNull_Error/Float_null_error (0.00s) - --- PASS: Test_validateNotNull_Error/Nil_channel (0.00s) - --- PASS: Test_validateNotNull_Error/Custom_type_nil (0.00s) -=== RUN TestNewSQL_ErrorCase ---- PASS: TestNewSQL_ErrorCase (0.00s) -=== RUN TestNewSQL_InvalidDialect ---- PASS: TestNewSQL_InvalidDialect (0.00s) -=== RUN TestNewSQL_GetDBDialect -could not connect '' user to '' database at 'localhost:3306', error: dial tcp [::1]:3306: connectex: No connection could be made because the target machine actively refused it. -could not connect '' user to '' database at 'localhost:3306', error: dial tcp [::1]:3306: connectex: No connection could be made because the target machine actively refused it. ---- PASS: TestNewSQL_GetDBDialect (0.13s) -=== RUN TestNewSQL_InvalidConfig ---- PASS: TestNewSQL_InvalidConfig (0.00s) -=== RUN TestSQL_GetDBConfig ---- PASS: TestSQL_GetDBConfig (0.00s) -=== RUN TestSQL_ConfigCases ---- PASS: TestSQL_ConfigCases (0.00s) -=== RUN TestSQL_getDBConnectionString -=== RUN TestSQL_getDBConnectionString/mysql_dialect -=== RUN TestSQL_getDBConnectionString/mysql_dialect_with_Configurable_charset -=== RUN TestSQL_getDBConnectionString/postgresql_dialect -=== RUN TestSQL_getDBConnectionString/postgresql_dialect#01 -=== RUN TestSQL_getDBConnectionString/sqlite_dialect -=== RUN TestSQL_getDBConnectionString/cockroachdb_dialect -=== RUN TestSQL_getDBConnectionString/unsupported_dialect ---- PASS: TestSQL_getDBConnectionString (0.00s) - --- PASS: TestSQL_getDBConnectionString/mysql_dialect (0.00s) - --- PASS: TestSQL_getDBConnectionString/mysql_dialect_with_Configurable_charset (0.00s) - --- PASS: TestSQL_getDBConnectionString/postgresql_dialect (0.00s) - --- PASS: TestSQL_getDBConnectionString/postgresql_dialect#01 (0.00s) - --- PASS: TestSQL_getDBConnectionString/sqlite_dialect (0.00s) - --- PASS: TestSQL_getDBConnectionString/cockroachdb_dialect (0.00s) - --- PASS: TestSQL_getDBConnectionString/unsupported_dialect (0.00s) -=== RUN Test_NewSQLMock ---- PASS: Test_NewSQLMock (0.00s) -=== RUN Test_NewSQLMockWithConfig ---- PASS: Test_NewSQLMockWithConfig (0.00s) -=== RUN Test_sqliteSuccessfulConnLogs ---- PASS: Test_sqliteSuccessfulConnLogs (0.00s) -=== RUN Test_sqliteErrConnLogs ---- PASS: Test_sqliteErrConnLogs (0.00s) -=== RUN Test_SQLRetryConnectionInfoLog -could not connect 'user' user to 'test' database at 'host:3201', error: dial tcp: lookup host: no such host - sql_test.go:366: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/datasource/sql/sql_test.go:366 - Error: "generating database connection string for 'postgres'\nregistering sql dialect 'postgres' for traces\nconnecting to 'user' user to 'test' database at 'host:3201'\n" does not contain "retrying SQL database connection" - Test: Test_SQLRetryConnectionInfoLog ---- FAIL: Test_SQLRetryConnectionInfoLog (2.81s) -=== RUN TestNewSQL_CockroachDB -generating database connection string for 'cockroachdb' -registering sql dialect 'cockroachdb' for traces -using 'postgres' as an alias for 'cockroachdb' for otel-sql registration -connecting to 'testuser' user to 'testdb' database at 'localhost:26257' -could not connect 'testuser' user to 'testdb' database at 'localhost:26257', error: dial tcp [::1]:26257: connectex: No connection could be made because the target machine actively refused it. -Test Logs for CockroachDB: ---- PASS: TestNewSQL_CockroachDB (0.00s) -=== RUN TestGetSupabaseConfig -=== RUN TestGetSupabaseConfig/Complete_Supabase_Config -=== RUN TestGetSupabaseConfig/Non-Supabase_Dialect -=== RUN TestGetSupabaseConfig/With_DB_URL -=== RUN TestGetSupabaseConfig/With_Default_Values ---- PASS: TestGetSupabaseConfig (0.00s) - --- PASS: TestGetSupabaseConfig/Complete_Supabase_Config (0.00s) - --- PASS: TestGetSupabaseConfig/Non-Supabase_Dialect (0.00s) - --- PASS: TestGetSupabaseConfig/With_DB_URL (0.00s) - --- PASS: TestGetSupabaseConfig/With_Default_Values (0.00s) -=== RUN TestConfigureSupabaseConnection -=== RUN TestConfigureSupabaseConnection/Direct_Connection -=== RUN TestConfigureSupabaseConnection/Session_Pooler_Connection -=== RUN TestConfigureSupabaseConnection/Transaction_Pooler_Connection -=== RUN TestConfigureSupabaseConnection/Unknown_Connection_Type -=== RUN TestConfigureSupabaseConnection/Default_Database_For_Empty_Database_Name -=== RUN TestConfigureSupabaseConnection/Direct_Connection_With_Non-Require_SSL_Mode ---- PASS: TestConfigureSupabaseConnection (0.00s) - --- PASS: TestConfigureSupabaseConnection/Direct_Connection (0.00s) - --- PASS: TestConfigureSupabaseConnection/Session_Pooler_Connection (0.00s) - --- PASS: TestConfigureSupabaseConnection/Transaction_Pooler_Connection (0.00s) - --- PASS: TestConfigureSupabaseConnection/Unknown_Connection_Type (0.00s) - --- PASS: TestConfigureSupabaseConnection/Default_Database_For_Empty_Database_Name (0.00s) - --- PASS: TestConfigureSupabaseConnection/Direct_Connection_With_Non-Require_SSL_Mode (0.00s) -=== RUN TestExtractProjectRefFromConnStr -=== RUN TestExtractProjectRefFromConnStr/Valid_Supabase_Connection_String -=== RUN TestExtractProjectRefFromConnStr/Valid_Connection_String_With_Extra_Parts -=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_No_@_Symbol -=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_No_db._Prefix -=== RUN TestExtractProjectRefFromConnStr/Invalid_Format_-_Not_Supabase_Domain ---- PASS: TestExtractProjectRefFromConnStr (0.00s) - --- PASS: TestExtractProjectRefFromConnStr/Valid_Supabase_Connection_String (0.00s) - --- PASS: TestExtractProjectRefFromConnStr/Valid_Connection_String_With_Extra_Parts (0.00s) - --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_No_@_Symbol (0.00s) - --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_No_db._Prefix (0.00s) - --- PASS: TestExtractProjectRefFromConnStr/Invalid_Format_-_Not_Supabase_Domain (0.00s) -=== RUN TestNewSupabaseSQL -=== RUN TestNewSupabaseSQL/Valid_Supabase_Config -retrying SQL database connection -could not connect 'testuser' user to 'testdb' database at 'localhost:26257', error: dial tcp [::1]:26257: connectex: No connection could be made because the target machine actively refused it. -could not connect 'postgres' user to 'postgres' database at 'db.abc123.supabase.co:5432', error: dial tcp: lookup db.abc123.supabase.co: no such host -=== RUN TestNewSupabaseSQL/Non-Supabase_Dialect -=== RUN TestNewSupabaseSQL/Empty_DB_HOST_with_automatic_configuration -could not connect 'postgres' user to 'postgres' database at 'db.abc123.supabase.co:5432', error: dial tcp: lookup db.abc123.supabase.co: no such host ---- PASS: TestNewSupabaseSQL (0.03s) - --- PASS: TestNewSupabaseSQL/Valid_Supabase_Config (0.03s) - --- PASS: TestNewSupabaseSQL/Non-Supabase_Dialect (0.00s) - --- PASS: TestNewSupabaseSQL/Empty_DB_HOST_with_automatic_configuration (0.00s) -=== RUN TestIsSupabaseDialect ---- PASS: TestIsSupabaseDialect (0.00s) -=== RUN TestSupabaseWithConnectionString ---- PASS: TestSupabaseWithConnectionString (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/datasource/sql 3.263s -=== RUN TestFile ---- PASS: TestFile (0.00s) -=== RUN TestNewZip ---- PASS: TestNewZip (0.00s) -=== RUN TestNewZipError ---- PASS: TestNewZipError (0.00s) -=== RUN TestCreateLocalCopies_Success ---- PASS: TestCreateLocalCopies_Success (0.00s) -=== RUN TestCopyToBuffer -=== RUN TestCopyToBuffer/WithinSizeLimit -=== RUN TestCopyToBuffer/ExceedsMaxSize -=== RUN TestCopyToBuffer/CopyError ---- PASS: TestCopyToBuffer (0.00s) - --- PASS: TestCopyToBuffer/WithinSizeLimit (0.00s) - --- PASS: TestCopyToBuffer/ExceedsMaxSize (0.00s) - --- PASS: TestCopyToBuffer/CopyError (0.00s) -=== RUN TestCreateLocalCopies_WithDirectory ---- PASS: TestCreateLocalCopies_WithDirectory (0.00s) -=== RUN TestCreateLocalCopies_Failure ---- PASS: TestCreateLocalCopies_Failure (0.00s) -PASS -ok gofr.dev/pkg/gofr/file (cached) -=== RUN TestRPCLog_String ---- PASS: TestRPCLog_String (0.00s) -=== RUN Test_colorForGRPCCode ---- PASS: Test_colorForGRPCCode (0.00s) -=== RUN TestRPCLog_PrettyPrint ---- PASS: TestRPCLog_PrettyPrint (0.00s) -PASS -ok gofr.dev/pkg/gofr/grpc (cached) -=== RUN TestErrorEntityNotFound ---- PASS: TestErrorEntityNotFound (0.00s) -=== RUN TestErrorEntityNotFound_StatusCode ---- PASS: TestErrorEntityNotFound_StatusCode (0.00s) -=== RUN TestErrorEntityAlreadyExist ---- PASS: TestErrorEntityAlreadyExist (0.00s) -=== RUN TestErrorEntityAlreadyExist_StatusCode ---- PASS: TestErrorEntityAlreadyExist_StatusCode (0.00s) -=== RUN TestErrorInvalidParam ---- PASS: TestErrorInvalidParam (0.00s) -=== RUN TestInvalidParameter_StatusCode ---- PASS: TestInvalidParameter_StatusCode (0.00s) -=== RUN TestErrorMissingParam ---- PASS: TestErrorMissingParam (0.00s) -=== RUN TestMissingParameter_StatusCode ---- PASS: TestMissingParameter_StatusCode (0.00s) -=== RUN TestErrorInvalidRoute ---- PASS: TestErrorInvalidRoute (0.00s) -=== RUN Test_ErrorRequestTimeout ---- PASS: Test_ErrorRequestTimeout (0.00s) -=== RUN Test_ErrorErrorPanicRecovery ---- PASS: Test_ErrorErrorPanicRecovery (0.00s) -=== RUN Test_ServiceUnavailable ---- PASS: Test_ServiceUnavailable (0.00s) -=== RUN Test_setFieldValueFromData -=== RUN Test_setFieldValueFromData/String_Field -=== RUN Test_setFieldValueFromData/Int_Field -=== RUN Test_setFieldValueFromData/Float_Field -=== RUN Test_setFieldValueFromData/Bool_Field -=== RUN Test_setFieldValueFromData/Unsupported_Kind ---- PASS: Test_setFieldValueFromData (0.00s) - --- PASS: Test_setFieldValueFromData/String_Field (0.00s) - --- PASS: Test_setFieldValueFromData/Int_Field (0.00s) - --- PASS: Test_setFieldValueFromData/Float_Field (0.00s) - --- PASS: Test_setFieldValueFromData/Bool_Field (0.00s) - --- PASS: Test_setFieldValueFromData/Unsupported_Kind (0.00s) -=== RUN TestGetFieldName -=== RUN TestGetFieldName/Field_with_form_tag -=== RUN TestGetFieldName/Field_with_file_tag -=== RUN TestGetFieldName/Field_with_exported_name -=== RUN TestGetFieldName/Unexported_field_with_tag -=== RUN TestGetFieldName/Field_with_omitted_tag ---- PASS: TestGetFieldName (0.00s) - --- PASS: TestGetFieldName/Field_with_form_tag (0.00s) - --- PASS: TestGetFieldName/Field_with_file_tag (0.00s) - --- PASS: TestGetFieldName/Field_with_exported_name (0.00s) - --- PASS: TestGetFieldName/Unexported_field_with_tag (0.00s) - --- PASS: TestGetFieldName/Field_with_omitted_tag (0.00s) -=== RUN Test_SetFieldValue_Success ---- PASS: Test_SetFieldValue_Success (0.00s) -=== RUN TestSetFieldValue_InvalidKinds ---- PASS: TestSetFieldValue_InvalidKinds (0.00s) -=== RUN TestSetSliceOrArrayValue ---- PASS: TestSetSliceOrArrayValue (0.00s) -=== RUN TestSetStructValue_Success -=== RUN TestSetStructValue_Success/Valid_input_with_correct_case -=== RUN TestSetStructValue_Success/Valid_input_with_case_insensitive_fields -=== RUN TestSetStructValue_Success/Mixed_Case_and_invalid_field_names -=== RUN TestSetStructValue_Success/Case-insensitive_field_name_but_not_in_dataMap ---- PASS: TestSetStructValue_Success (0.00s) - --- PASS: TestSetStructValue_Success/Valid_input_with_correct_case (0.00s) - --- PASS: TestSetStructValue_Success/Valid_input_with_case_insensitive_fields (0.00s) - --- PASS: TestSetStructValue_Success/Mixed_Case_and_invalid_field_names (0.00s) - --- PASS: TestSetStructValue_Success/Case-insensitive_field_name_but_not_in_dataMap (0.00s) -=== RUN TestSetStructValue_Errors -=== RUN TestSetStructValue_Errors/Unexported_field -=== RUN TestSetStructValue_Errors/Unsupported_field_type -=== RUN TestSetStructValue_Errors/Invalid_JSON -=== RUN TestSetStructValue_Errors/Field_not_settable ---- PASS: TestSetStructValue_Errors (0.00s) - --- PASS: TestSetStructValue_Errors/Unexported_field (0.00s) - --- PASS: TestSetStructValue_Errors/Unsupported_field_type (0.00s) - --- PASS: TestSetStructValue_Errors/Invalid_JSON (0.00s) - --- PASS: TestSetStructValue_Errors/Field_not_settable (0.00s) -=== RUN TestParam ---- PASS: TestParam (0.00s) -=== RUN TestBind ---- PASS: TestBind (0.00s) -=== RUN TestBind_FileSuccess ---- PASS: TestBind_FileSuccess (0.00s) -=== RUN TestBind_NoContentType ---- PASS: TestBind_NoContentType (0.00s) -=== RUN Test_GetContext ---- PASS: Test_GetContext (0.00s) -=== RUN Test_bindMultipart_Fails ---- PASS: Test_bindMultipart_Fails (0.00s) -=== RUN Test_bindMultipart_Fail_ParseMultiPart ---- PASS: Test_bindMultipart_Fail_ParseMultiPart (0.00s) -=== RUN Test_Params ---- PASS: Test_Params (0.00s) -=== RUN TestBind_FormURLEncoded ---- PASS: TestBind_FormURLEncoded (0.00s) -=== RUN TestBind_BinaryOctetStream -=== RUN TestBind_BinaryOctetStream/Raw_Binary_Data -=== RUN TestBind_BinaryOctetStream/Text-Based_Binary_Data ---- PASS: TestBind_BinaryOctetStream (0.00s) - --- PASS: TestBind_BinaryOctetStream/Raw_Binary_Data (0.00s) - --- PASS: TestBind_BinaryOctetStream/Text-Based_Binary_Data (0.00s) -=== RUN TestBind_BinaryOctetStream_NotPointerToByteSlice ---- PASS: TestBind_BinaryOctetStream_NotPointerToByteSlice (0.00s) -=== RUN TestResponder ---- PASS: TestResponder (0.00s) -=== RUN TestResponder_getStatusCode ---- PASS: TestResponder_getStatusCode (0.00s) -=== RUN TestRespondWithApplicationJSON ---- PASS: TestRespondWithApplicationJSON (0.00s) -=== RUN TestIsNil ---- PASS: TestIsNil (0.00s) -=== RUN TestResponder_TemplateResponse ---- PASS: TestResponder_TemplateResponse (0.07s) -=== RUN TestResponder_CustomErrorWithResponse ---- PASS: TestResponder_CustomErrorWithResponse (0.00s) -=== RUN TestResponder_ReservedMessageField ---- PASS: TestResponder_ReservedMessageField (0.00s) -=== RUN TestResponder_EmptyErrorStruct ---- PASS: TestResponder_EmptyErrorStruct (0.00s) -=== RUN TestIsEmptyStruct ---- PASS: TestIsEmptyStruct (0.00s) -=== RUN TestResponder_RedirectResponse_Post ---- PASS: TestResponder_RedirectResponse_Post (0.00s) -=== RUN TestResponder_RedirectResponse_Head ---- PASS: TestResponder_RedirectResponse_Head (0.00s) -=== RUN TestRouter ---- PASS: TestRouter (0.03s) -=== RUN TestRouterWithMiddleware ---- PASS: TestRouterWithMiddleware (0.00s) -=== RUN Test_StaticFileServing_Static -=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/static -registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt -=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/ -registered static files at endpoint / from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt -=== RUN Test_StaticFileServing_Static/Serve_existing_file_from_/public -registered static files at endpoint /public/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\test.txt -=== RUN Test_StaticFileServing_Static/Serve_404.html_for_non-existent_file -registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -requested file not found: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\nonexistent.html -serving custom 404 page: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\404.html -=== RUN Test_StaticFileServing_Static/Serve_default_404_message_when_404.html_is_missing -registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -requested file not found: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\nonexistent.html -=== RUN Test_StaticFileServing_Static/Access_forbidden_OpenAPI_JSON -registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -unauthorized attempt to access restricted file: openapi.json -=== RUN Test_StaticFileServing_Static/Serving_File_with_no_Read_permission -registered static files at endpoint /static/ from directory C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001 -serving file: C:\Users\user\AppData\Local\Temp\Test_StaticFileServing_Static3428223113\001\restricted.txt - router_test.go:192: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/router_test.go:192 - Error: Not equal: - expected: 500 - actual : 200 - Test: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission - router_test.go:193: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/router_test.go:193 - Error: Not equal: - expected: "500 Internal Server Error" - actual : "Restricted content" - - Diff: - --- Expected - +++ Actual - @@ -1 +1 @@ - -500 Internal Server Error - +Restricted content - Test: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission ---- FAIL: Test_StaticFileServing_Static (0.24s) - --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/static (0.20s) - --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/ (0.01s) - --- PASS: Test_StaticFileServing_Static/Serve_existing_file_from_/public (0.01s) - --- PASS: Test_StaticFileServing_Static/Serve_404.html_for_non-existent_file (0.01s) - --- PASS: Test_StaticFileServing_Static/Serve_default_404_message_when_404.html_is_missing (0.00s) - --- PASS: Test_StaticFileServing_Static/Access_forbidden_OpenAPI_JSON (0.00s) - --- FAIL: Test_StaticFileServing_Static/Serving_File_with_no_Read_permission (0.01s) -FAIL -FAIL gofr.dev/pkg/gofr/http 0.905s -=== RUN Test_NewAPIKeyAuthProvider -=== RUN Test_NewAPIKeyAuthProvider/0 -=== RUN Test_NewAPIKeyAuthProvider/1 -=== RUN Test_NewAPIKeyAuthProvider/2 ---- PASS: Test_NewAPIKeyAuthProvider (0.00s) - --- PASS: Test_NewAPIKeyAuthProvider/0 (0.00s) - --- PASS: Test_NewAPIKeyAuthProvider/1 (0.00s) - --- PASS: Test_NewAPIKeyAuthProvider/2 (0.00s) -=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc -=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/0 -=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/1 -=== RUN Test_NewAPIKeyAuthProviderWithValidateFunc/2 ---- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc (0.00s) - --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/0 (0.00s) - --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/1 (0.00s) - --- PASS: Test_NewAPIKeyAuthProviderWithValidateFunc/2 (0.00s) -=== RUN Test_extractAuthHeader -=== RUN Test_extractAuthHeader/0 -=== RUN Test_extractAuthHeader/1 -=== RUN Test_extractAuthHeader/2 ---- PASS: Test_extractAuthHeader (0.00s) - --- PASS: Test_extractAuthHeader/0 (0.00s) - --- PASS: Test_extractAuthHeader/1 (0.00s) - --- PASS: Test_extractAuthHeader/2 (0.00s) -=== RUN Test_authMethod ---- PASS: Test_authMethod (0.00s) -=== RUN Test_validateAPIKey -=== RUN Test_validateAPIKey/0 -=== RUN Test_validateAPIKey/1 -=== RUN Test_validateAPIKey/2 -=== RUN Test_validateAPIKey/3 -=== RUN Test_validateAPIKey/4 -=== RUN Test_validateAPIKey/5 -=== RUN Test_validateAPIKey/6 -=== RUN Test_validateAPIKey/7 -=== RUN Test_validateAPIKey/8 -=== RUN Test_validateAPIKey/9 -=== RUN Test_validateAPIKey/10 -=== RUN Test_validateAPIKey/11 -=== RUN Test_validateAPIKey/12 -=== RUN Test_validateAPIKey/13 -=== RUN Test_validateAPIKey/14 -=== RUN Test_validateAPIKey/15 -=== RUN Test_validateAPIKey/16 -=== RUN Test_validateAPIKey/17 -=== RUN Test_validateAPIKey/18 ---- PASS: Test_validateAPIKey (0.00s) - --- PASS: Test_validateAPIKey/0 (0.00s) - --- PASS: Test_validateAPIKey/1 (0.00s) - --- PASS: Test_validateAPIKey/2 (0.00s) - --- PASS: Test_validateAPIKey/3 (0.00s) - --- PASS: Test_validateAPIKey/4 (0.00s) - --- PASS: Test_validateAPIKey/5 (0.00s) - --- PASS: Test_validateAPIKey/6 (0.00s) - --- PASS: Test_validateAPIKey/7 (0.00s) - --- PASS: Test_validateAPIKey/8 (0.00s) - --- PASS: Test_validateAPIKey/9 (0.00s) - --- PASS: Test_validateAPIKey/10 (0.00s) - --- PASS: Test_validateAPIKey/11 (0.00s) - --- PASS: Test_validateAPIKey/12 (0.00s) - --- PASS: Test_validateAPIKey/13 (0.00s) - --- PASS: Test_validateAPIKey/14 (0.00s) - --- PASS: Test_validateAPIKey/15 (0.00s) - --- PASS: Test_validateAPIKey/16 (0.00s) - --- PASS: Test_validateAPIKey/17 (0.00s) - --- PASS: Test_validateAPIKey/18 (0.00s) -=== RUN Test_APIKeyAuthMiddleware - apikey_auth_test.go:176: Test_APIKeyAuthMiddleware ---- PASS: Test_APIKeyAuthMiddleware (0.00s) -=== RUN TestAuthMiddleware -=== RUN TestAuthMiddleware/0 -=== RUN TestAuthMiddleware/1 -=== RUN TestAuthMiddleware/2 -=== RUN TestAuthMiddleware/3 ---- PASS: TestAuthMiddleware (0.00s) - --- PASS: TestAuthMiddleware/0 (0.00s) - --- PASS: TestAuthMiddleware/1 (0.00s) - --- PASS: TestAuthMiddleware/2 (0.00s) - --- PASS: TestAuthMiddleware/3 (0.00s) -=== RUN Test_getAuthHeaderValue -=== RUN Test_getAuthHeaderValue/0 -=== RUN Test_getAuthHeaderValue/1 -=== RUN Test_getAuthHeaderValue/2 -=== RUN Test_getAuthHeaderValue/3 -=== RUN Test_getAuthHeaderValue/4 -=== RUN Test_getAuthHeaderValue/5 -=== RUN Test_getAuthHeaderValue/6 -=== RUN Test_getAuthHeaderValue/7 -=== RUN Test_getAuthHeaderValue/8 ---- PASS: Test_getAuthHeaderValue (0.00s) - --- PASS: Test_getAuthHeaderValue/0 (0.00s) - --- PASS: Test_getAuthHeaderValue/1 (0.00s) - --- PASS: Test_getAuthHeaderValue/2 (0.00s) - --- PASS: Test_getAuthHeaderValue/3 (0.00s) - --- PASS: Test_getAuthHeaderValue/4 (0.00s) - --- PASS: Test_getAuthHeaderValue/5 (0.00s) - --- PASS: Test_getAuthHeaderValue/6 (0.00s) - --- PASS: Test_getAuthHeaderValue/7 (0.00s) - --- PASS: Test_getAuthHeaderValue/8 (0.00s) -=== RUN TestNewBasicAuthProvider ---- PASS: TestNewBasicAuthProvider (0.00s) -=== RUN TestNewBasicAuthProviderWithValidateFunc -=== RUN TestNewBasicAuthProviderWithValidateFunc/0 -=== RUN TestNewBasicAuthProviderWithValidateFunc/1 -=== RUN TestNewBasicAuthProviderWithValidateFunc/2 ---- PASS: TestNewBasicAuthProviderWithValidateFunc (0.00s) - --- PASS: TestNewBasicAuthProviderWithValidateFunc/0 (0.00s) - --- PASS: TestNewBasicAuthProviderWithValidateFunc/1 (0.00s) - --- PASS: TestNewBasicAuthProviderWithValidateFunc/2 (0.00s) -=== RUN TestBasicAuthMiddleware_extractAuthHeader -=== RUN TestBasicAuthMiddleware_extractAuthHeader/0 - basic_auth_test.go:89: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/basic_auth_test.go:89 - Error: Not equal: - expected: string("") - actual : () - Test: TestBasicAuthMiddleware_extractAuthHeader/0 -=== RUN TestBasicAuthMiddleware_extractAuthHeader/1 -=== RUN TestBasicAuthMiddleware_extractAuthHeader/2 ---- FAIL: TestBasicAuthMiddleware_extractAuthHeader (0.00s) - --- FAIL: TestBasicAuthMiddleware_extractAuthHeader/0 (0.00s) - --- PASS: TestBasicAuthMiddleware_extractAuthHeader/1 (0.00s) - --- PASS: TestBasicAuthMiddleware_extractAuthHeader/2 (0.00s) -=== RUN TestBasicAuthProvider_getAuthMethod ---- PASS: TestBasicAuthProvider_getAuthMethod (0.00s) -=== RUN TestParseBasicAuth -=== RUN TestParseBasicAuth/Valid_Basic_Auth -=== RUN TestParseBasicAuth/Invalid_Encoding -=== RUN TestParseBasicAuth/Missing_Colon_Separator -=== RUN TestParseBasicAuth/Empty_Authorization_Header ---- PASS: TestParseBasicAuth (0.00s) - --- PASS: TestParseBasicAuth/Valid_Basic_Auth (0.00s) - --- PASS: TestParseBasicAuth/Invalid_Encoding (0.00s) - --- PASS: TestParseBasicAuth/Missing_Colon_Separator (0.00s) - --- PASS: TestParseBasicAuth/Empty_Authorization_Header (0.00s) -=== RUN TestBasicAuthMiddleware_validateCredentials -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#0 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#1 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#2 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#3 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#4 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#5 -=== RUN TestBasicAuthMiddleware_validateCredentials/Test_Case_#6 ---- PASS: TestBasicAuthMiddleware_validateCredentials (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#0 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#1 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#2 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#3 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#4 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#5 (0.00s) - --- PASS: TestBasicAuthMiddleware_validateCredentials/Test_Case_#6 (0.00s) -=== RUN TestGetConfigs ---- PASS: TestGetConfigs (0.00s) -=== RUN TestLogDisableProbesConfig ---- PASS: TestLogDisableProbesConfig (0.00s) -=== RUN Test_CORS ---- PASS: Test_CORS (0.00s) -=== RUN TestSetMiddlewareHeaders ---- PASS: TestSetMiddlewareHeaders (0.00s) -=== RUN TestHTTPError -=== RUN TestHTTPError/Test_Case_#0 -=== RUN TestHTTPError/Test_Case_#1 - errors_test.go:47: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/errors_test.go:47 - Error: Not equal: - expected: "invalid auth header, required errMessage `Bearer {value}` in key 'Authorization'" - actual : "invalid value in 'Authorization' header - Bearer {value}" - - Diff: - --- Expected - +++ Actual - @@ -1 +1 @@ - -invalid auth header, required errMessage `Bearer {value}` in key 'Authorization' - +invalid value in 'Authorization' header - Bearer {value} - Test: TestHTTPError/Test_Case_#1 -=== RUN TestHTTPError/Test_Case_#2 -=== RUN TestHTTPError/Test_Case_#3 -=== RUN TestHTTPError/Test_Case_#4 ---- FAIL: TestHTTPError (0.00s) - --- PASS: TestHTTPError/Test_Case_#0 (0.00s) - --- FAIL: TestHTTPError/Test_Case_#1 (0.00s) - --- PASS: TestHTTPError/Test_Case_#2 (0.00s) - --- PASS: TestHTTPError/Test_Case_#3 (0.00s) - --- PASS: TestHTTPError/Test_Case_#4 (0.00s) -=== RUN Test_getIPAddress ---- PASS: Test_getIPAddress (0.00s) -=== RUN Test_LoggingMiddleware ---- PASS: Test_LoggingMiddleware (0.00s) -=== RUN Test_LoggingMiddlewareProbesEnable ---- PASS: Test_LoggingMiddlewareProbesEnable (0.00s) -=== RUN Test_LoggingMiddlewareProbesDisable ---- PASS: Test_LoggingMiddlewareProbesDisable (0.00s) -=== RUN Test_LoggingMiddlewareError ---- PASS: Test_LoggingMiddlewareError (0.00s) -=== RUN Test_LoggingMiddlewareStringPanicHandling -&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} ---- PASS: Test_LoggingMiddlewareStringPanicHandling (0.00s) -=== RUN Test_LoggingMiddlewareErrorPanicHandling -&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} ---- PASS: Test_LoggingMiddlewareErrorPanicHandling (0.00s) -=== RUN Test_LoggingMiddlewareUnknownPanicHandling -&{00000000000000000000000000000000 0000000000000000 2025-08-22T00:07:36.4248301+05:30 0 GET 0} ---- PASS: Test_LoggingMiddlewareUnknownPanicHandling (0.00s) -=== RUN TestRequestLog_PrettyPrint ---- PASS: TestRequestLog_PrettyPrint (0.00s) -=== RUN Test_ColorForStatusCode ---- PASS: Test_ColorForStatusCode (0.00s) -=== RUN Test_StatusResponseWriter_WriteHeader -=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_200 -=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_404 -=== RUN Test_StatusResponseWriter_WriteHeader/WriteHeader_500 ---- PASS: Test_StatusResponseWriter_WriteHeader (0.00s) - --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_200 (0.00s) - --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_404 (0.00s) - --- PASS: Test_StatusResponseWriter_WriteHeader/WriteHeader_500 (0.00s) -=== RUN Test_StatusResponseWriter_WriteHeader_DuplicateCalls ---- PASS: Test_StatusResponseWriter_WriteHeader_DuplicateCalls (0.00s) -=== RUN Test_StatusResponseWriter_Hijack_Supported ---- PASS: Test_StatusResponseWriter_Hijack_Supported (0.00s) -=== RUN Test_StatusResponseWriter_Hijack_NotSupported ---- PASS: Test_StatusResponseWriter_Hijack_NotSupported (0.00s) -=== RUN TestMetrics ---- PASS: TestMetrics (0.00s) -=== RUN TestMetrics_StaticFile ---- PASS: TestMetrics_StaticFile (0.15s) -=== RUN TestMetrics_StaticFileWithQueryParam ---- PASS: TestMetrics_StaticFileWithQueryParam (0.01s) -=== RUN TestOAuthProvider_extractAuthHeader -=== RUN TestOAuthProvider_extractAuthHeader/0 -=== RUN TestOAuthProvider_extractAuthHeader/1 -=== RUN TestOAuthProvider_extractAuthHeader/2 -=== RUN TestOAuthProvider_extractAuthHeader/3 -=== RUN TestOAuthProvider_extractAuthHeader/4 -=== RUN TestOAuthProvider_extractAuthHeader/5 -=== RUN TestOAuthProvider_extractAuthHeader/6 ---- PASS: TestOAuthProvider_extractAuthHeader (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/0 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/1 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/2 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/3 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/4 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/5 (0.00s) - --- PASS: TestOAuthProvider_extractAuthHeader/6 (0.00s) -=== RUN Test_NewOAuthProvider -=== RUN Test_NewOAuthProvider/0 - oauth_test.go:112: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth_test.go:112 - Error: Not equal: - expected: &errors.errorString{s:"require non-empty provider"} - actual : &errors.errorString{s:"invalid interval, require a value greater than 1 second"} - - Diff: - --- Expected - +++ Actual - @@ -1,3 +1,3 @@ - (*errors.errorString)({ - - s: (string) (len=26) "require non-empty provider" - + s: (string) (len=55) "invalid interval, require a value greater than 1 second" - }) - Test: Test_NewOAuthProvider/0 -=== RUN Test_NewOAuthProvider/1 - oauth_test.go:112: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth_test.go:112 - Error: Not equal: - expected: *errors.errorString(&errors.errorString{s:"require non-empty provider"}) - actual : () - Test: Test_NewOAuthProvider/1 -=== RUN Test_NewOAuthProvider/2 -=== RUN Test_NewOAuthProvider/3 -=== RUN Test_NewOAuthProvider/4 -=== RUN Test_NewOAuthProvider/5 ---- FAIL: Test_NewOAuthProvider (0.00s) - --- FAIL: Test_NewOAuthProvider/0 (0.00s) - --- FAIL: Test_NewOAuthProvider/1 (0.00s) - --- PASS: Test_NewOAuthProvider/2 (0.00s) - --- PASS: Test_NewOAuthProvider/3 (0.00s) - --- PASS: Test_NewOAuthProvider/4 (0.00s) - --- PASS: Test_NewOAuthProvider/5 (0.00s) -=== RUN TestOAuthProvider_getAuthMethod -panic: runtime error: invalid memory address or nil pointer dereference -[signal 0xc0000005 code=0x0 addr=0x18 pc=0x1850cf8] - -goroutine 163 [running]: -gofr.dev/pkg/gofr/http/middleware.getPublicKeys({0x1e3fe98, 0x2a27620}, {0x0, 0x0}, {0x0, 0x0}) - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:106 +0x58 -gofr.dev/pkg/gofr/http/middleware.(*PublicKeys).updateKeys(0xc00034bf40, {{0x0, 0x0}, 0x2540be400, {0x0, 0x0}}) - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:87 +0x4d -gofr.dev/pkg/gofr/http/middleware.NewOAuth.func1() - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:72 +0x4a -created by gofr.dev/pkg/gofr/http/middleware.NewOAuth in goroutine 162 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/http/middleware/oauth.go:71 +0xb3 -FAIL gofr.dev/pkg/gofr/http/middleware 0.689s -? gofr.dev/pkg/gofr/http/response [no test files] -=== RUN TestNewContextLogger ---- PASS: TestNewContextLogger (0.00s) -=== RUN TestContextLogger_WithTraceInfo_NoTraceID ---- PASS: TestContextLogger_WithTraceInfo_NoTraceID (0.00s) -=== RUN TestContextLogger_WithTraceInfo_WithTraceID ---- PASS: TestContextLogger_WithTraceInfo_WithTraceID (0.00s) -=== RUN TestContextLogger_LoggingMethods_NoTrace ---- PASS: TestContextLogger_LoggingMethods_NoTrace (0.00s) -=== RUN TestContextLogger_LoggingMethods_WithTrace ---- PASS: TestContextLogger_LoggingMethods_WithTrace (0.00s) -=== RUN TestContextLogger_Integration ---- PASS: TestContextLogger_Integration (0.00s) -=== RUN TestContextLogger_ChangeLevel ---- PASS: TestContextLogger_ChangeLevel (0.00s) -=== RUN TestLevelString ---- PASS: TestLevelString (0.00s) -=== RUN TestLevelColor ---- PASS: TestLevelColor (0.00s) -=== RUN TestGetLevelFromString ---- PASS: TestGetLevelFromString (0.00s) -=== RUN Test_changeLevel ---- PASS: Test_changeLevel (0.00s) -=== RUN TestLogger_LevelInfo -{"level":"ERROR","time":"2025-08-22T00:04:28.733986+05:30","message":"Test Error Log","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:04:28.733986+05:30","message":"Test Info Log","gofrVersion":"dev"} ---- PASS: TestLogger_LevelInfo (0.00s) -=== RUN TestLogger_LevelError -{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} ---- PASS: TestLogger_LevelError (0.00s) -=== RUN TestLogger_LevelDebug -{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Log","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Debug Log","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Info Log","gofrVersion":"dev"} ---- PASS: TestLogger_LevelDebug (0.00s) -=== RUN TestLogger_LevelNotice -{"level":"ERROR","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Error Log","gofrVersion":"dev"} -{"level":"NOTICE","time":"2025-08-22T00:04:28.7345039+05:30","message":"Test Notice Log","gofrVersion":"dev"} ---- PASS: TestLogger_LevelNotice (0.00s) -=== RUN TestLogger_LevelWarn -{"level":"ERROR","time":"2025-08-22T00:04:28.7350302+05:30","message":"Test Error Log","gofrVersion":"dev"} -{"level":"WARN","time":"2025-08-22T00:04:28.7350302+05:30","message":"Test Warn Log","gofrVersion":"dev"} ---- PASS: TestLogger_LevelWarn (0.00s) -=== RUN TestLogger_LevelFatal ---- PASS: TestLogger_LevelFatal (1.00s) -=== RUN TestCheckIfTerminal ---- PASS: TestCheckIfTerminal (0.00s) -=== RUN Test_NewSilentLoggerSTDOutput ---- PASS: Test_NewSilentLoggerSTDOutput (0.00s) -=== RUN TestPrettyPrint ---- PASS: TestPrettyPrint (0.00s) -=== RUN TestNewFileLogger_UnwritablePath ---- PASS: TestNewFileLogger_UnwritablePath (0.00s) -=== RUN TestNewFileLogger_NilPath ---- PASS: TestNewFileLogger_NilPath (0.00s) -=== RUN Test_NewMockLogger ---- PASS: Test_NewMockLogger (0.00s) -=== RUN Test_NewMockLoggerErrorLogs ---- PASS: Test_NewMockLoggerErrorLogs (0.00s) -PASS -ok gofr.dev/pkg/gofr/logging (cached) -=== RUN TestRemoteLogger_UpdateLevel -&{2025-08-22 00:04:31.0195487 +0530 IST m=+0.108655601 3780 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} -LOG_LEVEL updated from INFO to DEBUG ---- PASS: TestRemoteLogger_UpdateLevel (0.20s) -=== RUN TestRemoteLogger_UpdateLevelError -&{0xc0002121e0 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.1191373 +0530 IST m=+0.208244201 665 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} -&{0xc000108b40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108c60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108d80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108ea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108fc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001090e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109200 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001097a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001098c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001099e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001983c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001984e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198600 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198720 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198840 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198960 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198a80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198ba0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198cc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109b00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198de0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000198f00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199020 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199140 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199260 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199380 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109c20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001993e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001997a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001998c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001999e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199b00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000109f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001580c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199c20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199d40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001581e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000199e60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0000 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0120 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0240 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0360 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001588a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001589c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000158f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d05a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d06c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d07e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0900 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0a20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0b40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0c60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0d80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0ea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d0fc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d10e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1200 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d17a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d18c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d19e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1b00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1c20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1d40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001d1e60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea000 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea120 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea240 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea360 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea5a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea6c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea7e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ea900 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eaa20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eab40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eac60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ead80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eaea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eafc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb0e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb200 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb7a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb8c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001591a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001eb9e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ebb00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ebc20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ebd40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001ebe60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c000 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c120 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c240 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c360 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c5a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c6c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c7e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028c900 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028ca20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001592c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028cb40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028cc60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028cd80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028cea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028cfc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d0e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d200 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001593e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000159aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d7a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d8c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028d9e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028db00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028dc20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028dd40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00028de60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa000 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa120 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa240 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa360 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa5a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa6c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa7e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aa900 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aaa20 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.2186777 +0530 IST m=+0.307784601 558 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} -&{0xc0002aaba0 Get "invalid%20url": unsupported protocol scheme ""} ---- PASS: TestRemoteLogger_UpdateLevelError (0.10s) -=== RUN Test_fetchAndUpdateLogLevel_InvalidResponse -&{0xc000080600 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aacc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002aade0 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.2198102 +0530 IST m=+0.308917101 1175 00000000000000000000000000000000 200 GET http://127.0.0.1:59991} -&{0xc00017a540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212540 Get "invalid%20url": unsupported protocol scheme ""} ---- PASS: Test_fetchAndUpdateLogLevel_InvalidResponse (0.00s) -=== RUN Test_fetchAndUpdateLogLevel_InvalidLogLevel -&{0xc000212660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a660 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.2228187 +0530 IST m=+0.311925601 1670 00000000000000000000000000000000 200 GET http://127.0.0.1:59993} -&{0xc0002aaf00 Get "invalid%20url": unsupported protocol scheme ""} ---- PASS: Test_fetchAndUpdateLogLevel_InvalidLogLevel (0.00s) -=== RUN TestDynamicLoggerSuccess -&{0xc0002ab080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab1a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab2c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab3e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ab980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002abaa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002abbc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002abce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002abe00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002abf20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d60c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d61e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000212f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d68a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002131a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002132c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002133e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d69c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d6f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d71a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d72c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d73e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7bc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7ce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002d7f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee8a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ee9c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eeae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213bc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213ce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eec00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eed20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000213f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003820c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003821e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003828a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003829c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eee40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eef60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef1a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef2c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef3e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002ef980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002efaa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000382f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002efbc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002efce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002efe00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0002eff20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e8a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040e9c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040eae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003831a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003832c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0003833e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040ec00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040ed20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040ee40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040ef60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f1a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f2c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f3e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040f980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040faa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040fbc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040fce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040fe00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00040ff20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00042c660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383da0 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.3186855 +0530 IST m=+0.407792401 2048 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} -&{0xc00017a8a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a9c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017aae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ac00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ad20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ae40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017af60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00050c0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00050c1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000080cc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000383ec0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000080e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000080f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0000811a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0000812c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0000813e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081bc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081ce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000081f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004900c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004901e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004908a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004909c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000490f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004911a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004912c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004913e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491bc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491ce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000491f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b00c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b01e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b08a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b09c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0ae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0c00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0d20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0e40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b0f60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b11a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b12c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b13e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1aa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1bc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1ce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1e00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004b1f20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc8a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cc9c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ccae0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ccc00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ccd20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cce40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ccf60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd080 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd1a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd2c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd3e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd500 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd620 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd740 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cd980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cdaa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cdbc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cdce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cde00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004cdf20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea0c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea420 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea540 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea660 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea780 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea8a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0004ea9c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b680 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b7a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00050c5a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a000 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a120 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00039e1e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00039e300 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a240 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a5a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a6c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a7e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017a900 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017aa20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ab40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ac60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017ad80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017aea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017afc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b0e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b200 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b320 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b440 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b560 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b860 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017b980 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017baa0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017bbc0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017bce0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00017be00 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00050c720 Get "invalid%20url": unsupported protocol scheme ""} -&{2025-08-22 00:04:31.4186529 +0530 IST m=+0.507759801 616 00000000000000000000000000000000 200 GET http://127.0.0.1:59989} -&{0xc0001082a0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001086c0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc0001087e0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108a20 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108b40 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108c60 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108d80 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc000108ea0 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00039e480 Get "invalid%20url": unsupported protocol scheme ""} -&{0xc00039e5a0 Get "invalid%20url": unsupported protocol scheme ""} ---- PASS: TestDynamicLoggerSuccess (0.20s) -PASS -&{0xc00050cba0 Get "invalid%20url": unsupported protocol scheme ""} -ok gofr.dev/pkg/gofr/logging/remotelogger (cached) -=== RUN Test_MetricsGetHandler_MetricsNotRegistered ---- PASS: Test_MetricsGetHandler_MetricsNotRegistered (0.01s) -=== RUN Test_MetricsGetHandler_SystemMetricsRegistered - handler_test.go:73: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:73 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_go_sys{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" - Test: Test_MetricsGetHandler_SystemMetricsRegistered - handler_test.go:74: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:74 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" - Test: Test_MetricsGetHandler_SystemMetricsRegistered - handler_test.go:75: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:75 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" - Test: Test_MetricsGetHandler_SystemMetricsRegistered - handler_test.go:76: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:76 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" - Test: Test_MetricsGetHandler_SystemMetricsRegistered - handler_test.go:77: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/handler_test.go:77 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 0\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 12\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 1.650696e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 1.650696e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.449597e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 408\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 1.887136e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 1.650696e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 5.005312e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 3.088384e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4415\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 4.972544e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 8.093696e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 0\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 4823\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 4.194304e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.172579e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 294912\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 294912\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.2994808e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 8\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 136\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.34144e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.8317312e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 1\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n" does not contain "app_go_numGC{otel_scope_name=\"test-app\",otel_scope_version=\"v1.0.0\"}" - Test: Test_MetricsGetHandler_SystemMetricsRegistered ---- FAIL: Test_MetricsGetHandler_SystemMetricsRegistered (0.01s) -=== RUN Test_MetricsGetHandler_RegisteredProfilingRoutes ---- PASS: Test_MetricsGetHandler_RegisteredProfilingRoutes (0.00s) -=== RUN Test_NewMetricsManagerSuccess -Metrics app_go_routines is not registered -Metrics app_sys_memory_alloc is not registered -Metrics app_sys_total_alloc is not registered -Metrics app_go_numGC is not registered -Metrics app_go_sys is not registered - register_test.go:41: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:41 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"" - Test: Test_NewMetricsManagerSuccess - Messages: TEST Failed. service name and version not coming in metrics - register_test.go:47: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:47 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "counter_test_total{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 1" - Test: Test_NewMetricsManagerSuccess - Messages: TEST Failed. gauge-test metrics registration failed - register_test.go:52: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:52 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "gauge_test{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 50" - Test: Test_NewMetricsManagerSuccess - Messages: TEST Failed. gauge_test metrics value not set - register_test.go:55: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:55 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "p_down_counter{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\"} 10" - Test: Test_NewMetricsManagerSuccess - Messages: TEST Failed. up-down-counter metrics value did not reflect - register_test.go:64: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/metrics/register_test.go:64 - Error: "# HELP app_go_numGC Number of completed Garbage Collector cycles.\n# TYPE app_go_numGC gauge\napp_go_numGC{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 0\n# HELP app_go_routines Number of Go routines running.\n# TYPE app_go_routines gauge\napp_go_routines{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 8\n# HELP app_go_sys Number of total bytes of memory.\n# TYPE app_go_sys gauge\napp_go_sys{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.2994808e+07\n# HELP app_sys_memory_alloc Number of bytes allocated for heap objects.\n# TYPE app_sys_memory_alloc gauge\napp_sys_memory_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP app_sys_total_alloc Number of cumulative bytes allocated for heap objects.\n# TYPE app_sys_total_alloc gauge\napp_sys_total_alloc{otel_scope_name=\"test-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1.634312e+06\n# HELP counter_test_total this is metric to test counter\n# TYPE counter_test_total counter\ncounter_test_total{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP gauge_test this is metric to test gauge\n# TYPE gauge_test gauge\ngauge_test{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 50\n# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\ngo_gc_duration_seconds{quantile=\"1\"} 0\ngo_gc_duration_seconds_sum 0\ngo_gc_duration_seconds_count 1\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\ngo_gc_gogc_percent 100\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\ngo_gc_gomemlimit_bytes 9.223372036854776e+18\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines 16\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\ngo_info{version=\"go1.24.5\"} 1\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\ngo_memstats_alloc_bytes 2.843072e+06\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\ngo_memstats_alloc_bytes_total 3.875024e+06\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\ngo_memstats_buck_hash_sys_bytes 1.450133e+06\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\ngo_memstats_frees_total 4097\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\ngo_memstats_gc_sys_bytes 2.59824e+06\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\ngo_memstats_heap_alloc_bytes 2.843072e+06\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\ngo_memstats_heap_idle_bytes 3.64544e+06\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\ngo_memstats_heap_inuse_bytes 4.317184e+06\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\ngo_memstats_heap_objects 4480\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\ngo_memstats_heap_released_bytes 2.801664e+06\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\ngo_memstats_heap_sys_bytes 7.962624e+06\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\ngo_memstats_last_gc_time_seconds 1.7558014574920902e+09\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\ngo_memstats_mallocs_total 8577\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\ngo_memstats_mcache_inuse_bytes 9408\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\ngo_memstats_mcache_sys_bytes 15288\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\ngo_memstats_mspan_inuse_bytes 66080\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\ngo_memstats_mspan_sys_bytes 81600\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\ngo_memstats_next_gc_bytes 5.322138e+06\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\ngo_memstats_other_sys_bytes 1.050763e+06\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\ngo_memstats_stack_inuse_bytes 425984\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\ngo_memstats_stack_sys_bytes 425984\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\ngo_memstats_sys_bytes 1.3584632e+07\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\ngo_sched_gomaxprocs_threads 8\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\ngo_threads 9\n# HELP histogram_test this is metric to test histogram\n# TYPE histogram_test histogram\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"25\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"50\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"75\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"100\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"250\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"750\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"1000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"2500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"5000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"7500\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"10000\"} 1\nhistogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\",le=\"+Inf\"} 1\nhistogram_test_sum{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\nhistogram_test_count{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 1\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.046875\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.6777216e+07\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 151\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 1.6990208e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.755801457e+09\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 2.1082112e+07\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 2\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP up_down_counter this is metric to test up-down-counter\n# TYPE up_down_counter gauge\nup_down_counter{otel_scope_name=\"testing-app\",otel_scope_schema_url=\"\",otel_scope_version=\"v1.0.0\"} 10\n" does not contain "histogram_test_bucket{otel_scope_name=\"testing-app\",otel_scope_version=\"v1.0.0\",le=\"0\"} 0" - Test: Test_NewMetricsManagerSuccess - Messages: TEST Failed. histogram metrics value did not reflect ---- FAIL: Test_NewMetricsManagerSuccess (0.01s) -=== RUN Test_NewMetricsManagerMetricsNotRegistered ---- PASS: Test_NewMetricsManagerMetricsNotRegistered (0.00s) -=== RUN Test_NewMetricsManagerInvalidMetricsName ---- PASS: Test_NewMetricsManagerInvalidMetricsName (0.00s) -=== RUN Test_NewMetricsManagerDuplicateMetricsRegistration ---- PASS: Test_NewMetricsManagerDuplicateMetricsRegistration (0.00s) -=== RUN Test_NewMetricsManagerInvalidLabelPairErrors ---- PASS: Test_NewMetricsManagerInvalidLabelPairErrors (0.00s) -=== RUN Test_NewMetricsManagerLabelHighCardinality ---- PASS: Test_NewMetricsManagerLabelHighCardinality (0.00s) -=== RUN TestStore_SetAndGetCounter ---- PASS: TestStore_SetAndGetCounter (0.00s) -=== RUN TestStore_SetAndGetUpDownCounter ---- PASS: TestStore_SetAndGetUpDownCounter (0.00s) -=== RUN TestStore_SetAndGetHistogram ---- PASS: TestStore_SetAndGetHistogram (0.00s) -=== RUN TestStore_SetAndGetGauge ---- PASS: TestStore_SetAndGetGauge (0.00s) -=== RUN TestStore_DuplicateMetricRegistration ---- PASS: TestStore_DuplicateMetricRegistration (0.00s) -=== RUN TestStore_GetNonExistentMetric ---- PASS: TestStore_GetNonExistentMetric (0.00s) -=== RUN TestStore_ConcurrentGaugeSetGet ---- PASS: TestStore_ConcurrentGaugeSetGet (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/metrics 0.410s -? gofr.dev/pkg/gofr/metrics/exporters [no test files] -=== RUN Test_ArangoCheckAndCreateMigrationTable ---- PASS: Test_ArangoCheckAndCreateMigrationTable (0.00s) -=== RUN Test_ArangoGetLastMigration ---- PASS: Test_ArangoGetLastMigration (0.00s) -=== RUN Test_ArangoCommitMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.0427633+05:30","message":"Inserted record for migration 10 in ArangoDB gofr_migrations collection","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:39.0433291+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} ---- PASS: Test_ArangoCommitMigration (0.00s) -=== RUN Test_ArangoBeginTransaction ---- PASS: Test_ArangoBeginTransaction (0.00s) -=== RUN Test_CassandraCheckAndCreateMigrationTable ---- PASS: Test_CassandraCheckAndCreateMigrationTable (0.00s) -=== RUN Test_CassandraGetLastMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.044601+05:30","message":"cassandra last migration fetched value is: 0","gofrVersion":"dev"} ---- PASS: Test_CassandraGetLastMigration (0.00s) -=== RUN Test_CassandraCommitMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.044601+05:30","message":"inserted record for migration 10 in cassandra gofr_migrations table","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:39.044601+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} ---- PASS: Test_CassandraCommitMigration (0.00s) -=== RUN Test_CassandraBeginTransaction ---- PASS: Test_CassandraBeginTransaction (0.00s) -=== RUN Test_ClickHouseCheckAndCreateMigrationTable ---- PASS: Test_ClickHouseCheckAndCreateMigrationTable (0.00s) -=== RUN Test_ClickHouseGetLastMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.0462285+05:30","message":"SQL last migration fetched value is: 0","gofrVersion":"dev"} ---- PASS: Test_ClickHouseGetLastMigration (0.00s) -=== RUN Test_ClickHouseCommitMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.0468089+05:30","message":"inserted record for migration 10 in clickhouse gofr_migrations table","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:39.0468089+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} ---- PASS: Test_ClickHouseCommitMigration (0.00s) -=== RUN Test_ClickHouseBeginTransaction ---- PASS: Test_ClickHouseBeginTransaction (0.00s) -=== RUN Test_getMigratorDatastoreNotInitialised ---- PASS: Test_getMigratorDatastoreNotInitialised (0.00s) -=== RUN Test_DGraphCheckAndCreateMigrationTable ---- PASS: Test_DGraphCheckAndCreateMigrationTable (0.00s) -=== RUN Test_DGraphGetLastMigration -=== RUN Test_DGraphGetLastMigration/success -=== RUN Test_DGraphGetLastMigration/query_error -{"level":"DEBUG","time":"2025-08-22T00:07:39.0478706+05:30","message":["Error fetching last migration:",{}],"gofrVersion":"dev"} -=== RUN Test_DGraphGetLastMigration/empty_response ---- PASS: Test_DGraphGetLastMigration (0.00s) - --- PASS: Test_DGraphGetLastMigration/success (0.00s) - --- PASS: Test_DGraphGetLastMigration/query_error (0.00s) - --- PASS: Test_DGraphGetLastMigration/empty_response (0.00s) -=== RUN Test_DGraphCommitMigration -{"level":"DEBUG","time":"2025-08-22T00:07:39.0484418+05:30","message":"Inserted record for migration 10 in Dgraph migrations","gofrVersion":"dev"} -{"level":"INFO","time":"2025-08-22T00:07:39.0484418+05:30","message":"Migration 10 ran successfully","gofrVersion":"dev"} ---- PASS: Test_DGraphCommitMigration (0.00s) -=== RUN Test_DGraphBeginTransaction ---- PASS: Test_DGraphBeginTransaction (0.00s) -=== RUN Test_DGraphDS_ApplySchema ---- PASS: Test_DGraphDS_ApplySchema (0.00s) -=== RUN Test_DGraphDS_AddOrUpdateField ---- PASS: Test_DGraphDS_AddOrUpdateField (0.00s) -=== RUN Test_DGraphDS_DropField ---- PASS: Test_DGraphDS_DropField (0.00s) -=== RUN TestMigrationRunElasticsearchSuccess ---- PASS: TestMigrationRunElasticsearchSuccess (0.00s) -=== RUN TestMigrationRunElasticsearchMigrationFailure -initialized data source for Elasticsearch -Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) -Created Elasticsearch migration index: gofr_migrations -Elasticsearch last migration fetched value is: 0 -running migration 1 -Migration 1 failed. ---- PASS: TestMigrationRunElasticsearchMigrationFailure (0.00s) -=== RUN TestMigrationRunElasticsearchMigrationFailureWhileCheckingTable -initialized data source for Elasticsearch -Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) -failed to create gofr_migration table, err: failed to create migration index: assert.AnError general error for testing ---- PASS: TestMigrationRunElasticsearchMigrationFailureWhileCheckingTable (0.00s) -=== RUN TestMigrationRunElasticsearchCurrentMigrationEqualLastMigration ---- PASS: TestMigrationRunElasticsearchCurrentMigrationEqualLastMigration (0.00s) -=== RUN TestMigrationRunElasticsearchCommitError -initialized data source for Elasticsearch -Migration index might already exist:%!(EXTRA *errors.errorString=assert.AnError general error for testing) -Created Elasticsearch migration index: gofr_migrations -Elasticsearch last migration fetched value is: 0 -running migration 1 -Migration 1 failed. ---- PASS: TestMigrationRunElasticsearchCommitError (0.00s) -=== RUN TestElasticsearchMigrator_checkAndCreateMigrationTable_IndexExists ---- PASS: TestElasticsearchMigrator_checkAndCreateMigrationTable_IndexExists (0.00s) -=== RUN TestElasticsearchMigrator_getLastMigration_WithMigrations -Elasticsearch last migration fetched value is: 5 ---- PASS: TestElasticsearchMigrator_getLastMigration_WithMigrations (0.00s) -=== RUN TestElasticsearchMigrator_getLastMigration_NoMigrations -Elasticsearch last migration fetched value is: 0 ---- PASS: TestElasticsearchMigrator_getLastMigration_NoMigrations (0.00s) -=== RUN TestElasticsearchMigrator_commitMigration_Success -Inserted record for migration 1 in Elasticsearch gofr_migrations index -Migration 1 ran successfully ---- PASS: TestElasticsearchMigrator_commitMigration_Success (0.00s) -=== RUN TestElasticsearchMigrator_commitMigration_Failure ---- PASS: TestElasticsearchMigrator_commitMigration_Failure (0.00s) -=== RUN TestMigration_InvalidKeys ---- PASS: TestMigration_InvalidKeys (0.00s) -=== RUN TestMigration_NoDatasource ---- PASS: TestMigration_NoDatasource (0.00s) -=== RUN Test_getMigratorDBInitialisation -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for SQL","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Redis","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for DGraph","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Clickhouse","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Oracle","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for PubSub","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Cassandra","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0511517+05:30","message":"initialized data source for Mongo","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for ArangoDB","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for SurrealDB","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for Elasticsearch","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for OpenTSDB","gofrVersion":"dev"} -{"level":"DEBUG","time":"2025-08-22T00:07:39.0516886+05:30","message":"initialized data source for ScyllaDB","gofrVersion":"dev"} ---- PASS: Test_getMigratorDBInitialisation (0.00s) -=== RUN TestMigrationRunClickhouseSuccess - oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver - controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:77 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations - ( - version Int64 NOT NULL, - method String NOT NULL, - start_time DateTime NOT NULL, - duration Int64 NULL, - PRIMARY KEY (version, method) - ) ENGINE = MergeTree() - ORDER BY (version, method); - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:76 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:78 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to INSERT INTO gofr_migrations (version, method, start_time, duration) VALUES (?, ?, ?, ?); (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:79 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunClickhouseSuccess (0.00s) -=== RUN TestMigrationRunClickhouseMigrationFailure - oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations - ( - version Int64 NOT NULL, - method String NOT NULL, - start_time DateTime NOT NULL, - duration Int64 NULL, - PRIMARY KEY (version, method) - ) ENGINE = MergeTree() - ORDER BY (version, method); - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:104 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:106 - controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:105 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunClickhouseMigrationFailure (0.00s) -=== RUN TestMigrationRunClickhouseMigrationFailureWhileCheckingTable - oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations - ( - version Int64 NOT NULL, - method String NOT NULL, - start_time DateTime NOT NULL, - duration Int64 NULL, - PRIMARY KEY (version, method) - ) ENGINE = MergeTree() - ORDER BY (version, method); - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:131 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunClickhouseMigrationFailureWhileCheckingTable (0.00s) -=== RUN TestMigrationRunClickhouseCurrentMigrationEqualLastMigration - oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations - ( - version Int64 NOT NULL, - method String NOT NULL, - start_time DateTime NOT NULL, - duration Int64 NULL, - PRIMARY KEY (version, method) - ) ENGINE = MergeTree() - ORDER BY (version, method); - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:154 - controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:155 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunClickhouseCurrentMigrationEqualLastMigration (0.00s) -=== RUN TestMigrationRunClickhouseCommitError - oracle.go:53: Unexpected call to *container.MockOracleDB.Exec([context.Background - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - ]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle.go:53 because: there are no expected calls of the method "Exec" for that receiver - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to CREATE TABLE IF NOT EXISTS gofr_migrations - ( - version Int64 NOT NULL, - method String NOT NULL, - start_time DateTime NOT NULL, - duration Int64 NULL, - PRIMARY KEY (version, method) - ) ENGINE = MergeTree() - ORDER BY (version, method); - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:178 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to SELECT * FROM users (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:180 - controller.go:97: missing call(s) to *migration.MockClickhouse.Exec(is anything, is equal to INSERT INTO gofr_migrations (version, method, start_time, duration) VALUES (?, ?, ?, ?); (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:181 - controller.go:97: missing call(s) to *migration.MockClickhouse.Select(is anything, is anything, is equal to SELECT COALESCE(MAX(version), 0) as last_migration FROM gofr_migrations; (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:179 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunClickhouseCommitError (0.00s) -=== RUN TestMigrationRunOracleSuccess - pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:207 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to CREATE TABLE test_oracle (id int) (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:209 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - INSERT INTO gofr_migrations (version, method, start_time, duration) - VALUES (:1, :2, :3, :4) - (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:210 - controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to - SELECT NVL(MAX(version), 0) AS last_migration - FROM gofr_migrations - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:208 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunOracleSuccess (0.00s) -=== RUN TestMigrationRunOracleCreateTableFailure - pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:226 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunOracleCreateTableFailure (0.00s) -=== RUN TestMigrationRunOracleMigrationFailure - pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:246 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to INVALID SQL (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:248 - controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to - SELECT NVL(MAX(version), 0) AS last_migration - FROM gofr_migrations - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:247 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunOracleMigrationFailure (0.00s) -=== RUN TestMigrationRunOracleCommitFailure - pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver - controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to - SELECT NVL(MAX(version), 0) AS last_migration - FROM gofr_migrations - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:268 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:267 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to CREATE TABLE ok (id int) (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:269 - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - INSERT INTO gofr_migrations (version, method, start_time, duration) - VALUES (:1, :2, :3, :4) - (string), is equal to 1 (int64), is equal to UP (string), is anything, is anything) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:270 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunOracleCommitFailure (0.00s) -=== RUN TestMigrationRunOracleSkipApplied - pubsub.go:36: Unexpected call to *container.MockPubSubProvider.CreateTopic([context.Background gofr_migrations]) at D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/pubsub.go:36 because: there are no expected calls of the method "CreateTopic" for that receiver - controller.go:97: missing call(s) to *migration.MockOracle.Exec(is anything, is equal to - BEGIN - EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( - version NUMBER NOT NULL, - method VARCHAR2(64) NOT NULL, - start_time TIMESTAMP NOT NULL, - duration NUMBER NULL, - PRIMARY KEY (version, method) - )'; - EXCEPTION WHEN OTHERS THEN - IF SQLCODE != -955 THEN RAISE; END IF; - END; - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:291 - controller.go:97: missing call(s) to *migration.MockOracle.Select(is anything, is anything, is equal to - SELECT NVL(MAX(version), 0) AS last_migration - FROM gofr_migrations - (string)) D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/migration_test.go:292 - controller.go:97: aborting test due to missing call(s) ---- FAIL: TestMigrationRunOracleSkipApplied (0.00s) -=== RUN Test_MongoCheckAndCreateMigrationTable ---- PASS: Test_MongoCheckAndCreateMigrationTable (0.00s) -=== RUN Test_MongoGetLastMigration ---- PASS: Test_MongoGetLastMigration (0.00s) -=== RUN Test_MongoCommitMigration ---- PASS: Test_MongoCommitMigration (0.00s) -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/creates_new_migration_file_successfully -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_already_exists_with_valid_JSON -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_contains_invalid_JSON -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) - opentsdb_test.go:84: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 - Error: An error is expected but got nil. - Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) - Messages: TEST[3] file exists but cannot be opened (permission denied) Failed! Expected error but got none -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory - opentsdb_test.go:84: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 - Error: An error is expected but got nil. - Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory - Messages: TEST[4] file creation fails due to permission denied on directory Failed! Expected error but got none -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_existing_file_with_same_name -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent - opentsdb_test.go:84: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:416 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:84 - Error: An error is expected but got nil. - Test: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent - Messages: TEST[6] directory creation fails due to permission denied on parent Failed! Expected error but got none -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/migration_file_path_is_a_directory -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/empty_file_path_directory_(current_directory) ---- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced (0.04s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/creates_new_migration_file_successfully (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_already_exists_with_valid_JSON (0.01s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_contains_invalid_JSON (0.01s) - --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_exists_but_cannot_be_opened_(permission_denied) (0.00s) - --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/file_creation_fails_due_to_permission_denied_on_directory (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_existing_file_with_same_name (0.00s) - --- FAIL: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/directory_creation_fails_due_to_permission_denied_on_parent (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/migration_file_path_is_a_directory (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_Enhanced/empty_file_path_directory_(current_directory) (0.00s) -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_ConcurrentAccess ---- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_ConcurrentAccess (0.01s) -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_MutexProtection ---- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_MutexProtection (0.00s) -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/very_long_file_path -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_special_characters -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_unicode_characters -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/nested_deep_directory_structure -=== RUN Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_dots_and_relative_components ---- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases (0.02s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/very_long_file_path (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_special_characters (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_unicode_characters (0.00s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/nested_deep_directory_structure (0.01s) - --- PASS: Test_OpenTSDBCheckAndCreateMigrationTable_EdgeCases/file_path_with_dots_and_relative_components (0.00s) -=== RUN Test_OpenTSDBGetLastMigration -=== RUN Test_OpenTSDBGetLastMigration/empty_migration_file -=== RUN Test_OpenTSDBGetLastMigration/file_with_migrations -=== RUN Test_OpenTSDBGetLastMigration/file_doesn't_exist -=== RUN Test_OpenTSDBGetLastMigration/invalid_JSON_file ---- PASS: Test_OpenTSDBGetLastMigration (0.01s) - --- PASS: Test_OpenTSDBGetLastMigration/empty_migration_file (0.00s) - --- PASS: Test_OpenTSDBGetLastMigration/file_with_migrations (0.01s) - --- PASS: Test_OpenTSDBGetLastMigration/file_doesn't_exist (0.00s) - --- PASS: Test_OpenTSDBGetLastMigration/invalid_JSON_file (0.00s) -=== RUN Test_OpenTSDBCommitMigration_ConcurrentAccess - opentsdb_test.go:769: Concurrent commit errors: [failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process. failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentAccess542730712\001\test_migrations.json: The process cannot access the file because it is being used by another process.] - opentsdb_test.go:773: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:839 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:773 - Error: "[]" should have 20 item(s), but has 0 - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected 20 migrations but found 0 - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 1 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 2 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 3 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 4 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 5 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 6 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 7 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 8 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 9 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 10 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 11 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 12 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 13 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 14 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 15 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 16 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 17 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 18 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 19 not found in file - opentsdb_test.go:777: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:954 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:777 - Error: Should be true - Test: Test_OpenTSDBCommitMigration_ConcurrentAccess - Messages: Expected migration version 20 not found in file ---- FAIL: Test_OpenTSDBCommitMigration_ConcurrentAccess (0.09s) -=== RUN Test_OpenTSDBCommitMigration_ConcurrentDuplicates - opentsdb_test.go:821: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:821 - Error: Received unexpected error: - failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentDuplicates1520936309\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_ConcurrentDuplicates1520936309\001\test_migrations.json: The process cannot access the file because it is being used by another process. - Test: Test_OpenTSDBCommitMigration_ConcurrentDuplicates - Messages: Duplicate migration commits should not error ---- FAIL: Test_OpenTSDBCommitMigration_ConcurrentDuplicates (0.04s) -=== RUN Test_OpenTSDBCommitMigration_JSONFormatValidation - opentsdb_test.go:861: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:861 - Error: Received unexpected error: - failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_JSONFormatValidation3723859633\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_JSONFormatValidation3723859633\001\test_migrations.json: The process cannot access the file because it is being used by another process. - Test: Test_OpenTSDBCommitMigration_JSONFormatValidation ---- FAIL: Test_OpenTSDBCommitMigration_JSONFormatValidation (0.01s) -=== RUN Test_OpenTSDBCommitMigration_TimestampAccuracy - opentsdb_test.go:905: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:905 - Error: Received unexpected error: - failed to record migration in JSON file: failed to rename temporary file: rename C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_TimestampAccuracy4231843189\001\test_migrations.json.tmp C:\Users\user\AppData\Local\Temp\Test_OpenTSDBCommitMigration_TimestampAccuracy4231843189\001\test_migrations.json: The process cannot access the file because it is being used by another process. - Test: Test_OpenTSDBCommitMigration_TimestampAccuracy ---- FAIL: Test_OpenTSDBCommitMigration_TimestampAccuracy (0.01s) -=== RUN Test_OpenTSDBValidateExistingFile -=== RUN Test_OpenTSDBValidateExistingFile/valid_empty_JSON_array -=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_single_migration -=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_multiple_migrations -=== RUN Test_OpenTSDBValidateExistingFile/valid_JSON_with_mixed_field_types -=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_malformed -=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_incomplete_array -=== RUN Test_OpenTSDBValidateExistingFile/invalid_JSON_-_wrong_structure -=== RUN Test_OpenTSDBValidateExistingFile/empty_file -=== RUN Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) - opentsdb_test.go:963: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:1240 - D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/opentsdb_test.go:963 - Error: An error is expected but got nil. - Test: Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) - Messages: TEST[8] file exists but cannot be opened (permission denied) Failed! Expected error but got none ---- FAIL: Test_OpenTSDBValidateExistingFile (0.04s) - --- PASS: Test_OpenTSDBValidateExistingFile/valid_empty_JSON_array (0.00s) - --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_single_migration (0.00s) - --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_multiple_migrations (0.01s) - --- PASS: Test_OpenTSDBValidateExistingFile/valid_JSON_with_mixed_field_types (0.00s) - --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_malformed (0.01s) - --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_incomplete_array (0.01s) - --- PASS: Test_OpenTSDBValidateExistingFile/invalid_JSON_-_wrong_structure (0.00s) - --- PASS: Test_OpenTSDBValidateExistingFile/empty_file (0.00s) - --- FAIL: Test_OpenTSDBValidateExistingFile/file_exists_but_cannot_be_opened_(permission_denied) (0.00s) -=== RUN Test_OpenTSDBValidateExistingFile_ConcurrentAccess ---- PASS: Test_OpenTSDBValidateExistingFile_ConcurrentAccess (0.01s) -=== RUN Test_OpenTSDBValidateExistingFile_FileModifiedDuringRead ---- PASS: Test_OpenTSDBValidateExistingFile_FileModifiedDuringRead (0.01s) -=== RUN Test_OracleCheckAndCreateMigrationTable ---- PASS: Test_OracleCheckAndCreateMigrationTable (0.00s) -=== RUN Test_OracleGetLastMigration ---- PASS: Test_OracleGetLastMigration (0.00s) -=== RUN Test_OracleCommitMigration ---- PASS: Test_OracleCommitMigration (0.00s) -=== RUN Test_OracleBeginTransaction - oracle_test.go:98: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/migration/oracle_test.go:98 - Error: "" does not contain "OracleDB Migrator begin successfully" - Test: Test_OracleBeginTransaction ---- FAIL: Test_OracleBeginTransaction (0.00s) -=== RUN Test_CreateTopic ---- PASS: Test_CreateTopic (0.00s) -=== RUN Test_DeleteTopic ---- PASS: Test_DeleteTopic (0.00s) -=== RUN Test_Query ---- PASS: Test_Query (0.00s) -=== RUN Test_PubSubCheckAndCreateMigrationTable ---- PASS: Test_PubSubCheckAndCreateMigrationTable (0.00s) -=== RUN Test_PubSubCommitMigration_Success ---- PASS: Test_PubSubCommitMigration_Success (0.00s) -=== RUN Test_PubSubCommitMigration_PublishError ---- PASS: Test_PubSubCommitMigration_PublishError (0.00s) -=== RUN Test_PubSubGetLastMigration -=== RUN Test_PubSubGetLastMigration/pubsub_has_higher_version_than_next_migrator -=== RUN Test_PubSubGetLastMigration/next_migrator_has_higher_version_than_pubsub -=== RUN Test_PubSubGetLastMigration/query_error_but_next_migrator_has_value -=== RUN Test_PubSubGetLastMigration/empty_result_but_next_migrator_has_value ---- PASS: Test_PubSubGetLastMigration (0.00s) - --- PASS: Test_PubSubGetLastMigration/pubsub_has_higher_version_than_next_migrator (0.00s) - --- PASS: Test_PubSubGetLastMigration/next_migrator_has_higher_version_than_pubsub (0.00s) - --- PASS: Test_PubSubGetLastMigration/query_error_but_next_migrator_has_value (0.00s) - --- PASS: Test_PubSubGetLastMigration/empty_result_but_next_migrator_has_value (0.00s) -=== RUN TestRedis_Get ---- PASS: TestRedis_Get (0.00s) -=== RUN TestRedis_Set ---- PASS: TestRedis_Set (0.00s) -=== RUN TestRedis_Del ---- PASS: TestRedis_Del (0.00s) -=== RUN TestRedis_Rename ---- PASS: TestRedis_Rename (0.00s) -=== RUN TestRedisMigrator_GetLastMigration ---- PASS: TestRedisMigrator_GetLastMigration (0.00s) -=== RUN TestRedisMigrator_beginTransaction ---- PASS: TestRedisMigrator_beginTransaction (0.00s) -=== RUN TestScyllaCheckAndCreateMigrationTable ---- PASS: TestScyllaCheckAndCreateMigrationTable (0.00s) -=== RUN TestScyllaGetLastMigration ---- PASS: TestScyllaGetLastMigration (0.00s) -=== RUN TestScyllaCommitMigration ---- PASS: TestScyllaCommitMigration (0.00s) -=== RUN TestScyllaBeginTransaction ---- PASS: TestScyllaBeginTransaction (0.00s) -=== RUN TestScyllaMigrator_Rollback ---- PASS: TestScyllaMigrator_Rollback (0.00s) -=== RUN TestQuery -=== RUN TestQuery/successful_query -=== RUN TestQuery/query_error ---- PASS: TestQuery (0.00s) - --- PASS: TestQuery/successful_query (0.00s) - --- PASS: TestQuery/query_error (0.00s) -=== RUN TestQueryRow -=== RUN TestQueryRow/successful_query_row ---- PASS: TestQueryRow (0.00s) - --- PASS: TestQueryRow/successful_query_row (0.00s) -=== RUN TestQueryRowContext -=== RUN TestQueryRowContext/successful_query_row_context ---- PASS: TestQueryRowContext (0.00s) - --- PASS: TestQueryRowContext/successful_query_row_context (0.00s) -=== RUN TestExec -=== RUN TestExec/successful_exec -=== RUN TestExec/exec_error ---- PASS: TestExec (0.00s) - --- PASS: TestExec/successful_exec (0.00s) - --- PASS: TestExec/exec_error (0.00s) -=== RUN TestExecContext -=== RUN TestExecContext/successful_exec_context ---- PASS: TestExecContext (0.00s) - --- PASS: TestExecContext/successful_exec_context (0.00s) -=== RUN TestCheckAndCreateMigrationTableSuccess ---- PASS: TestCheckAndCreateMigrationTableSuccess (0.00s) -=== RUN TestCheckAndCreateMigrationTableExecError ---- PASS: TestCheckAndCreateMigrationTableExecError (0.00s) -=== RUN TestBeginTransactionSuccess ---- PASS: TestBeginTransactionSuccess (0.00s) -=== RUN TestBeginTransactionDBError ---- PASS: TestBeginTransactionDBError (0.00s) -=== RUN TestRollbackNoTransaction ---- PASS: TestRollbackNoTransaction (0.00s) -=== RUN TestApply ---- PASS: TestApply (0.00s) -=== RUN TestGetLastMigration_UseMigratorFallback ---- PASS: TestGetLastMigration_UseMigratorFallback (0.00s) -=== RUN TestGetLastMigration_MigratorReturnsLesser ---- PASS: TestGetLastMigration_MigratorReturnsLesser (0.00s) -=== RUN TestBeginTransaction_ReplaceSQLTx ---- PASS: TestBeginTransaction_ReplaceSQLTx (0.00s) -=== RUN TestCheckAndCreateMigrationTable_ErrorCreatingTable ---- PASS: TestCheckAndCreateMigrationTable_ErrorCreatingTable (0.00s) -=== RUN Test_SurrealCheckAndCreateMigrationTable ---- PASS: Test_SurrealCheckAndCreateMigrationTable (0.00s) -=== RUN Test_SurrealGetLastMigration ---- PASS: Test_SurrealGetLastMigration (0.00s) -=== RUN Test_SurrealCommitMigration ---- PASS: Test_SurrealCommitMigration (0.00s) -=== RUN Test_SurrealBeginTransaction ---- PASS: Test_SurrealBeginTransaction (0.00s) -=== RUN TestSurrealDS_Query ---- PASS: TestSurrealDS_Query (0.00s) -=== RUN TestSurrealDS_CreateNamespace ---- PASS: TestSurrealDS_CreateNamespace (0.00s) -=== RUN TestSurrealDS_CreateDatabase ---- PASS: TestSurrealDS_CreateDatabase (0.00s) -=== RUN TestSurrealDS_DropNamespace ---- PASS: TestSurrealDS_DropNamespace (0.00s) -=== RUN TestSurrealDS_DropDatabase ---- PASS: TestSurrealDS_DropDatabase (0.00s) -FAIL gofr.dev/pkg/gofr/migration 0.805s -=== RUN TestNewAPIKeyConfig ---- PASS: TestNewAPIKeyConfig (0.00s) -=== RUN TestAddAuthorizationHeader_APIKey ---- PASS: TestAddAuthorizationHeader_APIKey (0.00s) -=== RUN TestAuthProvider -=== RUN TestAuthProvider/Test_Case_#0 -&{2025-08-22 00:07:41.4463643 +0530 IST m=+0.730737201 332 00000000000000000000000000000000 200 GET http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4489343 +0530 IST m=+0.733307201 1036 00000000000000000000000000000000 200 POST http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 PUT http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 0 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55860/test} -=== RUN TestAuthProvider/Test_Case_#1 -&{2025-08-22 00:07:41.4504782 +0530 IST m=+0.734851101 1082 00000000000000000000000000000000 401 GET http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4515608 +0530 IST m=+0.735933701 0 00000000000000000000000000000000 401 POST http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4515608 +0530 IST m=+0.735933701 526 00000000000000000000000000000000 401 PUT http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4520869 +0530 IST m=+0.736459801 0 00000000000000000000000000000000 401 PATCH http://127.0.0.1:55860/test} -&{2025-08-22 00:07:41.4520869 +0530 IST m=+0.736459801 0 00000000000000000000000000000000 401 DELETE http://127.0.0.1:55860/test} -=== RUN TestAuthProvider/Test_Case_#2 -=== RUN TestAuthProvider/Test_Case_#3 -&{2025-08-22 00:07:41.452615 +0530 IST m=+0.736987901 529 00000000000000000000000000000000 200 GET http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4536537 +0530 IST m=+0.738026601 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4536537 +0530 IST m=+0.738026601 510 00000000000000000000000000000000 200 PUT http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 0 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55863/test} -=== RUN TestAuthProvider/Test_Case_#4 -&{2025-08-22 00:07:41.4541643 +0530 IST m=+0.738537201 793 00000000000000000000000000000000 401 GET http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 POST http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 PUT http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 PATCH http://127.0.0.1:55863/test} -&{2025-08-22 00:07:41.4549574 +0530 IST m=+0.739330301 0 00000000000000000000000000000000 401 DELETE http://127.0.0.1:55863/test} -=== RUN TestAuthProvider/Test_Case_#5 -=== RUN TestAuthProvider/Test_Case_#6 -&{2025-08-22 00:07:41.4572818 +0530 IST m=+0.741654701 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55862/test} -&{2025-08-22 00:07:41.4625728 +0530 IST m=+0.746945701 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55862/test} -&{2025-08-22 00:07:41.4644058 +0530 IST m=+0.748778701 0 00000000000000000000000000000000 200 PUT http://127.0.0.1:55862/test} -&{2025-08-22 00:07:41.4670311 +0530 IST m=+0.751404001 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55862/test} -&{2025-08-22 00:07:41.4686866 +0530 IST m=+0.753059501 1520 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55862/test} -=== RUN TestAuthProvider/Test_Case_#7 -=== RUN TestAuthProvider/Test_Case_#8 -=== RUN TestAuthProvider/Test_Case_#9 -=== RUN TestAuthProvider/Test_Case_#10 ---- PASS: TestAuthProvider (0.75s) - --- PASS: TestAuthProvider/Test_Case_#0 (0.01s) - --- PASS: TestAuthProvider/Test_Case_#1 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#2 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#3 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#4 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#5 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#6 (0.01s) - --- PASS: TestAuthProvider/Test_Case_#7 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#8 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#9 (0.00s) - --- PASS: TestAuthProvider/Test_Case_#10 (0.00s) -=== RUN TestNewBasicAuthConfig ---- PASS: TestNewBasicAuthConfig (0.00s) -=== RUN TestAddAuthorizationHeader_BasicAuth ---- PASS: TestAddAuthorizationHeader_BasicAuth (0.00s) -=== RUN TestHttpService_GetSuccessRequests -&{2025-08-22 00:07:41.4719261 +0530 IST m=+0.756299001 1046 00000000000000000000000000000000 200 GET http://127.0.0.1:55867/test} ---- PASS: TestHttpService_GetSuccessRequests (0.00s) -=== RUN TestHttpService_GetWithHeaderSuccessRequests -&{2025-08-22 00:07:41.4738591 +0530 IST m=+0.758232001 527 00000000000000000000000000000000 200 GET http://127.0.0.1:55869/test} ---- PASS: TestHttpService_GetWithHeaderSuccessRequests (0.00s) -=== RUN TestHttpService_GetCBOpenRequests -&{0xc0003e8960 Get "http://127.0.0.1:55871/invalid": cb error} -&{0xc0003e8ae0 Get "http://127.0.0.1:55871/invalid": cb error} - circuit_breaker_test.go:125: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:125 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_GetCBOpenRequests ---- FAIL: TestHttpService_GetCBOpenRequests (0.00s) -=== RUN TestHttpService_GetWithHeaderCBOpenRequests -&{2025-08-22 00:07:41.4754697 +0530 IST m=+0.759842601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55871/.well-known/alive} -&{0xc000109620 Get "http://127.0.0.1:55872/invalid": cb error} -&{0xc0001097a0 Get "http://127.0.0.1:55872/invalid": cb error} - circuit_breaker_test.go:156: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:156 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_GetWithHeaderCBOpenRequests ---- FAIL: TestHttpService_GetWithHeaderCBOpenRequests (0.00s) -=== RUN TestHttpService_PutSuccessRequests -&{2025-08-22 00:07:41.4765757 +0530 IST m=+0.760948601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55872/.well-known/alive} -&{2025-08-22 00:07:41.4765757 +0530 IST m=+0.760948601 676 00000000000000000000000000000000 200 PUT http://127.0.0.1:55873/test} ---- PASS: TestHttpService_PutSuccessRequests (0.00s) -=== RUN TestHttpService_PutWithHeaderSuccessRequests -&{2025-08-22 00:07:41.4780588 +0530 IST m=+0.762431701 1119 00000000000000000000000000000000 200 PUT http://127.0.0.1:55875/test} ---- PASS: TestHttpService_PutWithHeaderSuccessRequests (0.00s) -=== RUN TestHttpService_PutCBOpenRequests -&{0xc000514a80 Put "http://127.0.0.1:55877/invalid": cb error} -&{0xc000514c00 Put "http://127.0.0.1:55877/invalid": cb error} - circuit_breaker_test.go:231: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:231 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PutCBOpenRequests ---- FAIL: TestHttpService_PutCBOpenRequests (0.00s) -&{2025-08-22 00:07:41.4803371 +0530 IST m=+0.764710001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55877/.well-known/alive} -=== RUN TestHttpService_PutWithHeaderCBOpenRequests -&{0xc000080420 Put "http://127.0.0.1:55878/invalid": cb error} -&{0xc0000805a0 Put "http://127.0.0.1:55878/invalid": cb error} - circuit_breaker_test.go:262: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:262 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PutWithHeaderCBOpenRequests ---- FAIL: TestHttpService_PutWithHeaderCBOpenRequests (0.00s) -=== RUN TestHttpService_PatchSuccessRequests -&{2025-08-22 00:07:41.4814281 +0530 IST m=+0.765801001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55878/.well-known/alive} -&{2025-08-22 00:07:41.4814281 +0530 IST m=+0.765801001 1071 00000000000000000000000000000000 200 GET http://127.0.0.1:55879/test} ---- PASS: TestHttpService_PatchSuccessRequests (0.00s) -=== RUN TestHttpService_PatchWithHeaderSuccessRequests -&{2025-08-22 00:07:41.4830395 +0530 IST m=+0.767412401 1278 00000000000000000000000000000000 200 GET http://127.0.0.1:55881/test} ---- PASS: TestHttpService_PatchWithHeaderSuccessRequests (0.00s) -=== RUN TestHttpService_PatchCBOpenRequests -&{0xc000515380 Patch "http://127.0.0.1:55883/invalid": cb error} -&{0xc000515500 Patch "http://127.0.0.1:55883/invalid": cb error} - circuit_breaker_test.go:337: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:337 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PatchCBOpenRequests ---- FAIL: TestHttpService_PatchCBOpenRequests (0.00s) -=== RUN TestHttpService_PatchWithHeaderCBOpenRequests -&{2025-08-22 00:07:41.4854451 +0530 IST m=+0.769818001 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55883/.well-known/alive} -&{0xc0003217a0 Patch "http://127.0.0.1:55884/invalid": cb error} -&{0xc000321920 Patch "http://127.0.0.1:55884/invalid": cb error} - circuit_breaker_test.go:368: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:368 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PatchWithHeaderCBOpenRequests ---- FAIL: TestHttpService_PatchWithHeaderCBOpenRequests (0.00s) -=== RUN TestHttpService_PostSuccessRequests -&{2025-08-22 00:07:41.4860284 +0530 IST m=+0.770401301 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55884/.well-known/alive} -&{2025-08-22 00:07:41.4860284 +0530 IST m=+0.770401301 943 00000000000000000000000000000000 200 POST http://127.0.0.1:55885/test} ---- PASS: TestHttpService_PostSuccessRequests (0.00s) -=== RUN TestHttpService_PostWithHeaderSuccessRequests -&{2025-08-22 00:07:41.4875391 +0530 IST m=+0.771912001 1114 00000000000000000000000000000000 200 POST http://127.0.0.1:55887/test} ---- PASS: TestHttpService_PostWithHeaderSuccessRequests (0.00s) -=== RUN TestHttpService_PostCBOpenRequests -&{0xc0002421e0 Post "http://127.0.0.1:55889/invalid": cb error} -&{0xc000242360 Post "http://127.0.0.1:55889/invalid": cb error} - circuit_breaker_test.go:443: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:443 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PostCBOpenRequests ---- FAIL: TestHttpService_PostCBOpenRequests (0.00s) -=== RUN TestHttpService_PostWithHeaderCBOpenRequests -&{2025-08-22 00:07:41.4898052 +0530 IST m=+0.774178101 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55889/.well-known/alive} -&{0xc000080de0 Post "http://127.0.0.1:55890/invalid": cb error} -&{0xc000080f60 Post "http://127.0.0.1:55890/invalid": cb error} - circuit_breaker_test.go:474: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:474 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_PostWithHeaderCBOpenRequests ---- FAIL: TestHttpService_PostWithHeaderCBOpenRequests (0.00s) -=== RUN TestHttpService_DeleteSuccessRequests -&{2025-08-22 00:07:41.4903516 +0530 IST m=+0.774724501 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55890/.well-known/alive} -&{2025-08-22 00:07:41.4903516 +0530 IST m=+0.774724501 587 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55891/test} ---- PASS: TestHttpService_DeleteSuccessRequests (0.00s) -=== RUN TestHttpService_DeleteWithHeaderSuccessRequests -&{2025-08-22 00:07:41.4920884 +0530 IST m=+0.776461301 587 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55893/test} ---- PASS: TestHttpService_DeleteWithHeaderSuccessRequests (0.00s) -=== RUN TestHttpService_DeleteCBOpenRequests -&{0xc00038f620 Delete "http://127.0.0.1:55895/invalid": cb error} -&{0xc00038f7a0 Delete "http://127.0.0.1:55895/invalid": cb error} - circuit_breaker_test.go:549: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:549 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_DeleteCBOpenRequests ---- FAIL: TestHttpService_DeleteCBOpenRequests (0.00s) -=== RUN TestHttpService_DeleteWithHeaderCBOpenRequests -&{2025-08-22 00:07:41.4939397 +0530 IST m=+0.778312601 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55895/.well-known/alive} -&{0xc000081680 Delete "http://127.0.0.1:55896/invalid": cb error} -&{0xc000081800 Delete "http://127.0.0.1:55896/invalid": cb error} - circuit_breaker_test.go:580: - Error Trace: D:/Users/user/Desktop/Go_Migration/gofr/pkg/gofr/service/circuit_breaker_test.go:580 - Error: Received unexpected error: - unable to connect to server at host - Test: TestHttpService_DeleteWithHeaderCBOpenRequests ---- FAIL: TestHttpService_DeleteWithHeaderCBOpenRequests (0.00s) -=== RUN Test_CustomDomainProvider_Get -&{2025-08-22 00:07:41.4946082 +0530 IST m=+0.778981101 0 00000000000000000000000000000000 200 GET http://127.0.0.1:55896/.well-known/alive} -&{2025-08-22 00:07:41.4946082 +0530 IST m=+0.778981101 583 00000000000000000000000000000000 200 GET http://127.0.0.1:55897//path} ---- PASS: Test_CustomDomainProvider_Get (0.00s) -=== RUN Test_CustomDomainProvider_Post -&{2025-08-22 00:07:41.4963137 +0530 IST m=+0.780686601 583 00000000000000000000000000000000 201 POST http://127.0.0.1:55899//path} ---- PASS: Test_CustomDomainProvider_Post (0.00s) -=== RUN TestCustomDomainProvider_Put -&{2025-08-22 00:07:41.4974693 +0530 IST m=+0.781842201 1064 00000000000000000000000000000000 200 PUT http://127.0.0.1:55901//path} ---- PASS: TestCustomDomainProvider_Put (0.00s) -=== RUN TestCustomDomainProvider_Patch -&{2025-08-22 00:07:41.499096 +0530 IST m=+0.783468901 1164 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55903//path} ---- PASS: TestCustomDomainProvider_Patch (0.00s) -=== RUN TestCustomDomainProvider_Delete -&{2025-08-22 00:07:41.5008391 +0530 IST m=+0.785212001 528 00000000000000000000000000000000 204 DELETE http://127.0.0.1:55905//path} ---- PASS: TestCustomDomainProvider_Delete (0.00s) -=== RUN TestHttpService_OAuthError ---- PASS: TestHttpService_OAuthError (0.00s) -=== RUN TestHTTPService_HealthCheck -2025/08/22 00:07:41 http: superfluous response.WriteHeader call from gofr.dev/pkg/gofr/service.initializeTest.func1 (health_test.go:116) -&{2025-08-22 00:07:41.5027214 +0530 IST m=+0.787094301 536 00000000000000000000000000000000 200 GET http://127.0.0.1:55907/.well-known/alive} ---- PASS: TestHTTPService_HealthCheck (0.00s) -=== RUN TestHTTPService_HealthCheckCustomURL -2025/08/22 00:07:41 http: superfluous response.WriteHeader call from gofr.dev/pkg/gofr/service.initializeTest.func1 (health_test.go:116) -&{2025-08-22 00:07:41.5038441 +0530 IST m=+0.788217001 1156 00000000000000000000000000000000 200 GET http://127.0.0.1:55909/.well-known/ready} ---- PASS: TestHTTPService_HealthCheckCustomURL (0.00s) -=== RUN TestHTTPService_HealthCheckErrorResponse -&{0xc0003e80c0 Get "http://test/.well-known/alive": dial tcp: lookup test: no such host} ---- PASS: TestHTTPService_HealthCheckErrorResponse (2.73s) -=== RUN TestHTTPService_HealthCheckDifferentStatusCode -&{2025-08-22 00:07:44.2324765 +0530 IST m=+3.516849401 2589 00000000000000000000000000000000 400 GET http://127.0.0.1:55911/.well-known/bad-request} ---- PASS: TestHTTPService_HealthCheckDifferentStatusCode (0.00s) -=== RUN TestHTTPService_HealthCheckTimeout ---- PASS: TestHTTPService_HealthCheckTimeout (1.00s) -=== RUN TestLog_PrettyPrint ---- PASS: TestLog_PrettyPrint (0.00s) -=== RUN TestErrorLog_PrettyPrint ---- PASS: TestErrorLog_PrettyPrint (0.00s) -=== RUN Test_ColorForStatusCode ---- PASS: Test_ColorForStatusCode (0.00s) -=== RUN TestNewHTTPService -=== RUN TestNewHTTPService/Valid_Address -=== RUN TestNewHTTPService/Empty_Address -=== RUN TestNewHTTPService/Invalid_Address ---- PASS: TestNewHTTPService (0.00s) - --- PASS: TestNewHTTPService/Valid_Address (0.00s) - --- PASS: TestNewHTTPService/Empty_Address (0.00s) - --- PASS: TestNewHTTPService/Invalid_Address (0.00s) -=== RUN TestHTTPService_createAndSendRequest -&{2025-08-22 00:07:45.2368383 +0530 IST m=+4.521211201 1662 00000000000000000000000000000000 200 POST http://127.0.0.1:55915/test-path} -&{2025-08-22 00:07:45.239082 +0530 IST m=+4.523454901 1183 00000000000000000000000000000000 200 POST http://127.0.0.1:55917/test-path} -&{2025-08-22 00:07:45.2402655 +0530 IST m=+4.524638401 1652 00000000000000000000000000000000 200 POST http://127.0.0.1:55919/test-path} -&{2025-08-22 00:07:45.2426713 +0530 IST m=+4.527044201 1201 00000000000000000000000000000000 200 POST http://127.0.0.1:55921/test-path} ---- PASS: TestHTTPService_createAndSendRequest (0.01s) -=== RUN TestHTTPService_Get -&{2025-08-22 00:07:45.2438726 +0530 IST m=+4.528245501 1016 00000000000000000000000000000000 200 GET http://127.0.0.1:55923/test-path} ---- PASS: TestHTTPService_Get (0.00s) -=== RUN TestHTTPService_GetWithHeaders -&{2025-08-22 00:07:45.2460936 +0530 IST m=+4.530466501 1295 00000000000000000000000000000000 200 GET http://127.0.0.1:55925/test-path} ---- PASS: TestHTTPService_GetWithHeaders (0.00s) -=== RUN TestHTTPService_Put -&{2025-08-22 00:07:45.2499973 +0530 IST m=+4.534370201 1178 00000000000000000000000000000000 200 PUT http://127.0.0.1:55927/test-path} ---- PASS: TestHTTPService_Put (0.00s) -=== RUN TestHTTPService_PutWithHeaders -&{2025-08-22 00:07:45.2511753 +0530 IST m=+4.535548201 1233 00000000000000000000000000000000 200 PUT http://127.0.0.1:55929/test-path} ---- PASS: TestHTTPService_PutWithHeaders (0.00s) -=== RUN TestHTTPService_Patch -&{2025-08-22 00:07:45.2540278 +0530 IST m=+4.538400701 0 00000000000000000000000000000000 200 PATCH http://127.0.0.1:55931/test-path} ---- PASS: TestHTTPService_Patch (0.00s) -=== RUN TestHTTPService_PatchWithHeaders -&{2025-08-22 00:07:45.2555649 +0530 IST m=+4.539937801 620 00000000000000000000000000000000 200 PUT http://127.0.0.1:55933/test-path} ---- PASS: TestHTTPService_PatchWithHeaders (0.00s) -=== RUN TestHTTPService_Post -&{2025-08-22 00:07:45.2572839 +0530 IST m=+4.541656801 854 00000000000000000000000000000000 200 POST http://127.0.0.1:55935/test-path} ---- PASS: TestHTTPService_Post (0.00s) -=== RUN TestHTTPService_PostWithHeaders -&{2025-08-22 00:07:45.2586451 +0530 IST m=+4.543018001 0 00000000000000000000000000000000 200 POST http://127.0.0.1:55937/test-path} ---- PASS: TestHTTPService_PostWithHeaders (0.00s) -=== RUN TestHTTPService_Delete -&{2025-08-22 00:07:45.2603349 +0530 IST m=+4.544707801 1825 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55939/test-path} ---- PASS: TestHTTPService_Delete (0.00s) -=== RUN TestHTTPService_DeleteWithHeaders -&{2025-08-22 00:07:45.2627893 +0530 IST m=+4.547162201 601 00000000000000000000000000000000 200 DELETE http://127.0.0.1:55941/test-path} ---- PASS: TestHTTPService_DeleteWithHeaders (0.00s) -=== RUN TestHTTPService_createAndSendRequestCreateRequestFailure ---- PASS: TestHTTPService_createAndSendRequestCreateRequestFailure (0.00s) -=== RUN TestHTTPService_createAndSendRequestServerError -&{0xc0005146c0 Post "/test-path?key=value&name=gofr&name=test": unsupported protocol scheme ""} ---- PASS: TestHTTPService_createAndSendRequestServerError (0.00s) -=== RUN TestNewOAuthConfig -=== RUN TestNewOAuthConfig/Test_case_#0 -=== RUN TestNewOAuthConfig/Test_case_#1 -=== RUN TestNewOAuthConfig/Test_case_#2 -=== RUN TestNewOAuthConfig/Test_case_#3 -=== RUN TestNewOAuthConfig/Test_case_#4 -=== RUN TestNewOAuthConfig/Test_case_#5 -=== RUN TestNewOAuthConfig/Test_case_#6 -=== RUN TestNewOAuthConfig/Test_case_#7 -=== RUN TestNewOAuthConfig/Test_case_#8 -=== RUN TestNewOAuthConfig/Test_case_#9 -=== RUN TestNewOAuthConfig/Test_case_#10 ---- PASS: TestNewOAuthConfig (0.42s) - --- PASS: TestNewOAuthConfig/Test_case_#0 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#1 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#2 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#3 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#4 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#5 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#6 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#7 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#8 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#9 (0.00s) - --- PASS: TestNewOAuthConfig/Test_case_#10 (0.00s) -=== RUN TestHttpService_validateTokenURL -=== RUN TestHttpService_validateTokenURL/Test_Case_#0 -=== RUN TestHttpService_validateTokenURL/Test_Case_#1 -=== RUN TestHttpService_validateTokenURL/Test_Case_#2 -=== RUN TestHttpService_validateTokenURL/Test_Case_#3 -=== RUN TestHttpService_validateTokenURL/Test_Case_#4 -=== RUN TestHttpService_validateTokenURL/Test_Case_#5 -=== RUN TestHttpService_validateTokenURL/Test_Case_#6 -=== RUN TestHttpService_validateTokenURL/Test_Case_#7 -=== RUN TestHttpService_validateTokenURL/Test_Case_#8 -=== RUN TestHttpService_validateTokenURL/Test_Case_#9 ---- PASS: TestHttpService_validateTokenURL (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#0 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#1 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#2 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#3 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#4 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#5 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#6 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#7 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#8 (0.00s) - --- PASS: TestHttpService_validateTokenURL/Test_Case_#9 (0.00s) -=== RUN TestAddAuthorizationHeader_OAuth -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#0 -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#1 -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#2 -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#3 -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#4 -=== RUN TestAddAuthorizationHeader_OAuth/Test_Case_#5 ---- PASS: TestAddAuthorizationHeader_OAuth (0.79s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#0 (0.00s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#1 (0.00s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#2 (0.00s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#3 (0.00s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#4 (0.00s) - --- PASS: TestAddAuthorizationHeader_OAuth/Test_Case_#5 (0.00s) -=== RUN TestResponse_GetHeader ---- PASS: TestResponse_GetHeader (0.00s) -=== RUN TestResponse_GetHeaderNil ---- PASS: TestResponse_GetHeaderNil (0.00s) -=== RUN TestRetryProvider_Get ---- PASS: TestRetryProvider_Get (0.00s) -=== RUN TestRetryProvider_GetWithHeaders ---- PASS: TestRetryProvider_GetWithHeaders (0.00s) -=== RUN TestRetryProvider_Post ---- PASS: TestRetryProvider_Post (0.00s) -=== RUN TestRetryProvider_PostWithHeaders ---- PASS: TestRetryProvider_PostWithHeaders (0.00s) -=== RUN TestRetryProvider_Put ---- PASS: TestRetryProvider_Put (0.00s) -=== RUN TestRetryProvider_PutWithHeaders ---- PASS: TestRetryProvider_PutWithHeaders (0.00s) -=== RUN TestRetryProvider_Patch_WithError -&{2025-08-22 00:07:46.4801745 +0530 IST m=+5.764547401 1083 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} -&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} -&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} -&{2025-08-22 00:07:46.4812581 +0530 IST m=+5.765631001 563 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} -&{2025-08-22 00:07:46.481822 +0530 IST m=+5.766194901 0 00000000000000000000000000000000 500 PATCH http://127.0.0.1:55948//test} ---- PASS: TestRetryProvider_Patch_WithError (0.00s) -=== RUN TestRetryProvider_PatchWithHeaders ---- PASS: TestRetryProvider_PatchWithHeaders (0.00s) -=== RUN TestRetryProvider_Delete ---- PASS: TestRetryProvider_Delete (0.00s) -=== RUN TestRetryProvider_DeleteWithHeaders ---- PASS: TestRetryProvider_DeleteWithHeaders (0.00s) -FAIL -FAIL gofr.dev/pkg/gofr/service 7.924s -? gofr.dev/pkg/gofr/static [no test files] -=== RUN Test_CustomError ---- PASS: Test_CustomError (0.00s) -=== RUN TestStdoutOutputForFunc ---- PASS: TestStdoutOutputForFunc (0.00s) -=== RUN TestStderrOutputForFunc ---- PASS: TestStderrOutputForFunc (0.00s) -=== RUN TestGetFreePort ---- PASS: TestGetFreePort (0.03s) -=== RUN TestNewServerConfigs ---- PASS: TestNewServerConfigs (0.00s) -=== RUN TestServiceConfigs_Get -=== RUN TestServiceConfigs_Get/empty_key -=== RUN TestServiceConfigs_Get/non-empty_key -=== RUN TestServiceConfigs_Get/random_key ---- PASS: TestServiceConfigs_Get (0.00s) - --- PASS: TestServiceConfigs_Get/empty_key (0.00s) - --- PASS: TestServiceConfigs_Get/non-empty_key (0.00s) - --- PASS: TestServiceConfigs_Get/random_key (0.00s) -=== RUN TestServiceConfigs_GetOrDefault -=== RUN TestServiceConfigs_GetOrDefault/empty_key_and_default -=== RUN TestServiceConfigs_GetOrDefault/non-empty_key_with_default -=== RUN TestServiceConfigs_GetOrDefault/random_key_with_default ---- PASS: TestServiceConfigs_GetOrDefault (0.00s) - --- PASS: TestServiceConfigs_GetOrDefault/empty_key_and_default (0.00s) - --- PASS: TestServiceConfigs_GetOrDefault/non-empty_key_with_default (0.00s) - --- PASS: TestServiceConfigs_GetOrDefault/random_key_with_default (0.00s) -PASS -ok gofr.dev/pkg/gofr/testutil (cached) -? gofr.dev/pkg/gofr/version [no test files] -=== RUN TestConnection_Bind_Success -=== RUN TestConnection_Bind_Success/Bind_to_string -=== RUN TestConnection_Bind_Success/Bind_to_JSON_struct ---- PASS: TestConnection_Bind_Success (1.01s) - --- PASS: TestConnection_Bind_Success/Bind_to_string (0.00s) - --- PASS: TestConnection_Bind_Success/Bind_to_JSON_struct (0.00s) -=== RUN TestNewWSUpgrader_WithOptions ---- PASS: TestNewWSUpgrader_WithOptions (0.00s) -=== RUN Test_Upgrade ---- PASS: Test_Upgrade (0.00s) -=== RUN Test_UnimplementedMethods ---- PASS: Test_UnimplementedMethods (0.00s) -=== RUN TestConcurrentWriteMessageCalls ---- PASS: TestConcurrentWriteMessageCalls (0.00s) -=== RUN TestManager_ListConnections ---- PASS: TestManager_ListConnections (0.00s) -=== RUN TestManager_GetConnectionByServiceName ---- PASS: TestManager_GetConnectionByServiceName (0.00s) -=== RUN TestManager_CloseConnection ---- PASS: TestManager_CloseConnection (0.00s) -PASS -ok gofr.dev/pkg/gofr/websocket (cached) -FAIL From f6195eb82458c935699b0b1476e9b1ab3ab0e3f7 Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 13:30:18 +0530 Subject: [PATCH 3/9] formated oracle_test.go in migration --- pkg/gofr/migration/oracle_test.go | 162 +++++++++++++++--------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go index 1648082d9..bb2632b54 100644 --- a/pkg/gofr/migration/oracle_test.go +++ b/pkg/gofr/migration/oracle_test.go @@ -1,109 +1,109 @@ package migration import ( - "database/sql" - "testing" - "time" - "os" "bytes" + "database/sql" + "os" + "testing" + "time" - "github.com/stretchr/testify/assert" - "go.uber.org/mock/gomock" - "gofr.dev/pkg/gofr/container" + "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" + "gofr.dev/pkg/gofr/container" ) func oracleSetup(t *testing.T) (migrator, *MockOracle, *container.Container) { - t.Helper() - ctrl := gomock.NewController(t) - mockContainer, _ := container.NewMockContainer(t) - mockOracle := NewMockOracle(ctrl) - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) - mockContainer.Oracle = mockOracle - return mg, mockOracle, mockContainer + t.Helper() + ctrl := gomock.NewController(t) + mockContainer, _ := container.NewMockContainer(t) + mockOracle := NewMockOracle(ctrl) + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + mockContainer.Oracle = mockOracle + return mg, mockOracle, mockContainer } func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { - mg, mockOracle, mockContainer := oracleSetup(t) - testCases := []struct { - desc string - err error - }{ - {"no error", nil}, - {"connection failed", sql.ErrConnDone}, - } - for i, tc := range testCases { - mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(tc.err) - err := mg.checkAndCreateMigrationTable(mockContainer) - assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) - } + mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { + desc string + err error + }{ + {"no error", nil}, + {"connection failed", sql.ErrConnDone}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(tc.err) + err := mg.checkAndCreateMigrationTable(mockContainer) + assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) + } } func Test_OracleGetLastMigration(t *testing.T) { - mg, mockOracle, mockContainer := oracleSetup(t) - testCases := []struct { - desc string - err error - resp int64 - }{ - {"no error", nil, 0}, - {"connection failed", sql.ErrConnDone, 0}, - } - for i, tc := range testCases { - mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(tc.err) - resp := mg.getLastMigration(mockContainer) - assert.Equal(t, tc.resp, resp, "TEST[%d]: %s failed", i, tc.desc) - } + mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { + desc string + err error + resp int64 + }{ + {"no error", nil, 0}, + {"connection failed", sql.ErrConnDone, 0}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(tc.err) + resp := mg.getLastMigration(mockContainer) + assert.Equal(t, tc.resp, resp, "TEST[%d]: %s failed", i, tc.desc) + } } func Test_OracleCommitMigration(t *testing.T) { - mg, mockOracle, mockContainer := oracleSetup(t) - timeNow := time.Now() - td := transactionData{ - StartTime: timeNow, - MigrationNumber: 10, - } - testCases := []struct { - desc string - err error - }{ - {"no error", nil}, - {"connection failed", sql.ErrConnDone}, - } - for i, tc := range testCases { - mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, - td.MigrationNumber, "UP", td.StartTime, gomock.Any()).Return(tc.err) - err := mg.commitMigration(mockContainer, td) - assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) - } + mg, mockOracle, mockContainer := oracleSetup(t) + timeNow := time.Now() + td := transactionData{ + StartTime: timeNow, + MigrationNumber: 10, + } + testCases := []struct { + desc string + err error + }{ + {"no error", nil}, + {"connection failed", sql.ErrConnDone}, + } + for i, tc := range testCases { + mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, + td.MigrationNumber, "UP", td.StartTime, gomock.Any()).Return(tc.err) + err := mg.commitMigration(mockContainer, td) + assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) + } } func Test_OracleBeginTransaction(t *testing.T) { - logs := captureStdout(func() { - mg, _, mockContainer := oracleSetup(t) - mg.beginTransaction(mockContainer) - }) - assert.Contains(t, logs, "OracleDB Migrator begin successfully") + logs := captureStdout(func() { + mg, _, mockContainer := oracleSetup(t) + mg.beginTransaction(mockContainer) + }) + assert.Contains(t, logs, "OracleDB Migrator begin successfully") } // captureStdout helper to capture stdout during function execution func captureStdout(f func()) string { - old := os.Stdout - r, w, _ := os.Pipe() - os.Stdout = w + old := os.Stdout + r, w, _ := os.Pipe() + os.Stdout = w - outC := make(chan string) - go func() { - var buf bytes.Buffer - _, _ = buf.ReadFrom(r) - outC <- buf.String() - }() + outC := make(chan string) + go func() { + var buf bytes.Buffer + _, _ = buf.ReadFrom(r) + outC <- buf.String() + }() - f() + f() - _ = w.Close() - os.Stdout = old - out := <-outC - return out + _ = w.Close() + os.Stdout = old + out := <-outC + return out } From 89dea5bce0bd06678d53c8e1fd4e0eb525e1c5a5 Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 14:03:10 +0530 Subject: [PATCH 4/9] Fixed linter issue --- pkg/gofr/migration/migration.go | 4 ++-- pkg/gofr/migration/migration_test.go | 13 ++++++------- pkg/gofr/migration/oracle.go | 23 ++++++++++++++++------- pkg/gofr/migration/oracle_test.go | 8 +++++++- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/pkg/gofr/migration/migration.go b/pkg/gofr/migration/migration.go index 0bb5d7b41..6a48ce395 100644 --- a/pkg/gofr/migration/migration.go +++ b/pkg/gofr/migration/migration.go @@ -230,9 +230,9 @@ func initializeDatasources(c *container.Container, ds *Datasource, mg migrator) } func isNil(i any) bool { - // Get the value of the interface + // Get the value of the interface. val := reflect.ValueOf(i) - // If the interface is not assigned or is nil, return true + // If the interface is not assigned or is nil, return true. return !val.IsValid() || val.IsNil() } diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go index 68aa829a8..83c120a76 100644 --- a/pkg/gofr/migration/migration_test.go +++ b/pkg/gofr/migration/migration_test.go @@ -1,7 +1,6 @@ package migration import ( - "context" "database/sql" "testing" "time" @@ -215,11 +214,11 @@ func TestOracleMigration_RunMigrationSuccess(t *testing.T) { ds := Datasource{Oracle: mockOracle} od := oracleDS{Oracle: mockOracle} - _ = od.apply(&ds) // apply migrator wrapper + _ = od.apply(&ds) // apply migrator wrapper. migrationMap := map[int64]Migrate{ 1: {UP: func(d Datasource) error { - return d.Oracle.Exec(context.Background(), "CREATE TABLE test (id INT)") + return d.Oracle.Exec(t.Context(), "CREATE TABLE test (id INT)") }}, } @@ -306,9 +305,9 @@ func TestOracleMigration_BeginTransaction_Logs(t *testing.T) { od := oracleDS{Oracle: mockOracle} mg := od.apply(&ds) - // Capture logs or just call method and rely on it not panicking + // Capture logs or just call method and rely on it not panicking. mg.beginTransaction(mockContainer) - // Log output capture can be added if needed + // Log output capture can be added if needed. } func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) { @@ -317,7 +316,7 @@ func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) mockOracle := NewMockOracle(gomock.NewController(t)) mockContainer, _ := container.NewMockContainer(t) - // Disable all other datasources by setting to nil + // Disable all other datasources by setting to nil. mockContainer.SQL = nil mockContainer.Redis = nil mockContainer.Mongo = nil @@ -331,7 +330,7 @@ func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) mockContainer.ScyllaDB = nil mockContainer.Clickhouse = nil - // Initialize Oracle mock and Logger + // Initialize Oracle mock and Logger. mockContainer.Oracle = mockOracle mockContainer.Logger = logging.NewMockLogger(logging.DEBUG) diff --git a/pkg/gofr/migration/oracle.go b/pkg/gofr/migration/oracle.go index 4d037a8fb..1a4fef742 100644 --- a/pkg/gofr/migration/oracle.go +++ b/pkg/gofr/migration/oracle.go @@ -2,8 +2,9 @@ package migration import ( "context" - "gofr.dev/pkg/gofr/container" "time" + + "gofr.dev/pkg/gofr/container" ) type oracleDS struct { @@ -15,7 +16,7 @@ type oracleMigrator struct { migrator } -// Provides a wrapper to apply the oracle migrator logic +// Provides a wrapper to apply the oracle migrator logic. func (od oracleDS) apply(m migrator) migrator { return oracleMigrator{ Oracle: od.Oracle, @@ -48,53 +49,61 @@ VALUES (:1, :2, :3, :4) ` ) -// Create migration table if it doesn't exist +// Create migration table if it doesn't exist. func (om oracleMigrator) checkAndCreateMigrationTable(_ *container.Container) error { return om.Oracle.Exec(context.Background(), CheckAndCreateOracleMigrationTable) } -// Get the last applied migration version +// Get the last applied migration version. func (om oracleMigrator) getLastMigration(c *container.Container) int64 { type LastMigration struct { LastMigration int64 `db:"last_migration"` } var lastMigrations []LastMigration + var lastMigration int64 err := om.Oracle.Select(context.Background(), &lastMigrations, getLastOracleGoFrMigration) if err != nil { return 0 } + if len(lastMigrations) != 0 { lastMigration = lastMigrations[0].LastMigration } + lm2 := om.migrator.getLastMigration(c) + if lm2 > lastMigration { return lm2 } + return lastMigration } -// Begin a new migration transaction +// Begin a new migration transaction. func (om oracleMigrator) beginTransaction(c *container.Container) transactionData { td := om.migrator.beginTransaction(c) c.Debug("OracleDB Migrator begin successfully") + return td } -// Commit the migration +// Commit the migration. func (om oracleMigrator) commitMigration(c *container.Container, data transactionData) error { err := om.Oracle.Exec(context.Background(), insertOracleGoFrMigrationRow, data.MigrationNumber, "UP", data.StartTime, time.Since(data.StartTime).Milliseconds()) if err != nil { return err } + c.Debugf("inserted record for migration %v in oracle gofr_migrations table", data.MigrationNumber) + return om.migrator.commitMigration(c, data) } -// Rollback the migration +// Rollback the migration. func (om oracleMigrator) rollback(c *container.Container, data transactionData) { om.migrator.rollback(c, data) c.Fatalf("migration %v failed and rolled back", data.MigrationNumber) diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go index bb2632b54..56f4576dd 100644 --- a/pkg/gofr/migration/oracle_test.go +++ b/pkg/gofr/migration/oracle_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" + "gofr.dev/pkg/gofr/container" ) @@ -33,6 +34,7 @@ func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { {"no error", nil}, {"connection failed", sql.ErrConnDone}, } + for i, tc := range testCases { mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(tc.err) err := mg.checkAndCreateMigrationTable(mockContainer) @@ -50,8 +52,10 @@ func Test_OracleGetLastMigration(t *testing.T) { {"no error", nil, 0}, {"connection failed", sql.ErrConnDone, 0}, } + for i, tc := range testCases { mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(tc.err) + resp := mg.getLastMigration(mockContainer) assert.Equal(t, tc.resp, resp, "TEST[%d]: %s failed", i, tc.desc) } @@ -71,9 +75,11 @@ func Test_OracleCommitMigration(t *testing.T) { {"no error", nil}, {"connection failed", sql.ErrConnDone}, } + for i, tc := range testCases { mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, td.MigrationNumber, "UP", td.StartTime, gomock.Any()).Return(tc.err) + err := mg.commitMigration(mockContainer, td) assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) } @@ -87,7 +93,7 @@ func Test_OracleBeginTransaction(t *testing.T) { assert.Contains(t, logs, "OracleDB Migrator begin successfully") } -// captureStdout helper to capture stdout during function execution +// captureStdout helper to capture stdout during function execution. func captureStdout(f func()) string { old := os.Stdout r, w, _ := os.Pipe() From 871df9d7f350207042843d884efb1e0c9b3a64cb Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 18:34:28 +0530 Subject: [PATCH 5/9] Fixed linter issue --- pkg/gofr/migration/oracle_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go index 56f4576dd..b98fa5203 100644 --- a/pkg/gofr/migration/oracle_test.go +++ b/pkg/gofr/migration/oracle_test.go @@ -22,6 +22,7 @@ func oracleSetup(t *testing.T) (migrator, *MockOracle, *container.Container) { od := oracleDS{Oracle: mockOracle} mg := od.apply(&ds) mockContainer.Oracle = mockOracle + return mg, mockOracle, mockContainer } @@ -111,5 +112,6 @@ func captureStdout(f func()) string { _ = w.Close() os.Stdout = old out := <-outC + return out } From e40bf1274556de680ec9aafcde483fb05a294f6f Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 23 Aug 2025 18:38:59 +0530 Subject: [PATCH 6/9] Fixed code quality issue --- pkg/gofr/migration/migration_test.go | 1 - pkg/gofr/migration/oracle_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go index 83c120a76..f83fa0624 100644 --- a/pkg/gofr/migration/migration_test.go +++ b/pkg/gofr/migration/migration_test.go @@ -307,7 +307,6 @@ func TestOracleMigration_BeginTransaction_Logs(t *testing.T) { // Capture logs or just call method and rely on it not panicking. mg.beginTransaction(mockContainer) - // Log output capture can be added if needed. } func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) { diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go index b98fa5203..82b4c15d2 100644 --- a/pkg/gofr/migration/oracle_test.go +++ b/pkg/gofr/migration/oracle_test.go @@ -112,6 +112,6 @@ func captureStdout(f func()) string { _ = w.Close() os.Stdout = old out := <-outC - + return out } From df77d068ebc410cfa7de98eae9b27a063136172f Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Sat, 30 Aug 2025 01:14:42 +0530 Subject: [PATCH 7/9] fixed code issues --- pkg/gofr/datasource/file/Hello_world/Hello.txt | 0 pkg/gofr/datasource/file/temp.csv | 1 - pkg/gofr/datasource/file/temp.json | 1 - pkg/gofr/datasource/file/temp.txt | 1 - pkg/gofr/migration/migration_test.go | 1 + 5 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 pkg/gofr/datasource/file/Hello_world/Hello.txt delete mode 100644 pkg/gofr/datasource/file/temp.csv delete mode 100644 pkg/gofr/datasource/file/temp.json delete mode 100644 pkg/gofr/datasource/file/temp.txt diff --git a/pkg/gofr/datasource/file/Hello_world/Hello.txt b/pkg/gofr/datasource/file/Hello_world/Hello.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/pkg/gofr/datasource/file/temp.csv b/pkg/gofr/datasource/file/temp.csv deleted file mode 100644 index f188557e3..000000000 --- a/pkg/gofr/datasource/file/temp.csv +++ /dev/null @@ -1 +0,0 @@ -Name,Age,Email \ No newline at end of file diff --git a/pkg/gofr/datasource/file/temp.json b/pkg/gofr/datasource/file/temp.json deleted file mode 100644 index b9379f078..000000000 --- a/pkg/gofr/datasource/file/temp.json +++ /dev/null @@ -1 +0,0 @@ -!@#$%^&* \ No newline at end of file diff --git a/pkg/gofr/datasource/file/temp.txt b/pkg/gofr/datasource/file/temp.txt deleted file mode 100644 index 21c39bdf5..000000000 --- a/pkg/gofr/datasource/file/temp.txt +++ /dev/null @@ -1 +0,0 @@ -some new content \ No newline at end of file diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go index f83fa0624..f73a6370e 100644 --- a/pkg/gofr/migration/migration_test.go +++ b/pkg/gofr/migration/migration_test.go @@ -203,6 +203,7 @@ func initializeClickHouseRunMocks(t *testing.T) (*MockClickhouse, *container.Con mockContainer.Elasticsearch = nil mockContainer.OpenTSDB = nil mockContainer.ScyllaDB = nil + mockContainer.Oracle = nil mockContainer.Logger = logging.NewMockLogger(logging.DEBUG) mockContainer.Clickhouse = mockClickHouse From b5435eeee0c4fbabd85e9dac34e152a7b745ed22 Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Wed, 3 Sep 2025 23:26:11 +0530 Subject: [PATCH 8/9] Fix the conflict error --- pkg/gofr/migration/interface.go | 2 - pkg/gofr/migration/migration_test.go | 128 ----------------------- pkg/gofr/migration/mock_interface.go | 15 --- pkg/gofr/migration/oracle.go | 4 +- pkg/gofr/migration/oracle_test.go | 150 +++++++++++++++++++++++++-- 5 files changed, 144 insertions(+), 155 deletions(-) diff --git a/pkg/gofr/migration/interface.go b/pkg/gofr/migration/interface.go index a3a748a86..1c5935c7c 100644 --- a/pkg/gofr/migration/interface.go +++ b/pkg/gofr/migration/interface.go @@ -42,8 +42,6 @@ type Clickhouse interface { type Oracle interface { Select(ctx context.Context, dest any, query string, args ...any) error Exec(ctx context.Context, query string, args ...any) error - - HealthCheck(ctx context.Context) (any, error) } type Cassandra interface { diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go index f73a6370e..8f60b41f4 100644 --- a/pkg/gofr/migration/migration_test.go +++ b/pkg/gofr/migration/migration_test.go @@ -3,7 +3,6 @@ package migration import ( "database/sql" "testing" - "time" "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" @@ -209,130 +208,3 @@ func initializeClickHouseRunMocks(t *testing.T) (*MockClickhouse, *container.Con return mockClickHouse, mockContainer } - -func TestOracleMigration_RunMigrationSuccess(t *testing.T) { - mockOracle, mockContainer := initializeOracleRunMocks(t) - - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - _ = od.apply(&ds) // apply migrator wrapper. - - migrationMap := map[int64]Migrate{ - 1: {UP: func(d Datasource) error { - return d.Oracle.Exec(t.Context(), "CREATE TABLE test (id INT)") - }}, - } - - mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(nil) - mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(nil) - mockOracle.EXPECT().Exec(gomock.Any(), "CREATE TABLE test (id INT)").Return(nil) - mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, int64(1), "UP", gomock.Any(), gomock.Any()).Return(nil) - - Run(migrationMap, mockContainer) -} - -func TestOracleMigration_FailCreateMigrationTable(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - mockOracle := NewMockOracle(ctrl) - mockContainer, _ := container.NewMockContainer(t) - mockContainer.Oracle = mockOracle - - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) - - mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(sql.ErrConnDone) - - err := mg.checkAndCreateMigrationTable(mockContainer) - assert.Equal(t, sql.ErrConnDone, err) -} - -func TestOracleMigration_GetLastMigration_ReturnsZeroOnError(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - mockOracle := NewMockOracle(ctrl) - mockContainer, _ := container.NewMockContainer(t) - mockContainer.Oracle = mockOracle - - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) - - mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(sql.ErrConnDone) - - lastMigration := mg.getLastMigration(mockContainer) - assert.Equal(t, int64(0), lastMigration) -} - -func TestOracleMigration_CommitMigration(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - mockOracle := NewMockOracle(ctrl) - mockContainer, _ := container.NewMockContainer(t) - mockContainer.Oracle = mockOracle - - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) - - td := transactionData{ - StartTime: time.Now(), - MigrationNumber: 42, - } - - mockOracle.EXPECT(). - Exec(gomock.Any(), insertOracleGoFrMigrationRow, - td.MigrationNumber, "UP", td.StartTime, gomock.Any()). - Return(nil) - - err := mg.commitMigration(mockContainer, td) - assert.NoError(t, err) -} - -func TestOracleMigration_BeginTransaction_Logs(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - mockOracle := NewMockOracle(ctrl) - mockContainer, _ := container.NewMockContainer(t) - mockContainer.Logger = logging.NewLogger(logging.DEBUG) - mockContainer.Oracle = mockOracle - - ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) - - // Capture logs or just call method and rely on it not panicking. - mg.beginTransaction(mockContainer) -} - -func initializeOracleRunMocks(t *testing.T) (*MockOracle, *container.Container) { - t.Helper() - - mockOracle := NewMockOracle(gomock.NewController(t)) - mockContainer, _ := container.NewMockContainer(t) - - // Disable all other datasources by setting to nil. - mockContainer.SQL = nil - mockContainer.Redis = nil - mockContainer.Mongo = nil - mockContainer.Cassandra = nil - mockContainer.PubSub = nil - mockContainer.ArangoDB = nil - mockContainer.SurrealDB = nil - mockContainer.DGraph = nil - mockContainer.Elasticsearch = nil - mockContainer.OpenTSDB = nil - mockContainer.ScyllaDB = nil - mockContainer.Clickhouse = nil - - // Initialize Oracle mock and Logger. - mockContainer.Oracle = mockOracle - mockContainer.Logger = logging.NewMockLogger(logging.DEBUG) - - return mockOracle, mockContainer -} diff --git a/pkg/gofr/migration/mock_interface.go b/pkg/gofr/migration/mock_interface.go index e8002920a..b7ce885d7 100644 --- a/pkg/gofr/migration/mock_interface.go +++ b/pkg/gofr/migration/mock_interface.go @@ -439,21 +439,6 @@ func (mr *MockOracleMockRecorder) Exec(ctx, query any, args ...any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockOracle)(nil).Exec), varargs...) } -// HealthCheck mocks base method. -func (m *MockOracle) HealthCheck(ctx context.Context) (any, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HealthCheck", ctx) - ret0, _ := ret[0].(any) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// HealthCheck indicates an expected call of HealthCheck. -func (mr *MockOracleMockRecorder) HealthCheck(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockOracle)(nil).HealthCheck), ctx) -} - // Select mocks base method. func (m *MockOracle) Select(ctx context.Context, dest any, query string, args ...any) error { m.ctrl.T.Helper() diff --git a/pkg/gofr/migration/oracle.go b/pkg/gofr/migration/oracle.go index 1a4fef742..75055e203 100644 --- a/pkg/gofr/migration/oracle.go +++ b/pkg/gofr/migration/oracle.go @@ -25,7 +25,7 @@ func (od oracleDS) apply(m migrator) migrator { } const ( - CheckAndCreateOracleMigrationTable = ` + checkAndCreateOracleMigrationTable = ` BEGIN EXECUTE IMMEDIATE 'CREATE TABLE gofr_migrations ( version NUMBER NOT NULL, @@ -51,7 +51,7 @@ VALUES (:1, :2, :3, :4) // Create migration table if it doesn't exist. func (om oracleMigrator) checkAndCreateMigrationTable(_ *container.Container) error { - return om.Oracle.Exec(context.Background(), CheckAndCreateOracleMigrationTable) + return om.Oracle.Exec(context.Background(), checkAndCreateOracleMigrationTable) } // Get the last applied migration version. diff --git a/pkg/gofr/migration/oracle_test.go b/pkg/gofr/migration/oracle_test.go index 82b4c15d2..43b9be0ee 100644 --- a/pkg/gofr/migration/oracle_test.go +++ b/pkg/gofr/migration/oracle_test.go @@ -11,23 +11,29 @@ import ( "go.uber.org/mock/gomock" "gofr.dev/pkg/gofr/container" + "gofr.dev/pkg/gofr/logging" ) -func oracleSetup(t *testing.T) (migrator, *MockOracle, *container.Container) { +func oracleSetup(t *testing.T) (migrator, *container.MockOracleDB, *container.Container) { t.Helper() - ctrl := gomock.NewController(t) - mockContainer, _ := container.NewMockContainer(t) - mockOracle := NewMockOracle(ctrl) + + mockContainer, mocks := container.NewMockContainer(t) + + mockOracle := mocks.Oracle + ds := Datasource{Oracle: mockOracle} - od := oracleDS{Oracle: mockOracle} - mg := od.apply(&ds) + + oracleDB := oracleDS{Oracle: mockOracle} + migrationWithOracle := oracleDB.apply(&ds) + mockContainer.Oracle = mockOracle - return mg, mockOracle, mockContainer + return migrationWithOracle, mockOracle, mockContainer } func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { desc string err error @@ -37,7 +43,7 @@ func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { } for i, tc := range testCases { - mockOracle.EXPECT().Exec(gomock.Any(), CheckAndCreateOracleMigrationTable).Return(tc.err) + mockOracle.EXPECT().Exec(gomock.Any(), checkAndCreateOracleMigrationTable).Return(tc.err) err := mg.checkAndCreateMigrationTable(mockContainer) assert.Equal(t, tc.err, err, "TEST[%d]: %s failed", i, tc.desc) } @@ -45,6 +51,7 @@ func Test_OracleCheckAndCreateMigrationTable(t *testing.T) { func Test_OracleGetLastMigration(t *testing.T) { mg, mockOracle, mockContainer := oracleSetup(t) + testCases := []struct { desc string err error @@ -115,3 +122,130 @@ func captureStdout(f func()) string { return out } + +func TestOracleMigration_RunMigrationSuccess(t *testing.T) { + mockOracle, mockContainer := initializeOracleRunMocks(t) + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + _ = od.apply(&ds) // apply migrator wrapper. + + migrationMap := map[int64]Migrate{ + 1: {UP: func(d Datasource) error { + return d.Oracle.Exec(t.Context(), "CREATE TABLE test (id INT)") + }}, + } + + mockOracle.EXPECT().Exec(gomock.Any(), checkAndCreateOracleMigrationTable).Return(nil) + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(nil) + mockOracle.EXPECT().Exec(gomock.Any(), "CREATE TABLE test (id INT)").Return(nil) + mockOracle.EXPECT().Exec(gomock.Any(), insertOracleGoFrMigrationRow, int64(1), "UP", gomock.Any(), gomock.Any()).Return(nil) + + Run(migrationMap, mockContainer) +} + +func TestOracleMigration_FailCreateMigrationTable(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockContainer, mocks := container.NewMockContainer(t) + mockOracle := mocks.Oracle + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + mockOracle.EXPECT().Exec(gomock.Any(), checkAndCreateOracleMigrationTable).Return(sql.ErrConnDone) + + err := mg.checkAndCreateMigrationTable(mockContainer) + assert.Equal(t, sql.ErrConnDone, err) +} + +func TestOracleMigration_GetLastMigration_ReturnsZeroOnError(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockContainer, mocks := container.NewMockContainer(t) + mockOracle := mocks.Oracle + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + mockOracle.EXPECT().Select(gomock.Any(), gomock.Any(), getLastOracleGoFrMigration).Return(sql.ErrConnDone) + + lastMigration := mg.getLastMigration(mockContainer) + assert.Equal(t, int64(0), lastMigration) +} + +func TestOracleMigration_CommitMigration(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockContainer, mocks := container.NewMockContainer(t) + mockOracle := mocks.Oracle + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + td := transactionData{ + StartTime: time.Now(), + MigrationNumber: 42, + } + + mockOracle.EXPECT(). + Exec(gomock.Any(), insertOracleGoFrMigrationRow, + td.MigrationNumber, "UP", td.StartTime, gomock.Any()). + Return(nil) + + err := mg.commitMigration(mockContainer, td) + assert.NoError(t, err) +} + +func TestOracleMigration_BeginTransaction_Logs(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockContainer, mocks := container.NewMockContainer(t) + mockOracle := mocks.Oracle + mockContainer.Logger = logging.NewLogger(logging.DEBUG) + mockContainer.Oracle = mockOracle + + ds := Datasource{Oracle: mockOracle} + od := oracleDS{Oracle: mockOracle} + mg := od.apply(&ds) + + // Capture logs or just call method and rely on it not panicking. + mg.beginTransaction(mockContainer) +} + +func initializeOracleRunMocks(t *testing.T) (*container.MockOracleDB, *container.Container) { + t.Helper() + + mockContainer, mocks := container.NewMockContainer(t) + mockOracle := mocks.Oracle + + // Disable all other datasources by setting to nil. + mockContainer.SQL = nil + mockContainer.Redis = nil + mockContainer.Mongo = nil + mockContainer.Cassandra = nil + mockContainer.PubSub = nil + mockContainer.ArangoDB = nil + mockContainer.SurrealDB = nil + mockContainer.DGraph = nil + mockContainer.Elasticsearch = nil + mockContainer.OpenTSDB = nil + mockContainer.ScyllaDB = nil + mockContainer.Clickhouse = nil + + // Initialize Oracle mock and Logger. + mockContainer.Oracle = mockOracle + mockContainer.Logger = logging.NewMockLogger(logging.DEBUG) + + return mockOracle, mockContainer +} From 823be588482366bf58bd8b0d8eafce835074515b Mon Sep 17 00:00:00 2001 From: Samar_Singh_Randhawa Date: Wed, 3 Sep 2025 23:26:45 +0530 Subject: [PATCH 9/9] Fix the conflict error --- go.work.sum | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.work.sum b/go.work.sum index a1ada2122..c36d3c7d6 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1157,6 +1157,7 @@ github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8W github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8= github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU= github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= @@ -1397,6 +1398,7 @@ golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMe golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b h1:DU+gwOBXU+6bO0sEyO7o/NeMlxZxCZEvI7v+J4a1zRQ= golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b/go.mod h1:4ZwOYna0/zsOKwuR5X/m0QFOJpSZvAxFfkQT+Erd9D4= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488 h1:3doPGa+Gg4snce233aCWnbZVFsyFMo/dR40KK/6skyE= golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1655,4 +1657,4 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= \ No newline at end of file