Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestHTTPDirectory.cpp File Reference
#include "FileItem.h"
#include "FileItemList.h"
#include "URL.h"
#include "filesystem/CurlFile.h"
#include "filesystem/HTTPDirectory.h"
#include "network/WebServer.h"
#include "network/httprequesthandler/HTTPVfsHandler.h"
#include "settings/MediaSourceSettings.h"
#include "test/TestUtils.h"
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
#include "utils/XTimeUtils.h"
#include <random>
#include <stdlib.h>
#include <gtest/gtest.h>

Classes

class  TestHTTPDirectory
 

Macros

#define WEBSERVER_HOST   "localhost"
 
#define SOURCE_PATH   "xbmc/filesystem/test/data/httpdirectory/"
 
#define TEST_FILE_APACHE_DEFAULT   "apache-default.html"
 
#define TEST_FILE_APACHE_FANCY   "apache-fancy.html"
 
#define TEST_FILE_APACHE_HTML   "apache-html.html"
 
#define TEST_FILE_BASIC   "basic.html"
 
#define TEST_FILE_BASIC_MULTILINE   "basic-multiline.html"
 
#define TEST_FILE_LIGHTTP_DEFAULT   "lighttp-default.html"
 
#define TEST_FILE_NGINX_DEFAULT   "nginx-default.html"
 
#define TEST_FILE_NGINX_FANCYINDEX   "nginx-fancyindex.html"
 
#define SAMPLE_ITEM_COUNT   6
 
#define SAMPLE_ITEM_1_LABEL   "folder1"
 
#define SAMPLE_ITEM_2_LABEL   "folder2"
 
#define SAMPLE_ITEM_3_LABEL   "sample3: the sampling.mpg"
 
#define SAMPLE_ITEM_4_LABEL   "sample & samplability 4.mpg"
 
#define SAMPLE_ITEM_5_LABEL   "sample5.mpg"
 
#define SAMPLE_ITEM_6_LABEL   "sample6.mpg"
 
#define SAMPLE_ITEM_1_SIZE   0
 
#define SAMPLE_ITEM_2_SIZE   0
 
#define SAMPLE_ITEM_3_SIZE   123
 
#define SAMPLE_ITEM_4_SIZE   125952
 
#define SAMPLE_ITEM_5_SIZE   128974848
 
#define SAMPLE_ITEM_6_SIZE   132070244352
 
#define SAMPLE_ITEM_1_DATETIME   "2019-01-01 01:01:00"
 
#define SAMPLE_ITEM_2_DATETIME   "2019-02-02 02:02:00"
 
#define SAMPLE_ITEM_3_DATETIME   "2019-03-03 03:03:00"
 
#define SAMPLE_ITEM_4_DATETIME   "2019-04-04 04:04:00"
 
#define SAMPLE_ITEM_5_DATETIME   "2019-05-05 05:05:00"
 
#define SAMPLE_ITEM_6_DATETIME   "2019-06-06 06:06:00"
 

Functions

 TEST_F (TestHTTPDirectory, IsStarted)
 
 TEST_F (TestHTTPDirectory, ApacheDefaultIndex)
 
 TEST_F (TestHTTPDirectory, ApacheFancyIndex)
 
 TEST_F (TestHTTPDirectory, ApacheHtmlIndex)
 
 TEST_F (TestHTTPDirectory, BasicIndex)
 
 TEST_F (TestHTTPDirectory, BasicMultilineIndex)
 
 TEST_F (TestHTTPDirectory, LighttpDefaultIndex)
 
 TEST_F (TestHTTPDirectory, NginxDefaultIndex)
 
 TEST_F (TestHTTPDirectory, NginxFancyIndex)
 

Macro Definition Documentation

◆ SAMPLE_ITEM_1_DATETIME

#define SAMPLE_ITEM_1_DATETIME   "2019-01-01 01:01:00"

◆ SAMPLE_ITEM_1_LABEL

#define SAMPLE_ITEM_1_LABEL   "folder1"

◆ SAMPLE_ITEM_1_SIZE

#define SAMPLE_ITEM_1_SIZE   0

◆ SAMPLE_ITEM_2_DATETIME

#define SAMPLE_ITEM_2_DATETIME   "2019-02-02 02:02:00"

◆ SAMPLE_ITEM_2_LABEL

#define SAMPLE_ITEM_2_LABEL   "folder2"

◆ SAMPLE_ITEM_2_SIZE

#define SAMPLE_ITEM_2_SIZE   0

◆ SAMPLE_ITEM_3_DATETIME

#define SAMPLE_ITEM_3_DATETIME   "2019-03-03 03:03:00"

◆ SAMPLE_ITEM_3_LABEL

#define SAMPLE_ITEM_3_LABEL   "sample3: the sampling.mpg"

◆ SAMPLE_ITEM_3_SIZE

#define SAMPLE_ITEM_3_SIZE   123

◆ SAMPLE_ITEM_4_DATETIME

#define SAMPLE_ITEM_4_DATETIME   "2019-04-04 04:04:00"

◆ SAMPLE_ITEM_4_LABEL

#define SAMPLE_ITEM_4_LABEL   "sample & samplability 4.mpg"

◆ SAMPLE_ITEM_4_SIZE

#define SAMPLE_ITEM_4_SIZE   125952

◆ SAMPLE_ITEM_5_DATETIME

#define SAMPLE_ITEM_5_DATETIME   "2019-05-05 05:05:00"

◆ SAMPLE_ITEM_5_LABEL

#define SAMPLE_ITEM_5_LABEL   "sample5.mpg"

◆ SAMPLE_ITEM_5_SIZE

#define SAMPLE_ITEM_5_SIZE   128974848

◆ SAMPLE_ITEM_6_DATETIME

#define SAMPLE_ITEM_6_DATETIME   "2019-06-06 06:06:00"

◆ SAMPLE_ITEM_6_LABEL

#define SAMPLE_ITEM_6_LABEL   "sample6.mpg"

◆ SAMPLE_ITEM_6_SIZE

#define SAMPLE_ITEM_6_SIZE   132070244352

◆ SAMPLE_ITEM_COUNT

#define SAMPLE_ITEM_COUNT   6

◆ SOURCE_PATH

#define SOURCE_PATH   "xbmc/filesystem/test/data/httpdirectory/"

◆ TEST_FILE_APACHE_DEFAULT

#define TEST_FILE_APACHE_DEFAULT   "apache-default.html"

◆ TEST_FILE_APACHE_FANCY

#define TEST_FILE_APACHE_FANCY   "apache-fancy.html"

◆ TEST_FILE_APACHE_HTML

#define TEST_FILE_APACHE_HTML   "apache-html.html"

◆ TEST_FILE_BASIC

#define TEST_FILE_BASIC   "basic.html"

◆ TEST_FILE_BASIC_MULTILINE

#define TEST_FILE_BASIC_MULTILINE   "basic-multiline.html"

◆ TEST_FILE_LIGHTTP_DEFAULT

#define TEST_FILE_LIGHTTP_DEFAULT   "lighttp-default.html"

◆ TEST_FILE_NGINX_DEFAULT

#define TEST_FILE_NGINX_DEFAULT   "nginx-default.html"

◆ TEST_FILE_NGINX_FANCYINDEX

#define TEST_FILE_NGINX_FANCYINDEX   "nginx-fancyindex.html"

◆ WEBSERVER_HOST

#define WEBSERVER_HOST   "localhost"

Function Documentation

◆ TEST_F() [1/9]

TEST_F ( TestHTTPDirectory ,
ApacheDefaultIndex  )

◆ TEST_F() [2/9]

TEST_F ( TestHTTPDirectory ,
ApacheFancyIndex  )

◆ TEST_F() [3/9]

TEST_F ( TestHTTPDirectory ,
ApacheHtmlIndex  )

◆ TEST_F() [4/9]

TEST_F ( TestHTTPDirectory ,
BasicIndex  )

◆ TEST_F() [5/9]

TEST_F ( TestHTTPDirectory ,
BasicMultilineIndex  )

◆ TEST_F() [6/9]

TEST_F ( TestHTTPDirectory ,
IsStarted  )

◆ TEST_F() [7/9]

TEST_F ( TestHTTPDirectory ,
LighttpDefaultIndex  )

◆ TEST_F() [8/9]

TEST_F ( TestHTTPDirectory ,
NginxDefaultIndex  )

◆ TEST_F() [9/9]

TEST_F ( TestHTTPDirectory ,
NginxFancyIndex  )