diff --git a/contract/pkg/bucket/messages.go b/contract/pkg/bucket/messages.go index 70b5f4f..1386ff3 100644 --- a/contract/pkg/bucket/messages.go +++ b/contract/pkg/bucket/messages.go @@ -56,9 +56,9 @@ type NodeVNodesInfo struct { } type ClusterStatus struct { - ClusterId ClusterId - Cluster Cluster - VNodes []NodeVNodesInfo + ClusterId ClusterId + Cluster Cluster + NodesVNodes []NodeVNodesInfo } type NewCluster struct { diff --git a/contract/pkg/bucket/messages_test.go b/contract/pkg/bucket/messages_test.go index ab3e172..9630991 100644 --- a/contract/pkg/bucket/messages_test.go +++ b/contract/pkg/bucket/messages_test.go @@ -29,9 +29,9 @@ func TestBucketWriteAccess(t *testing.T) { func TestClusterStatus_ReplicationFactor(t *testing.T) { type fields struct { - ClusterId ClusterId - Cluster Cluster - VNodes []NodeVNodesInfo + ClusterId ClusterId + Cluster Cluster + NodesVNodes []NodeVNodesInfo } tests := []struct { name string @@ -72,9 +72,9 @@ func TestClusterStatus_ReplicationFactor(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { c := &ClusterStatus{ - ClusterId: tt.fields.ClusterId, - Cluster: tt.fields.Cluster, - VNodes: tt.fields.VNodes, + ClusterId: tt.fields.ClusterId, + Cluster: tt.fields.Cluster, + NodesVNodes: tt.fields.NodesVNodes, } assert.Equalf(t, tt.want, c.ReplicationFactor(), "ReplicationFactor()") }) diff --git a/contract/pkg/mock/ddc_bucket_contract_mock.go b/contract/pkg/mock/ddc_bucket_contract_mock.go index 98357ed..0edb115 100644 --- a/contract/pkg/mock/ddc_bucket_contract_mock.go +++ b/contract/pkg/mock/ddc_bucket_contract_mock.go @@ -35,10 +35,9 @@ type ( } Cluster struct { - Id uint32 - VNodes []NodeVNodes - Nodes []string - Params string + Id uint32 + NodesVNodes []NodeVNodes + Params string } NodeVNodes struct { @@ -120,13 +119,12 @@ func (d *ddcBucketContractMock) ClusterGet(clusterId uint32) (*bucket.ClusterSta Cluster: bucket.Cluster{ ManagerId: types.AccountID{}, Params: cluster.Params, - NodesKeys: cluster.Nodes, ResourcePerVNode: 32, ResourceUsed: 0, Revenues: types.NewU128(*big.NewInt(1)), TotalRent: types.NewU128(*big.NewInt(1)), }, - VNodes: mapNodesVNodes(cluster.VNodes), + NodesVNodes: mapNodesVNodes(cluster.NodesVNodes), }, nil } }