forked from ungleich-public/cdist
continue on test_path testcase
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
f00b8fe56a
commit
a875d69d7e
3 changed files with 12 additions and 5 deletions
|
@ -26,11 +26,11 @@ import os
|
||||||
import stat
|
import stat
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
import cdist.emulator
|
import cdist.emulator
|
||||||
import cdist.path
|
import cdist.path
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
CODE_HEADER = "#!/bin/sh -e\n"
|
CODE_HEADER = "#!/bin/sh -e\n"
|
||||||
|
|
||||||
class ConfigInstall:
|
class ConfigInstall:
|
||||||
|
@ -203,6 +203,7 @@ class ConfigInstall:
|
||||||
outfile_fd = open(outfile, "w")
|
outfile_fd = open(outfile, "w")
|
||||||
|
|
||||||
# Need to flush to ensure our write is done before stdout write
|
# Need to flush to ensure our write is done before stdout write
|
||||||
|
# FIXME: CODE_HEADER needed in our sh -e scenario????
|
||||||
outfile_fd.write(CODE_HEADER)
|
outfile_fd.write(CODE_HEADER)
|
||||||
outfile_fd.flush()
|
outfile_fd.flush()
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,14 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import cdist.config_install
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
Class Install(cdist.config_install.ConfigInstall):
|
||||||
|
pass
|
||||||
|
|
||||||
def install(args):
|
def install(args):
|
||||||
"""Install remote system"""
|
"""Install remote system"""
|
||||||
process = {}
|
process = {}
|
||||||
|
|
|
@ -66,12 +66,12 @@ class Path(unittest.TestCase):
|
||||||
"""Check that objects created from manifest are only of install type"""
|
"""Check that objects created from manifest are only of install type"""
|
||||||
manifest_fd = open(self.init_manifest, "w")
|
manifest_fd = open(self.init_manifest, "w")
|
||||||
manifest_fd.writelines(["#!/bin/sh\n",
|
manifest_fd.writelines(["#!/bin/sh\n",
|
||||||
"__file " + self.temp_dir + " --mode 0700\n",
|
self.install_type_name + "testid\n",
|
||||||
"__partition_msdos /dev/null --type 82\n",
|
self.config_type_name + "testid\n",
|
||||||
])
|
])
|
||||||
manifest_fd.close()
|
manifest_fd.close()
|
||||||
|
|
||||||
self.config.run_initial_manifest()
|
self.install.run_initial_manifest()
|
||||||
|
|
||||||
# FIXME: check that only __partition_msdos objects are created!
|
# FIXME: check that only __partition_msdos objects are created!
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue