continue on test_path testcase

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-05 14:15:05 +02:00
parent f00b8fe56a
commit a875d69d7e
3 changed files with 12 additions and 5 deletions

View file

@ -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()

View file

@ -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 = {}

View file

@ -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!