FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
test_DBInsert.c File Reference

Tests for ununpack DB access function. More...

#include "run_tests.h"
#include "../agent/externs.h"
Include dependency graph for test_DBInsert.c:

Go to the source code of this file.

Functions

int DBInsertInit ()
 initialize
 
int DBInsertClean ()
 clean the database
 
void testDBInsertPfile ()
 test DBInsertPfile function More...
 
void testDBInsertUploadTree ()
 test DBInsertUploadTree function More...
 

Variables

static PGresult * result = NULL
 
static long upload_pk = -1
 
static long pfile_pk = -1
 
char * DBConfFile
 DB conf file location.
 
CU_TestInfo DBInsertPfile_testcases []
 DB insertion test cases (pfile) More...
 
CU_TestInfo DBInsertUploadTree_testcases []
 DB insertion test cases (uploadtree) More...
 

Detailed Description

Tests for ununpack DB access function.

Definition in file test_DBInsert.c.

Function Documentation

void testDBInsertPfile ( )

test DBInsertPfile function

Test:
  1. Call DBInsertPfile() with a sample ContainerInfo
  2. Check if function returns OK

Definition at line 145 of file test_DBInsert.c.

void testDBInsertUploadTree ( )

test DBInsertUploadTree function

Test:
  1. Call DBInsertUploadTree() with sample ContainerInfo
  2. Check if function return OK

Definition at line 164 of file test_DBInsert.c.

Variable Documentation

CU_TestInfo DBInsertPfile_testcases[]
Initial value:
=
{
{"DBInsertPfile:", testDBInsertPfile},
CU_TEST_INFO_NULL
}
void testDBInsertPfile()
test DBInsertPfile function

DB insertion test cases (pfile)

Definition at line 180 of file test_DBInsert.c.

CU_TestInfo DBInsertUploadTree_testcases[]
Initial value:
=
{
{"DBInsertUploadTree:", testDBInsertUploadTree},
CU_TEST_INFO_NULL
}
void testDBInsertUploadTree()
test DBInsertUploadTree function

DB insertion test cases (uploadtree)

Definition at line 185 of file test_DBInsert.c.