Test: aligned without-restconf docker test with fcgi/native
Test: Fixed test_privileges
This commit is contained in:
parent
220ad29269
commit
39d3e533c3
3 changed files with 26 additions and 9 deletions
|
|
@ -42,6 +42,9 @@ RUN apk add --update git make build-base gcc flex bison curl-dev
|
|||
# For netsnmp
|
||||
RUN apk add --update net-snmp net-snmp-dev
|
||||
|
||||
# For groupadd/groupdel
|
||||
RUN apk add --update shadow
|
||||
|
||||
# Checkout standard YANG models for tests (note >1G for full repo)
|
||||
RUN mkdir -p /usr/local/share/yang
|
||||
WORKDIR /usr/local/share/yang
|
||||
|
|
@ -61,17 +64,17 @@ RUN git clone https://github.com/clicon/cligen.git
|
|||
|
||||
# Build cligen
|
||||
WORKDIR /clixon/cligen
|
||||
RUN ./configure --prefix=/usr/local
|
||||
RUN ./configure --prefix=/usr/local --sysconfdir=/etc
|
||||
RUN make
|
||||
RUN make DESTDIR=/clixon/build install
|
||||
|
||||
# Copy Clixon from local dir
|
||||
RUN mkdir /clixon/clixon
|
||||
RUN mkdir -p /clixon/clixon
|
||||
WORKDIR /clixon/clixon
|
||||
COPY clixon .
|
||||
|
||||
# Configure, build and install clixon
|
||||
RUN ./configure --prefix=/usr/local --with-cligen=/clixon/build --without-restconf --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp --with-mib-generated-yang-dir=/usr/local/share/mib-yangs/
|
||||
RUN ./configure --prefix=/usr/local --sysconfdir=/etc --with-cligen=/clixon/build --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp --with-mib-generated-yang-dir=/usr/local/share/mib-yangs/ -without-restconf
|
||||
RUN make
|
||||
RUN make DESTDIR=/clixon/build install
|
||||
|
||||
|
|
@ -80,6 +83,13 @@ WORKDIR /clixon/clixon/util
|
|||
RUN make
|
||||
RUN make DESTDIR=/clixon/build install
|
||||
|
||||
# Build and install the clixon example
|
||||
WORKDIR /clixon/clixon/example/main
|
||||
RUN make
|
||||
RUN make DESTDIR=/clixon/build install
|
||||
RUN mkdir -p /clixon/build/etc
|
||||
RUN install example.xml /clixon/build/etc/clixon.xml
|
||||
|
||||
# Copy tests
|
||||
WORKDIR /clixon/clixon/test
|
||||
RUN install -d /clixon/build/usr/local/bin/test
|
||||
|
|
@ -87,6 +97,9 @@ RUN install *.sh /clixon/build/usr/local/bin/test
|
|||
RUN install *.exp /clixon/build/usr/local/bin/test
|
||||
RUN install clixon.png /clixon/build/usr/local/bin/test
|
||||
|
||||
RUN install -d /clixon/build/mibs
|
||||
RUN install mibs/* /clixon/build/mibs
|
||||
|
||||
# Copy startscript
|
||||
WORKDIR /clixon
|
||||
COPY startsystem.sh startsystem.sh
|
||||
|
|
|
|||
|
|
@ -31,12 +31,16 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
#
|
||||
# Clixon dockerfile with fcgi restconf
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER Olof Hagsand <olof@hagsand.se>
|
||||
|
||||
# For clixon and cligen
|
||||
RUN apk add --update git make build-base gcc flex bison fcgi-dev curl-dev
|
||||
RUN apk add --update git make build-base gcc flex bison curl-dev
|
||||
|
||||
# For fcgi
|
||||
RUN apk add --update fcgi-dev
|
||||
|
||||
# For netsnmp
|
||||
RUN apk add --update net-snmp net-snmp-dev
|
||||
|
|
@ -78,7 +82,7 @@ RUN adduser -D -H -G www-data www-data
|
|||
RUN apk add --update nginx
|
||||
|
||||
# Configure, build and install clixon
|
||||
RUN ./configure --prefix=/usr/local --sysconfdir=/etc --with-cligen=/clixon/build --with-restconf=fcgi --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp --with-mib-generated-yang-dir=/usr/local/share/mib-yangs/
|
||||
RUN ./configure --prefix=/usr/local --sysconfdir=/etc --with-cligen=/clixon/build --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp --with-mib-generated-yang-dir=/usr/local/share/mib-yangs/ --with-restconf=fcgi
|
||||
RUN make
|
||||
RUN make DESTDIR=/clixon/build install
|
||||
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@ cfg=$dir/conf_startup.xml
|
|||
fyang=$dir/clixon-example.yang
|
||||
|
||||
# Here $dir is created by the user that runs the script
|
||||
|
||||
# Cant be anything in root since it breaks some privileges
|
||||
cat <<EOF > $cfg
|
||||
<clixon-config xmlns="http://clicon.org/config">
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
<CLICON_YANG_DIR>${YANG_INSTALLDIR}</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_MAIN_FILE>$fyang</CLICON_YANG_MAIN_FILE>
|
||||
<CLICON_SOCK>/var/run/$APPNAME.sock</CLICON_SOCK>
|
||||
<CLICON_BACKEND_PIDFILE>/var/run/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
|
||||
<CLICON_SOCK>$dir/$APPNAME.sock</CLICON_SOCK>
|
||||
<CLICON_BACKEND_PIDFILE>$dir/$APPNAME.pidfile</CLICON_BACKEND_PIDFILE>
|
||||
<CLICON_XMLDB_DIR>$dir</CLICON_XMLDB_DIR>
|
||||
</clixon-config>
|
||||
EOF
|
||||
|
|
@ -87,7 +87,7 @@ function testrun(){
|
|||
if [ $expecterr -eq 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
err
|
||||
err 1 $expecterr
|
||||
fi
|
||||
|
||||
new "Number of clixon_backend processes"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue