* Removed docker warning: set master default branch
* Test: check commit for cli union
This commit is contained in:
parent
1324c914dc
commit
4631b02e00
3 changed files with 32 additions and 5 deletions
|
|
@ -40,9 +40,16 @@ RUN apk add --update git make build-base gcc flex bison fcgi-dev curl-dev
|
|||
|
||||
# Checkut standard YANG models for tests (note >1G for full repo)
|
||||
WORKDIR /usr/local/share
|
||||
RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout
|
||||
|
||||
RUN mkdir yang
|
||||
WORKDIR /usr/local/share/yang
|
||||
|
||||
RUN git config --global init.defaultBranch master
|
||||
RUN git init;
|
||||
RUN git remote add -f origin https://github.com/YangModels/yang;
|
||||
RUN git config core.sparseCheckout true
|
||||
RUN echo "standard/" >> .git/info/sparse-checkout
|
||||
RUN echo "experimental/" >> .git/info/sparse-checkout
|
||||
|
||||
RUN git pull origin master
|
||||
|
||||
# Create a directory to hold source-code, dependencies etc
|
||||
|
|
|
|||
|
|
@ -45,9 +45,17 @@ RUN apk add --update nghttp2
|
|||
WORKDIR /usr/local/share/
|
||||
|
||||
# Checkout standard YANG models for tests (note >1G for full repo)
|
||||
RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout
|
||||
RUN mkdir yang
|
||||
|
||||
WORKDIR /usr/local/share/yang
|
||||
|
||||
RUN git config --global init.defaultBranch master
|
||||
RUN git init;
|
||||
RUN git remote add -f origin https://github.com/YangModels/yang;
|
||||
RUN git config core.sparseCheckout true
|
||||
RUN echo "standard/" >> .git/info/sparse-checkout
|
||||
RUN echo "experimental/" >> .git/info/sparse-checkout
|
||||
|
||||
RUN git pull origin master
|
||||
|
||||
RUN mkdir /usr/local/share/openconfig
|
||||
|
|
|
|||
|
|
@ -91,8 +91,11 @@ delete("Delete a configuration item") @datamodel, cli_auto_del();
|
|||
validate("Validate changes"), cli_validate();
|
||||
commit("Commit the changes"), cli_commit();
|
||||
quit("Quit"), cli_quit();
|
||||
show("Show a particular state of the system")
|
||||
configuration("Show configuration"), cli_auto_show("datamodel", "candidate", "text", true, false);
|
||||
show("Show a particular state of the system"){
|
||||
auto("Show expand") @datamodel, cli_show_auto("running", "xml", "set");
|
||||
candidate("Show configuration"), cli_auto_show("datamodel", "candidate", "xml", false, false);
|
||||
running("Show configuration"), cli_auto_show("datamodel", "running", "xml", false, false);
|
||||
}
|
||||
EOF
|
||||
|
||||
new "test params: -f $cfg"
|
||||
|
|
@ -138,6 +141,15 @@ if [ $count -gt 1 ]; then
|
|||
err "number of u1: 1" $count
|
||||
fi
|
||||
|
||||
new "cli commit"
|
||||
expectpart "$($clixon_cli -1 -f $cfg commit)" 0 "^$"
|
||||
|
||||
new "show candidate"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show candidate)" 0 '<tableleaf xmlns="urn:example:clixon"><parleaf><name>a</name><value>u1</value></parleaf></tableleaf>' '<tablekey xmlns="urn:example:clixon"><parkey><name>u1</name><value>42</value></parkey></tablekey>'
|
||||
|
||||
new "show running"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show running)" 0 '<tableleaf xmlns="urn:example:clixon"><parleaf><name>a</name><value>u1</value></parleaf></tableleaf>' '<tablekey xmlns="urn:example:clixon"><parkey><name>u1</name><value>42</value></parkey></tablekey>'
|
||||
|
||||
if [ $BE -ne 0 ]; then
|
||||
new "Kill backend"
|
||||
# Check if premature kill
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue