Skip to content

Commit

Permalink
v 1.0.0 - Added functionnal testing - Needs Travis integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ullaakut committed Jun 21, 2016
1 parent 0823107 commit 1f5e9fc
Show file tree
Hide file tree
Showing 24 changed files with 1,138 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/Dockerfile
@@ -0,0 +1,43 @@
FROM ubuntu:15.10

MAINTAINER brendan.leglaunec@etixgroup.com

ENV LD_LIBRARY_PATH="/cctv/libraries"

# install go
RUN apt-get update && apt-get install -y make git wget curl
RUN wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.6.linux-amd64.tar.gz
# set variable env
ENV GOPATH=/go
ENV PATH=$PATH:/go/bin
ENV PATH=$PATH:/usr/local/go/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

# needed for cameradar
RUN apt-get update && apt-get install -y \
nmap \
libmysqlclient18 \
ffmpeg \
mysql-client \
libgstreamer1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
libcurl4-openssl-dev

RUN apt-get install -y psmisc

ADD cctv_*_Debug_Linux.tar.gz /
RUN mv cctv_*_Debug_Linux cctv

# create cameradaratest folder in go src path
RUN mkdir -p /go/src/cameradartest
ADD ./conf /conf
ADD ./docker/run_cameradartest.sh /run.sh

# get go deps
RUN go get github.com/go-sql-driver/mysql

RUN mkdir /thumbnails
WORKDIR /go/src/cameradartest
CMD ["/run.sh"]
14 changes: 14 additions & 0 deletions test/Dockerfile-camera
@@ -0,0 +1,14 @@
FROM ubuntu:15.10
MAINTAINER brendan.leglaunec@etixgroup.com

RUN useradd -m vlc; \
apt-get update; \
apt-get install -y vlc-nox

RUN sed -i s/geteuid/getppid/g /usr/bin/vlc

ADD ./docker/screen.png /vlc/screen.png
COPY ./docker/run_vlc.sh /start.sh
COPY ./etix_rtsp_server /etix_rtsp_server

