Skip to content

Commit b0d8c8c

Browse files
Fixed unit tests
1 parent 4655a37 commit b0d8c8c

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

yb-voyager/src/callhome/diagnostics_test.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,23 @@ func TestCallhomeStructs(t *testing.T) {
5555
name: "Validate SourceDBDetails Struct Definition",
5656
actualType: reflect.TypeOf(SourceDBDetails{}),
5757
expectedType: struct {
58-
Host string `json:"host"`
59-
DBType string `json:"db_type"`
60-
DBVersion string `json:"db_version"`
61-
DBSize int64 `json:"total_db_size_bytes"`
62-
Role string `json:"role,omitempty"`
58+
Host string `json:"host"`
59+
DBType string `json:"db_type"`
60+
DBVersion string `json:"db_version"`
61+
DBSize int64 `json:"total_db_size_bytes"`
62+
Role string `json:"role,omitempty"`
63+
PostgresSystemIdentifier int64 `json:"postgres_system_identifier,omitempty"`
6364
}{},
6465
},
6566
{
6667
name: "Validate TargetDBDetails Struct Definition",
6768
actualType: reflect.TypeOf(TargetDBDetails{}),
6869
expectedType: struct {
69-
Host string `json:"host"`
70-
DBVersion string `json:"db_version"`
71-
NodeCount int `json:"node_count"`
72-
Cores int `json:"total_cores"`
70+
Host string `json:"host"`
71+
DBVersion string `json:"db_version"`
72+
NodeCount int `json:"node_count"`
73+
Cores int `json:"total_cores"`
74+
YugabyteClusterUUID string `json:"yugabyte_cluster_uuid,omitempty"`
7375
}{},
7476
},
7577
{
@@ -114,12 +116,12 @@ func TestCallhomeStructs(t *testing.T) {
114116
ColocatedTables []string `json:"colocated_tables"`
115117
ColocatedReasoning string `json:"colocated_reasoning"`
116118
ShardedTables []string `json:"sharded_tables"`
117-
NumNodes float64 `json:"num_nodes"`
118-
VCPUsPerInstance int `json:"vcpus_per_instance"`
119-
MemoryPerInstance int `json:"memory_per_instance"`
120-
OptimalSelectConnectionsPerNode int64 `json:"optimal_select_connections_per_node"`
121-
OptimalInsertConnectionsPerNode int64 `json:"optimal_insert_connections_per_node"`
122-
EstimatedTimeInMinForImport float64 `json:"estimated_time_in_min_for_import"`
119+
NumNodes float64 `json:"num_nodes"`
120+
VCPUsPerInstance int `json:"vcpus_per_instance"`
121+
MemoryPerInstance int `json:"memory_per_instance"`
122+
OptimalSelectConnectionsPerNode int64 `json:"optimal_select_connections_per_node"`
123+
OptimalInsertConnectionsPerNode int64 `json:"optimal_insert_connections_per_node"`
124+
EstimatedTimeInMinForImport float64 `json:"estimated_time_in_min_for_import"`
123125
}{},
124126
},
125127
{

0 commit comments

Comments
 (0)