FOSSology  4.4.0
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

◆ testDBInsertPfile()

void testDBInsertPfile ( )

test DBInsertPfile function

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

Definition at line 134 of file test_DBInsert.c.

◆ testDBInsertUploadTree()

void testDBInsertUploadTree ( )

test DBInsertUploadTree function

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

Definition at line 153 of file test_DBInsert.c.

Variable Documentation

◆ DBInsertPfile_testcases

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 169 of file test_DBInsert.c.

◆ DBInsertUploadTree_testcases

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 174 of file test_DBInsert.c.