EXPOSE 8554
14 changes: 14 additions & 0 deletions test/conf/cameradar.conf.json
@@ -0,0 +1,14 @@
{
"mysql_db" : {
"host" : "0.0.0.0",
"port" : 3306,
"user": "root",
"password": "root",
"db_name": "cctv"
},
"subnets" : "172.16.100.13 localhost",
"ports" : "554,8554", // if not specified, default will be 1-65535
"rtsp_url_file" : "conf/url.json",
"rtsp_ids_file" : "conf/ids.json",
"thumbnail_storage_path" : "/ce/que/tu/veux"
}
44 changes: 44 additions & 0 deletions test/conf/cameratest.conf.json
@@ -0,0 +1,44 @@
{
"Output": "cameratest.log.xml",

"Cameradar" : {
"Path": "/home/ullaakut/Work/cctv_server2/cameradar/test/cameradar",
"Args": "-l 1 -c tmp_config",
"Ports": "554,5554,8554",
"IdsPath": "conf/ids.json",
"RoutesPath": "conf/url.json",
"ThumbPath": "/home/ullaakut/.cctv",
"dbHost": "0.0.0.0",
"dbPort": 3306,
"dbUser": "root",
"dbPassword": "root",
"dbName": "cctv",
"Console": false
},
"Tests" : [
{
"address" : "127.0.0.1",
"password" : "",
"port" : "8554",
"route" : "live.sdp",
"username" : "",
"valid" : true
},
{
"address" : "172.16.100.11",
"password" : "",
"port" : "553",
"route" : "live.sdp",
"username" : "admin",
"valid" : false
},
{
"address" : "172.16.100.13",
"password" : "",
"port" : "554",
"route" : "live.sdp",
"username" : "admin",
"valid" : true
}
]
}
31 changes: 31 additions & 0 deletions test/conf/ids.json
@@ -0,0 +1,31 @@
{
"username": [
"",
"admin",
"Admin",
"root",
"supervisor",
"ubnt"
],
"password" : [
"",
"admin",
"9999",
"123456",
"pass",
"camera",
"1234",
"12345",
"fliradmin",
"system",
"jvc",
"meinsm",
"root",
"4321",
"1111111",
"password",
"ikwd",
"supervisor",
"ubnt"
]
}
77 changes: 77 additions & 0 deletions test/conf/url.json
@@ -0,0 +1,77 @@
{
"urls" : [
"/",
"/1.AMP",
"/1/stream1",
"/CAM_ID.password.mp2",
"/GetData.cgi",
"/MediaInput/h264",
"/MediaInput/mpeg4",
"/VideoInput/1/h264/1",
"/access_code",
"/access_name_for_stream_1_to_5",
"/av0_0",
"/av2",
"/avn=2",
"/axis-media/media.amp",
"/cam",
"/cam0_0",
"/cam0_1",
"/cam1/h264",
"/cam1/h264/multicast",
"/cam1/mjpeg",
"/cam1/mpeg4",
"/camera.stm",
"/ch0",
"/ch001.sdp",
"/ch0_unicast_firststream",
"/ch0_unicast_secondstream",
"/channel1",
"/h264",
"/h264/media.amp",
"/image.mpg",
"/img/media.sav",
"/img/video.asf",
"/img/video.sav",
"/ioImage/1",
"/ipcam.sdp",
"/ipcam_h264.sdp",
"/live.sdp",
"/live/h264",
"/live/mpeg4",
"/live_mpeg4.sdp",
"/livestream",
"/livestream/",
"/media/media.amp",
"/media/video1",
"/mjpeg/media.smp",
"/mp4",
"/mpeg4",
"/mpeg4/1/media.amp",
"/mpeg4/media.amp",
"/mpeg4/media.smp",
"/mpeg4unicast",
"/mpg4/rtsp.amp",
"/multicaststream",
"/now.mp4",
"/nph-h264.cgi",
"/nphMpeg4/g726-640x",
"/nphMpeg4/g726-640x480",
"/nphMpeg4/nil-320x240",
"/play1.sdp",
"/play2.sdp",
"/rtpvideo1.sdp",
"/rtsp_tunnel",
"/rtsph264",
"/stream1",
"/user.pin.mp2",
"/user_defined",
"/video",
"/video.3gp",
"/video.mp4",
"/video1",
"/video1+audio1",
"/vis",
"/wfov"
]
}
18 changes: 18 additions & 0 deletions test/docker/cameratest.conf.tmpl.json
@@ -0,0 +1,18 @@
{
"Output": "cameratest.log.xml",
"Cameradar" : {
"Path": "/cctv/bin/cameradar",
"Args": "-l 1 -c tmp_config",
"Ports": "554,5554,8554,5548",
"IdsPath": "/conf/ids.json",
"RoutesPath": "/conf/url.json",
"ThumbPath": "/thumbnails",
"dbHost": "mysql_cameradar",
"dbPort": 3306,
"dbUser": "root",
"dbPassword": "root",
"dbName": "cctv",
"Console": false
},
"Tests" : __CAMERAS__
}
31 changes: 31 additions & 0 deletions test/docker/conf/ids.json
@@ -0,0 +1,31 @@
{
"username": [
"",
"admin",
"Admin",
"root",
"supervisor",
"ubnt"
],
"password" : [
"",
"admin",
"9999",
"123456",
"pass",
"camera",
"1234",
"12345",
"fliradmin",
"system",
"jvc",
"meinsm",
"root",
"4321",
"1111111",
"password",
"ikwd",
"supervisor",
"ubnt"
]
}
77 changes: 77 additions & 0 deletions test/docker/conf/url.json
@@ -0,0 +1,77 @@
{
"urls" : [
"/",
"/1.AMP",
"/1/stream1",
"/CAM_ID.password.mp2",
"/GetData.cgi",
"/MediaInput/h264",
"/MediaInput/mpeg4",
"/VideoInput/1/h264/1",
"/access_code",
"/access_name_for_stream_1_to_5",
"/av0_0",
"/av2",
"/avn=2",
"/axis-media/media.amp",
"/cam",
"/cam0_0",
"/cam0_1",
"/cam1/h264",
"/cam1/h264/multicast",
"/cam1/mjpeg",
"/cam1/mpeg4",
"/camera.stm",
"/ch0",
"/ch001.sdp",
"/ch0_unicast_firststream",
"/ch0_unicast_secondstream",
"/channel1",
"/h264",
"/h264/media.amp",
"/image.mpg",
"/img/media.sav",
"/img/video.asf",
"/img/video.sav",
"/ioImage/1",
"/ipcam.sdp",
"/ipcam_h264.sdp",
"/live.sdp",
"/live/h264",
"/live/mpeg4",
"/live_mpeg4.sdp",
"/livestream",
"/livestream/",
"/media/media.amp",
"/media/video1",
"/mjpeg/media.smp",
"/mp4",
"/mpeg4",
"/mpeg4/1/media.amp",
"/mpeg4/media.amp",
"/mpeg4/media.smp",
"/mpeg4unicast",
"/mpg4/rtsp.amp",
"/multicaststream",
"/now.mp4",
"/nph-h264.cgi",
"/nphMpeg4/g726-640x",
"/nphMpeg4/g726-640x480",
"/nphMpeg4/nil-320x240",
"/play1.sdp",
"/play2.sdp",
"/rtpvideo1.sdp",
"/rtsp_tunnel",
"/rtsph264",
"/stream1",
"/user.pin.mp2",
"/user_defined",
"/video",
"/video.3gp",
"/video.mp4",
"/video1",
"/video1+audio1",
"/vis",
"/wfov"
]
}

0 comments on commit 1f5e9fc

Please sign in to comment.