satellite/metainfo: don't rely on exact error name
Change-Id: I7975a00c32891a43b4f1e6dc4f5847201844f2ec
This commit is contained in:
parent
65b17df58e
commit
2c657f594e
@ -49,7 +49,8 @@ func TestMaxOutBuckets(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
err := planet.Uplinks[0].CreateBucket(ctx, planet.Satellites[0], fmt.Sprintf("test%d", limit+1))
|
||||
require.EqualError(t, err, fmt.Sprintf("uplink: bucket: metainfo error: number of allocated buckets (%d) exceeded", limit))
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), fmt.Sprintf("number of allocated buckets (%d) exceeded", limit))
|
||||
})
|
||||
}
|
||||
|
||||
@ -1764,7 +1765,8 @@ func TestMultipartObjectDownloadRejection(t *testing.T) {
|
||||
Index: -1,
|
||||
},
|
||||
})
|
||||
require.EqualError(t, err, "metainfo error: Used uplink version cannot download multipart objects.")
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), "Used uplink version cannot download multipart objects.")
|
||||
|
||||
objects, err = planet.Satellites[0].Metainfo.Metabase.TestingAllCommittedObjects(ctx, planet.Uplinks[0].Projects[0].ID, "pip-third")
|
||||
require.NoError(t, err)
|
||||
@ -1782,7 +1784,8 @@ func TestMultipartObjectDownloadRejection(t *testing.T) {
|
||||
Index: -1,
|
||||
},
|
||||
})
|
||||
require.EqualError(t, err, "metainfo error: Used uplink version cannot download multipart objects.")
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), "Used uplink version cannot download multipart objects.")
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@ func TestNewExcluderFailure(t *testing.T) {
|
||||
errs: []string{
|
||||
`exclusion: node URL error: parse ://: missing protocol scheme`,
|
||||
`exclusion: node URL error: parse "://": missing protocol scheme`,
|
||||
`exclusion: node URL: parse ://: missing protocol scheme`,
|
||||
`exclusion: node URL: parse "://": missing protocol scheme`,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -86,6 +86,8 @@ func TestParseSatelliteURL_Invalid(t *testing.T) {
|
||||
errs: []string{
|
||||
`invalid satellite URL: node URL error: parse ://: missing protocol scheme`,
|
||||
`invalid satellite URL: node URL error: parse "://": missing protocol scheme`,
|
||||
`invalid satellite URL: node URL: parse ://: missing protocol scheme`,
|
||||
`invalid satellite URL: node URL: parse "://": missing protocol scheme`,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -96,7 +98,10 @@ func TestParseSatelliteURL_Invalid(t *testing.T) {
|
||||
{
|
||||
name: "short ID",
|
||||
url: "121RTSDpy@127.0.0.1:7777",
|
||||
errs: []string{"invalid satellite URL: node URL error: node ID error: checksum error"},
|
||||
errs: []string{
|
||||
"invalid satellite URL: node URL error: node ID error: checksum error",
|
||||
"invalid satellite URL: node URL: node ID error: checksum error",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "missing host:port",
|
||||
|
Loading…
Reference in New Issue
Block a user