Skip to content

Commit

Permalink
Revert "fix(zcncore): used zcncore.MakeSCRestAPICall instead of zboxu…
Browse files Browse the repository at this point in the history
…til.MakeSCRestAPICall (#514)"

This reverts commit bc117eb.
  • Loading branch information
Kishan-Dhakan committed Feb 14, 2023
1 parent 68cc37e commit 3ba1590
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ require (
github.com/subosito/gotenv v1.4.1 // indirect
go.dedis.ch/fixbuf v1.0.3 // indirect
go.dedis.ch/kyber/v3 v3.0.14 // indirect
golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458 // indirect
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect
golang.org/x/text v0.3.8 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 h1:3Moaxt4TfzNcQH6DWvlYKraN1ozhBXQHcgvXjRGeim0=
golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s=
golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458 h1:MgJ6t2zo8v0tbmLCueaCbF1RM+TtB0rs3Lv8DGtOIpY=
golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
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=
Expand Down Expand Up @@ -372,8 +372,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4=
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -382,8 +382,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
2 changes: 1 addition & 1 deletion tests/cli_tests/zboxcli_blobber_config_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func TestBlobberConfigUpdate(testSetup *testing.T) {
output, err = updateBlobberInfo(t, configPath, createParams(map[string]interface{}{"blobber_id": "invalid-blobber-id"}))
require.NotNil(t, err, strings.Join(output, "\n"))
require.Len(t, output, 2)
require.Equal(t, "zcn: object not found", output[1])
require.Equal(t, "internal_error: missing blobber: invalid-blobber-id", output[1])
})

t.RunSequentially("update with invalid blobber wallet/owner should fail", func(t *test.SystemTest) {
Expand Down
3 changes: 1 addition & 2 deletions tests/cli_tests/zboxcli_create_allocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ func TestCreateAllocation(testSetup *testing.T) {
output, err := createNewAllocationWithoutRetry(t, configPath, createParams(options))
require.NotNil(t, err, strings.Join(output, "\n"))
require.True(t, len(output) > 0, "expected output length be at least 1")
require.Equal(t, "Error creating allocation: failed_get_allocation_blobbers: failed to get blobbers for allocation: {\"error\":\"not enough blobbers to honor the allocation\"}",
output[0], strings.Join(output, "\n"))
require.Equal(t, "Error creating allocation: failed_get_allocation_blobbers: failed to get blobbers for allocation: not enough blobbers to honor the allocation", output[0], strings.Join(output, "\n"))
})

t.Run("Create allocation with size smaller than limit (size < 1024) Should Fail", func(t *test.SystemTest) {
Expand Down
6 changes: 4 additions & 2 deletions tests/cli_tests/zboxcli_create_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ func TestCreateDir(testSetup *testing.T) {
output, err = createDirForWallet(t, configPath, wallet, true, "", true, "/root", false)
require.NotNil(t, err, "Expecting create dir failure %s", strings.Join(output, "\n"))
require.Len(t, output, 1)
require.Equal(t, "Error fetching the allocation allocation_fetch_error: Error fetching the allocation.zcn: object not found", output[0])
require.Equal(t, "Error fetching the allocation allocation_fetch_error: "+
"Error fetching the allocation.internal_error: can't get allocation: error retrieving allocation: , error: record not found", output[0])
})

t.Run("create attempt with invalid allocation", func(t *test.SystemTest) {
Expand All @@ -280,7 +281,8 @@ func TestCreateDir(testSetup *testing.T) {
output, err = createDir(t, configPath, "invalidallocation", "/root", false)
require.NotNil(t, err, "Expecting create dir failure %s", strings.Join(output, "\n"))
require.Len(t, output, 1)
require.Equal(t, "Error fetching the allocation allocation_fetch_error: Error fetching the allocation.zcn: object not found", output[0])
require.Equal(t, "Error fetching the allocation allocation_fetch_error: Error fetching the allocation.internal_error: "+
"can't get allocation: error retrieving allocation: invalidallocation, error: record not found", output[0])
})

t.Run("create attempt with someone else's allocation", func(t *test.SystemTest) {
Expand Down
3 changes: 2 additions & 1 deletion tests/cli_tests/zboxcli_file_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ func TestDownload(testSetup *testing.T) {
require.NotNil(t, err, strings.Join(output, "\n"))
require.Len(t, output, 1)

require.Equal(t, "Error fetching the allocation allocation_fetch_error: Error fetching the allocation.zcn: object not found", output[0])
require.Equal(t, "Error fetching the allocation allocation_fetch_error: "+
"Error fetching the allocation.internal_error: can't get allocation: error retrieving allocation: 12334qe, error: record not found", output[0])
})

t.Run("Download File from Other's Allocation Should Fail", func(t *test.SystemTest) {
Expand Down
2 changes: 1 addition & 1 deletion tests/cli_tests/zboxcli_file_upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func TestUpload(testSetup *testing.T) {
require.Len(t, output, 1)

expected := "Error fetching the allocation. allocation_fetch_error: " +
"Error fetching the allocation.zcn: object not found"
"Error fetching the allocation.internal_error: can't get allocation: error retrieving allocation: ab12mn34as90, error: record not found"
require.Equal(t, expected, output[0])
})

Expand Down
5 changes: 3 additions & 2 deletions tests/cli_tests/zboxcli_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,9 @@ func TestSyncWithBlobbers(testSetup *testing.T) {

require.GreaterOrEqual(t, len(output), 4, "unexpected number of lines in output", strings.Join(output, "\n"))

require.Equal(t, "Error fetching the allocation allocation_fetch_error: Error fetching the allocation.zcn: object not found",
output[3], strings.Join(output, "\n"))
require.Equal(t, "Error fetching the allocation allocation_fetch_error: "+
"Error fetching the allocation.internal_error: can't get allocation: error retrieving allocation: "+
"invalid-allocation-id, error: record not found", output[3], strings.Join(output, "\n"))
})
}

Expand Down

0 comments on commit 3ba1590

Please sign in to comment.