rbd: update test case for "old" deprecated open

Rename test case to mark the "old" deprecated open func as such.
This also adds a missing bit of coverage to the test.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2019-12-29 16:20:29 -05:00 committed by John Mulligan
parent 674d0e4041
commit 0239a8469d
1 changed files with 7 additions and 1 deletions

View File

@ -238,7 +238,7 @@ func TestGetImageNames(t *testing.T) {
conn.Shutdown()
}
func TestImageOpen(t *testing.T) {
func TestDeprecatedImageOpen(t *testing.T) {
conn := radosConnect(t)
poolname := GetUUID()
@ -256,6 +256,12 @@ func TestImageOpen(t *testing.T) {
err = image.Open(123)
assert.Error(t, err)
// open read-write
err = image.Open()
assert.NoError(t, err)
err = image.Close()
assert.NoError(t, err)
// open read-only
err = image.Open(true)
assert.NoError(t, err)