66 "syscall"
77 "testing"
88
9- smartvolapi "github.com/gluster/glusterd2/plugins/smartvol /api"
9+ "github.com/gluster/glusterd2/pkg /api"
1010
1111 "github.com/stretchr/testify/require"
1212)
@@ -32,12 +32,12 @@ func testSmartVolumeDistribute(t *testing.T) {
3232 r := require .New (t )
3333 smartvolname := formatVolName (t .Name ())
3434 // create Distribute 3 Volume
35- createReq := smartvolapi .VolCreateReq {
35+ createReq := api .VolCreateReq {
3636 Name : smartvolname ,
3737 Size : 60 ,
3838 DistributeCount : 3 ,
3939 }
40- volinfo , err := client .SmartVolumeCreate (createReq )
40+ volinfo , err := client .VolumeCreate (createReq )
4141 r .Nil (err )
4242
4343 r .Len (volinfo .Subvols , 3 )
@@ -57,12 +57,12 @@ func testSmartVolumeReplicate2(t *testing.T) {
5757 r := require .New (t )
5858 smartvolname := formatVolName (t .Name ())
5959 // create Replica 2 Volume
60- createReq := smartvolapi .VolCreateReq {
60+ createReq := api .VolCreateReq {
6161 Name : smartvolname ,
6262 Size : 20 ,
6363 ReplicaCount : 2 ,
6464 }
65- volinfo , err := client .SmartVolumeCreate (createReq )
65+ volinfo , err := client .VolumeCreate (createReq )
6666 r .Nil (err )
6767
6868 r .Len (volinfo .Subvols , 1 )
@@ -80,12 +80,12 @@ func testSmartVolumeReplicate3(t *testing.T) {
8080
8181 smartvolname := formatVolName (t .Name ())
8282 // create Replica 3 Volume
83- createReq := smartvolapi .VolCreateReq {
83+ createReq := api .VolCreateReq {
8484 Name : smartvolname ,
8585 Size : 20 ,
8686 ReplicaCount : 3 ,
8787 }
88- volinfo , err := client .SmartVolumeCreate (createReq )
88+ volinfo , err := client .VolumeCreate (createReq )
8989 r .Nil (err )
9090
9191 r .Len (volinfo .Subvols , 1 )
@@ -103,13 +103,13 @@ func testSmartVolumeArbiter(t *testing.T) {
103103
104104 smartvolname := formatVolName (t .Name ())
105105 // create Replica 3 Arbiter Volume
106- createReq := smartvolapi .VolCreateReq {
106+ createReq := api .VolCreateReq {
107107 Name : smartvolname ,
108108 Size : 20 ,
109109 ReplicaCount : 3 ,
110110 ArbiterCount : 1 ,
111111 }
112- volinfo , err := client .SmartVolumeCreate (createReq )
112+ volinfo , err := client .VolumeCreate (createReq )
113113 r .Nil (err )
114114
115115 r .Len (volinfo .Subvols , 1 )
@@ -132,12 +132,12 @@ func testSmartVolumeDisperse(t *testing.T) {
132132 smartvolname := formatVolName (t .Name ())
133133
134134 // create Disperse Volume
135- createReq := smartvolapi .VolCreateReq {
135+ createReq := api .VolCreateReq {
136136 Name : smartvolname ,
137137 Size : 40 ,
138138 DisperseCount : 3 ,
139139 }
140- volinfo , err := client .SmartVolumeCreate (createReq )
140+ volinfo , err := client .VolumeCreate (createReq )
141141 r .Nil (err )
142142
143143 r .Len (volinfo .Subvols , 1 )
@@ -157,14 +157,14 @@ func testSmartVolumeDistributeReplicate(t *testing.T) {
157157 smartvolname := formatVolName (t .Name ())
158158
159159 // create Distribute Replicate(2x3) Volume
160- createReq := smartvolapi .VolCreateReq {
160+ createReq := api .VolCreateReq {
161161 Name : smartvolname ,
162162 Size : 40 ,
163163 DistributeCount : 2 ,
164164 ReplicaCount : 3 ,
165165 SubvolZonesOverlap : true ,
166166 }
167- volinfo , err := client .SmartVolumeCreate (createReq )
167+ volinfo , err := client .VolumeCreate (createReq )
168168 r .Nil (err )
169169
170170 r .Len (volinfo .Subvols , 2 )
@@ -188,14 +188,14 @@ func testSmartVolumeDistributeDisperse(t *testing.T) {
188188 smartvolname := formatVolName (t .Name ())
189189
190190 // create Distribute Disperse(2x3) Volume
191- createReq := smartvolapi .VolCreateReq {
191+ createReq := api .VolCreateReq {
192192 Name : smartvolname ,
193193 Size : 80 ,
194194 DistributeCount : 2 ,
195195 DisperseCount : 3 ,
196196 SubvolZonesOverlap : true ,
197197 }
198- volinfo , err := client .SmartVolumeCreate (createReq )
198+ volinfo , err := client .VolumeCreate (createReq )
199199 r .Nil (err )
200200
201201 r .Len (volinfo .Subvols , 2 )
@@ -216,10 +216,10 @@ func testSmartVolumeDistributeDisperse(t *testing.T) {
216216func testSmartVolumeWithoutName (t * testing.T ) {
217217 r := require .New (t )
218218
219- createReq := smartvolapi .VolCreateReq {
219+ createReq := api .VolCreateReq {
220220 Size : 20 ,
221221 }
222- volinfo , err := client .SmartVolumeCreate (createReq )
222+ volinfo , err := client .VolumeCreate (createReq )
223223 r .Nil (err )
224224
225225 r .Nil (client .VolumeDelete (volinfo .Name ))
0 commit comments