[Openvas-commits] r5634 - in trunk/openvas-manager: . src/tests
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Oct 20 00:18:02 CEST 2009
Author: mattm
Date: 2009-10-20 00:18:01 +0200 (Tue, 20 Oct 2009)
New Revision: 5634
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/tests/omp_start_task_0.c
Log:
* src/tests/omp_start_task_0.c: Also expect REPORT_ID in response.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2009-10-19 22:14:30 UTC (rev 5633)
+++ trunk/openvas-manager/ChangeLog 2009-10-19 22:18:01 UTC (rev 5634)
@@ -1,5 +1,9 @@
2009-10-19 Matthew Mundell <matthew.mundell at intevation.de>
+ * src/tests/omp_start_task_0.c: Also expect REPORT_ID in response.
+
+2009-10-19 Matthew Mundell <matthew.mundell at intevation.de>
+
* src/tests/omp_get_status_5.c: Add FINISHED to REPORT_COUNT in
expected response.
Modified: trunk/openvas-manager/src/tests/omp_start_task_0.c
===================================================================
--- trunk/openvas-manager/src/tests/omp_start_task_0.c 2009-10-19 22:14:30 UTC (rev 5633)
+++ trunk/openvas-manager/src/tests/omp_start_task_0.c 2009-10-19 22:18:01 UTC (rev 5634)
@@ -71,13 +71,19 @@
/* Compare response to expected response. */
- entity_t expected = add_entity (NULL, "start_task_response", NULL);
- add_attribute (expected, "status", "202");
- add_attribute (expected, "status_text", "OK, request submitted");
-
- if (compare_entities (entity, expected))
+ if (strcmp (entity_name (entity), "start_task_response")
+ || (entity_attribute (entity, "status") == NULL)
+ || strcmp (entity_attribute (entity, "status"), "202")
+ || (entity_attribute (entity, "status_text") == NULL)
+ || strcmp (entity_attribute (entity, "status_text"),
+ "OK, request submitted")
+ || (entity_child (entity, "report_id") == NULL)
+#if 0
+ /** @todo Add is_uuid to common.c. */
+ || is_uuid (entity_text (entity_child (entity, "report_id"))) == 0
+#endif
+ )
{
- free_entity (expected);
free_entity (entity);
delete_fail:
omp_delete_task (&session, id);
@@ -87,7 +93,6 @@
return EXIT_FAILURE;
}
- free_entity (expected);
free_entity (entity);
omp_delete_task (&session, id);
free (id);
More information about the Openvas-commits
mailing list