mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-12 08:12:33 +00:00
1f06d22883
Sixteen files, fifty scenarios, one per behaviour the specification names. The cross-stage ones are the point: a config is fetched over TFTP, the kernel path is read out of it, and that path is fetched. No file says what the kernel will be called, which is what separates testing xCAT from comparing xCAT's output against a copy of it. The four tftp-*.conf files are alternatives, not a set -- a node has one netboot method -- and the fixture selects the one it was defined with. conf/tftp-grub2.conf @P-70 meets dhcptest at the only shared assertion: the boot file DHCP named is fetchable under exactly that name.
87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
# Stage 12: getpostscript, on both transports. spec.md P-57, P-58, P-67.
|
|
#
|
|
# The node fetches the script it is to run after the installer finishes, and it
|
|
# fetches it over whichever transport it has: TLS 3001 during genesis,
|
|
# plain 3002 from `xcatdsklspost` inside the installed system. Two paths, one
|
|
# script, and the client reads until `#END OF SCRIPT` -- so a body that is
|
|
# truncated without the marker is read as a hang, not as an error.
|
|
#
|
|
# provtest run \
|
|
# --set server=10.99.1.1 --set client=10.99.1.11 \
|
|
# --set unknown=10.99.1.201 --set node=provtestcn \
|
|
# --set xcatport=3001 --set monitorport=3002 \
|
|
# conf/xcatd-postscript.conf
|
|
|
|
[defaults]
|
|
server = %(server)s
|
|
bind = %(client)s
|
|
timeout = 30
|
|
retries = 2
|
|
|
|
# --- P-57 -------------------------------------------------------------------
|
|
|
|
[scenario postscript-terminated]
|
|
description = A known node's postscript arrives complete, with its end marker
|
|
|
|
[step getpostscript]
|
|
type = xcatreq
|
|
port = %(xcatport)s
|
|
command = getpostscript
|
|
assert =
|
|
text contains #END OF SCRIPT
|
|
text contains %(node)s
|
|
|
|
# --- P-58 -------------------------------------------------------------------
|
|
|
|
[scenario postscript-unknown-client]
|
|
description = A client that maps to no node is given no node's script
|
|
|
|
[step leaked]
|
|
type = xcatreq
|
|
port = %(xcatport)s
|
|
command = getpostscript
|
|
bind = %(unknown)s
|
|
expect = any
|
|
# Whether xcatd answers this at all is a policy question; what must not happen
|
|
# is that it answers with somebody else's script. A postscript carries the
|
|
# node's name, its master and the credentials it is to install.
|
|
|
|
[step leak]
|
|
type = extract
|
|
from = $leaked.text
|
|
pattern = %(node)s
|
|
assert =
|
|
matched == no
|
|
|
|
# --- P-67 -------------------------------------------------------------------
|
|
|
|
[scenario postscript-both-transports]
|
|
description = The same node gets the same script on 3001 and on 3002
|
|
|
|
[step overtls]
|
|
type = xcatreq
|
|
port = %(xcatport)s
|
|
command = getpostscript
|
|
assert =
|
|
text contains #END OF SCRIPT
|
|
|
|
[step marker]
|
|
type = extract
|
|
from = $overtls.text
|
|
# A line from the body that is specific to this node and to this run, used
|
|
# below as the thing the other transport has to agree about. The two framings
|
|
# differ -- XML elements on one side, bare lines on the other -- so a byte
|
|
# comparison of the responses would compare the envelopes, not the script.
|
|
pattern = ^\s*(NODE=\S+|MASTER=\S+)\s*$
|
|
assert =
|
|
matched == yes
|
|
|
|
[step overplain]
|
|
type = monitor
|
|
port = %(monitorport)s
|
|
send =
|
|
getpostscript
|
|
assert =
|
|
text contains #END OF SCRIPT
|
|
text contains $marker.value
|