Merge "tests: init: Also try to uninstall the module"
diff --git a/tests/init_datastore.bash.in b/tests/init_datastore.bash.in
index d8eb2c3..1e01346 100755
--- a/tests/init_datastore.bash.in
+++ b/tests/init_datastore.bash.in
@@ -21,6 +21,9 @@
 YANG_DIR=$(dirname "$1")
 shift
 
+# Uninstall the module
+"$SYSREPOCTL" --uninstall "$(basename "$MODULE" ".yang")" -v3 || true
+
 # Install the module
 "$SYSREPOCTL" --search-dirs "$YANG_DIR" --install "$MODULE" -v3