FOSSology  4.4.0
Open Source License Compliance by Open Source Software
testDBLoadGold.c File Reference

testing for the function DBLoadGold More...

#include <CUnit/CUnit.h>
#include "wget_agent.h"
#include "../utility.h"
#include <string.h>
#include <ctype.h>
#include "libfodbreposysconf.h"
Include dependency graph for testDBLoadGold.c:

Go to the source code of this file.

Functions

int DBLoadGoldInit ()
 initialize More...
 
int DBLoadGoldClean ()
 Clean the env.
 
void string_tolower (char *string)
 Convert a string to lower case. More...
 
void testDBLoadGold ()
 Function to test DBLoadGold. More...
 

Variables

static PGresult * result = NULL
 
fo_confsysconfig
 
static fo_dbManagerdbManager
 
CU_TestInfo testcases_DBLoadGold []
 testcases for function DBLoadGold More...
 

Detailed Description

testing for the function DBLoadGold

Definition in file testDBLoadGold.c.

Function Documentation

◆ DBLoadGoldInit()

int DBLoadGoldInit ( )

initialize

At first download one file(dir), save as one tar file

  1. Create db
  2. Set
  3. Delete the record that upload_filename is wget.tar, pre testing
  4. Insert upload wget.tar
  5. Get upload id

Definition at line 32 of file testDBLoadGold.c.

◆ string_tolower()

void string_tolower ( char *  string)

Convert a string to lower case.

Parameters
[in,out]stringThe string will be converted to lower case

Definition at line 139 of file testDBLoadGold.c.

◆ testDBLoadGold()

void testDBLoadGold ( )

Function to test DBLoadGold.

Test:
  1. Call DBLoadGold()
  2. Get the data from pfile table
  3. Check if the file exists in file system

Definition at line 158 of file testDBLoadGold.c.

Variable Documentation

◆ sysconfig

fo_conf* sysconfig
extern

System configuration settings

Definition at line 49 of file libfossscheduler.c.

◆ testcases_DBLoadGold

CU_TestInfo testcases_DBLoadGold[]
Initial value:
=
{
{"DBLoadGold:Insert", testDBLoadGold},
CU_TEST_INFO_NULL
}
void testDBLoadGold()
Function to test DBLoadGold.

testcases for function DBLoadGold

Definition at line 215 of file testDBLoadGold.c.