TESTS: move the default url, lun and iscsi context into a structure
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ test_prout_register_simple(void)
|
||||
logging(LOG_VERBOSE, "Test Persistent Reserve IN REGISTER works.");
|
||||
|
||||
/* register our reservation key with the target */
|
||||
ret = prout_register_and_ignore(iscsic, tgt_lun, key);
|
||||
ret = prout_register_and_ignore(sd->iscsi_ctx, sd->iscsi_lun, key);
|
||||
if (ret == -2) {
|
||||
logging(LOG_NORMAL, "[SKIPPED] PERSISTEN RESERVE OUT is not implemented.");
|
||||
CU_PASS("PERSISTENT RESERVE OUT is not implemented.");
|
||||
@@ -46,18 +46,18 @@ test_prout_register_simple(void)
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* verify we can read the registration */
|
||||
ret = prin_verify_key_presence(iscsic, tgt_lun, key, 1);
|
||||
ret = prin_verify_key_presence(sd->iscsi_ctx, sd->iscsi_lun, key, 1);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* try to reregister, which should fail */
|
||||
ret = prout_reregister_key_fails(iscsic, tgt_lun, key+1);
|
||||
ret = prout_reregister_key_fails(sd->iscsi_ctx, sd->iscsi_lun, key+1);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* release from the target */
|
||||
ret = prout_register_key(iscsic, tgt_lun, 0, key);
|
||||
ret = prout_register_key(sd->iscsi_ctx, sd->iscsi_lun, 0, key);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
|
||||
/* Verify the registration is gone */
|
||||
ret = prin_verify_key_presence(iscsic, tgt_lun, key, 0);
|
||||
ret = prin_verify_key_presence(sd->iscsi_ctx, sd->iscsi_lun, key, 0);
|
||||
CU_ASSERT_EQUAL(ret, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user