---
 src/plm/apitest/test_saPlmEntityGroupCreate.c |  21 ++++++
 src/plm/apitest/test_saPlmEntityGroupRemove.c | 103 ++++++++++++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/src/plm/apitest/test_saPlmEntityGroupCreate.c 
b/src/plm/apitest/test_saPlmEntityGroupCreate.c
index 538466e..33535ab 100644
--- a/src/plm/apitest/test_saPlmEntityGroupCreate.c
+++ b/src/plm/apitest/test_saPlmEntityGroupCreate.c
@@ -90,6 +90,12 @@ void saPlmEntityGroupRemove_15(void);
 void saPlmEntityGroupRemove_16(void);
 void saPlmEntityGroupRemove_17(void);
 void saPlmEntityGroupRemove_18(void);
+void saPlmEntityGroupRemove_19(void);
+void saPlmEntityGroupRemove_20(void);
+void saPlmEntityGroupRemove_21(void);
+void saPlmEntityGroupRemove_22(void);
+void saPlmEntityGroupRemove_23(void);
+
 
 __attribute__((constructor)) static void
 saPlmEntityGroupCreate_constructor(void)
@@ -207,6 +213,21 @@ saPlmEntityGroupCreate_constructor(void)
        test_case_add(
            2, saPlmEntityGroupRemove_18,
            "saPlmEntityGroupRemove_18 to remove a entity which does not belong 
to group SA_AIS_ERR_NOT_EXIST ");
+       test_case_add(
+            2, saPlmEntityGroupRemove_19,
+            "saPlmEntityGroupRemove_19 to pass a invalid group handle 
SA_AIS_ERR_BAD_HANDLE ");
+        test_case_add(
+            2, saPlmEntityGroupRemove_20,
+            "saPlmEntityGroupRemove_20 to pass invalid pointer to entity names 
SA_AIS_ERR_INVALID_PARAM ");
+        test_case_add(
+            2, saPlmEntityGroupRemove_21,
+            "saPlmEntityGroupRemove_21 to pass invalid pointer to entity names 
and invalid entityNamesNumber SA_AIS_ERR_INVALID_PARAM ");
+        test_case_add(
+            2, saPlmEntityGroupRemove_22,
+            "saPlmEntityGroupRemove_22 to pass invalid group handle and 
invalid pointer to entity names SA_AIS_ERR_INVALID_PARAM ");
+        test_case_add(
+            2, saPlmEntityGroupRemove_23,
+            "saPlmEntityGroupRemove_23 to pass invalid group handle and 
entityNamesNumber SA_AIS_ERR_BAD_HANDLE ");
        test_case_add(2, saPlmEntityGroupDelete_01,
                      "saPlmEntityGroupDelete_01 - SA_AIS_OK ");
        test_case_add(
diff --git a/src/plm/apitest/test_saPlmEntityGroupRemove.c 
b/src/plm/apitest/test_saPlmEntityGroupRemove.c
index 6c3cf15..53c9789 100644
--- a/src/plm/apitest/test_saPlmEntityGroupRemove.c
+++ b/src/plm/apitest/test_saPlmEntityGroupRemove.c
@@ -288,3 +288,106 @@ void saPlmEntityGroupRemove_18(void)
        test_validate(rc, SA_AIS_ERR_NOT_EXIST);
        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
 }
+
+void saPlmEntityGroupRemove_18(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(entityGroupHandle, &f120_slot_1_eedn,
+                                    entityNamesNumber);
+        test_validate(rc, SA_AIS_ERR_NOT_EXIST);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+void saPlmEntityGroupRemove_19(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(-1, &f120_slot_1_dn, entityNamesNumber);
+        test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+}
+
+void saPlmEntityGroupRemove_20(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(entityGroupHandle, 0, entityNamesNumber);
+        test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+void saPlmEntityGroupRemove_21(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(entityGroupHandle, 0, -1);
+        test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+void saPlmEntityGroupRemove_22(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(-1, 0, entityNamesNumber);
+        test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
+
+void saPlmEntityGroupRemove_23(void)
+{
+        SaPlmCallbacksT plms_cbks;
+        plms_cbks.saPlmReadinessTrackCallback = &TrackCallbackT;
+        safassert(saPlmInitialize(&plmHandle, &plms_cbks, &PlmVersion),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupCreate(plmHandle, &entityGroupHandle),
+                  SA_AIS_OK);
+        safassert(saPlmEntityGroupAdd(entityGroupHandle, &f120_slot_1_dn,
+                                      entityNamesNumber,
+                                      SA_PLM_GROUP_SINGLE_ENTITY),
+                  SA_AIS_OK);
+        rc = saPlmEntityGroupRemove(-1, &f120_slot_1_dn, -1);
+        test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+        safassert(saPlmFinalize(plmHandle), SA_AIS_OK);
+}
-- 
2.7.4



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to