Test: fixed snmp for docker/fcgi
This commit is contained in:
parent
b0d38a513c
commit
bb069aa7b8
4 changed files with 19 additions and 6 deletions
|
|
@ -41,9 +41,12 @@ RUN apk add --update git make build-base gcc flex bison fcgi-dev curl-dev
|
|||
# For netsnmp
|
||||
RUN apk add --update net-snmp net-snmp-dev
|
||||
|
||||
# Checkut standard YANG models for tests (note >1G for full repo)
|
||||
WORKDIR /usr/local/share
|
||||
# Checkut models
|
||||
WORKDIR /usr/local/share/
|
||||
|
||||
# Checkout standard YANG models for tests (note >1G for full repo)
|
||||
RUN mkdir yang
|
||||
|
||||
WORKDIR /usr/local/share/yang
|
||||
|
||||
RUN git config --global init.defaultBranch master
|
||||
|
|
@ -55,6 +58,12 @@ RUN echo "experimental/" >> .git/info/sparse-checkout
|
|||
|
||||
RUN git pull origin main
|
||||
|
||||
RUN mkdir /usr/local/share/openconfig
|
||||
WORKDIR /usr/local/share/openconfig
|
||||
|
||||
# Checkut Openconfig models for tests
|
||||
RUN git clone https://github.com/openconfig/public
|
||||
|
||||
# Create a directory to hold source-code, dependencies etc
|
||||
RUN mkdir /clixon
|
||||
RUN mkdir /clixon/build
|
||||
|
|
@ -102,6 +111,9 @@ RUN install *.sh /clixon/build/bin/test
|
|||
RUN install *.exp /clixon/build/bin/test
|
||||
RUN install clixon.png /clixon/build/bin/test
|
||||
|
||||
RUN install -d /clixon/build/mibs
|
||||
RUN install mibs/* /clixon/build/mibs
|
||||
|
||||
# Copy startscript
|
||||
WORKDIR /clixon
|
||||
COPY startsystem_fcgi.sh startsystem.sh
|
||||
|
|
@ -148,6 +160,7 @@ RUN adduser www-data clicon
|
|||
COPY --from=0 /clixon/build/ /usr/local/
|
||||
COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/
|
||||
COPY --from=0 /usr/local/share/mib-yangs/* /usr/local/share/mib-yangs/
|
||||
COPY --from=0 /clixon/build/mibs/* /usr/share/snmp/mibs/
|
||||
|
||||
# Manually created
|
||||
RUN mkdir /www-data
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ RUN git clone https://github.com/openconfig/public
|
|||
|
||||
# Create a directory to hold source-code, dependencies etc
|
||||
RUN mkdir /clixon
|
||||
|
||||
RUN mkdir /clixon/build
|
||||
WORKDIR /clixon
|
||||
|
||||
|
|
@ -107,7 +106,7 @@ RUN make
|
|||
RUN make install
|
||||
RUN install example.xml /clixon/build/etc/clixon.xml
|
||||
|
||||
# Copy tests (why not everything?)
|
||||
# Copy tests
|
||||
WORKDIR /clixon/clixon/test
|
||||
RUN install -d /clixon/build/bin/test
|
||||
RUN install *.sh /clixon/build/bin/test
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ set -ux # e but clixon_backend may fail if test is run in parallell
|
|||
|
||||
>&2 echo "$0"
|
||||
|
||||
DBG=${DBG:-0}
|
||||
# If set, enable debugging (of backend and restconf daemons)
|
||||
: ${DBG:=0}
|
||||
|
||||
# Initiate clixon configuration (env variable)
|
||||
echo "$CONFIG" > /usr/local/etc/clixon.xml
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ $sshcmd sudo ./yangmodels.sh
|
|||
|
||||
# Run tests
|
||||
$sshcmd "(cd src/cligen/test; ./sum.sh)"
|
||||
$sshcmd "(cd src/clixon/test; ./sum.sh)"
|
||||
$sshcmd "(cd src/clixon/test; detail=true ./sum.sh)"
|
||||
|
||||
# destroy vm
|
||||
#if $destroy; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue