Rework datastore tests
Sysrepo now supports parallelized tests. Use the new environmental
variables to implement this in netconf-cli. All of the tests now get
their own clean environment:
- Fresh repository and separate shm prefix. These get cleaned before and
after tests. The only thing that gets left are some empty directories.
- Its own model to test on.
- Separate Netopeer2 daemon: only for netconf tests - that means no
`sleep 5` for sysrepo-only tests. So no useless waiting. Wow! The daemon
also runs with its argv[0] changed to something recognizable for
`pkill`. That means that if Netopeer2 crashes for some reason, pkill
will notify me.
Side note: These changes somehow changed some of the linking, so hopefully I got
those right.
Change-Id: Ib0e582ef03fc559b24203af8afb2a295a6318ca9
diff --git a/tests/python_netconfaccess.py b/tests/python_netconfaccess.py
index ae317ee..d686cd0 100644
--- a/tests/python_netconfaccess.py
+++ b/tests/python_netconfaccess.py
@@ -1,7 +1,8 @@
+import os
import sysrepo_subscription_py as sr_sub
import netconf_cli_py as nc
-c = nc.NetconfAccess(socketPath = "@NETOPEER_SOCKET_PATH@")
+c = nc.NetconfAccess(socketPath = os.environ['NETOPEER_SOCKET'])
data = c.getItems("/ietf-netconf-monitoring:netconf-state/datastores")
for (k, v) in data:
print(f"{k}: {type(v)} {v}", flush=True)