示例#1
0
    def setup_method(self, method):
        TestFlowBase.setup_method(self, method)

        # create the config file
        self.project_property_file = 'project.properties'
        config_file = os.path.join(self.git_working_copy,
                                   const.DEFAULT_CONFIG_FILE)
        config = {
            const.CONFIG_VERSIONING_SCHEME: 'semverWithSeq',
            const.CONFIG_PROJECT_PROPERTY_FILE: self.project_property_file,
            const.CONFIG_VERSION_PROPERTY: 'version',
            const.CONFIG_SEQUENCE_NUMBER_PROPERTY: 'seq',
            const.CONFIG_VERSION_TAG_PREFIX: ''
        }

        PropertyIO.write_file(config_file, config)

        self.version_tag_prefix = config.get(
            const.CONFIG_VERSION_TAG_PREFIX,
            const.DEFAULT_VERSION_TAG_PREFIX) or ''

        # create & push the initial commit
        self.add(config_file)
        self.commit('initial commit: gitflow config file')
        self.push()

        self.assert_refs({'refs/heads/master', 'refs/remotes/origin/master'})
示例#2
0
    def setup_method(self, method):
        super().setup_method(method)

        self.git_working_copy = os.path.join(self.tempdir.name,
                                             'exported_working_copy')
        os.makedirs(self.git_working_copy, exist_ok=True)

        # create the config file
        self.project_property_file = 'project.properties'
        config_file = os.path.join(self.git_working_copy,
                                   const.DEFAULT_CONFIG_FILE)
        config = {
            const.CONFIG_VERSIONING_SCHEME: 'semverWithSeq',
            const.CONFIG_PROJECT_PROPERTY_FILE: self.project_property_file,
            const.CONFIG_VERSION_PROPERTY: 'version',
            const.CONFIG_SEQUENCE_NUMBER_PROPERTY: 'seq',
            const.CONFIG_BUILD: {
                'stages': {
                    'assemble': [['echo', 'assemble#1']],
                    'test': {
                        'steps': {
                            'app': [['echo', 'test#1'],
                                    ['echo', '\\$HOME: $HOME'],
                                    ['echo', '\\\\\\$HOME: \\$HOME'],
                                    ['echo', '\\\\\\\\\\$HOME: \\\\$HOME'],
                                    ['echo', '\\${HOME}: ${HOME}'],
                                    ['echo', '\\\\\\${HOME}: \\${HOME}'],
                                    ['echo', '\\\\\\\\\\${HOME}: \\\\${HOME}']]
                        }
                    },
                    'google_testing_lab': {
                        'type': 'integration_test',
                        'steps': {
                            'monkey_test': [['echo', 'monkey_test']],
                            'instrumentation_test':
                            [['echo', 'instrumentation_test']]
                        }
                    }
                }
            }
        }

        PropertyIO.write_file(config_file, config)

        os.chdir(self.git_working_copy)
示例#3
0
    def setup_method(self, method):
        TestFlowBase.setup_method(self, method)

        # create the config file
        self.project_property_file = 'project.properties'
        config_file = os.path.join(self.git_working_copy,
                                   const.DEFAULT_CONFIG_FILE)
        config = {
            const.CONFIG_VERSIONING_SCHEME: 'semverWithSeq',
            const.CONFIG_PROJECT_PROPERTY_FILE: self.project_property_file,
            const.CONFIG_VERSION_PROPERTY: 'version',
            const.CONFIG_SEQUENCE_NUMBER_PROPERTY: 'seq',
            const.CONFIG_BUILD: {
                'stages': {
                    'assemble': [['echo', 'assemble#1']],
                    'test': {
                        'steps': {
                            'app': [['echo', 'test#1'],
                                    ['echo', '\\$HOME: $HOME'],
                                    ['echo', '\\\\\\$HOME: \\$HOME'],
                                    ['echo', '\\\\\\\\\\$HOME: \\\\$HOME'],
                                    ['echo', '\\${HOME}: ${HOME}'],
                                    ['echo', '\\\\\\${HOME}: \\${HOME}'],
                                    ['echo', '\\\\\\\\\\${HOME}: \\\\${HOME}']]
                        }
                    },
                    'google_testing_lab': {
                        'type': 'integration_test',
                        'steps': {
                            'monkey_test': [['echo', 'monkey_test']],
                            'instrumentation_test':
                            [['echo', 'instrumentation_test']]
                        }
                    }
                }
            }
        }
        PropertyIO.write_file(config_file, config)

        # create & push the initial commit
        self.add(config_file)
        self.commit('initial commit: gitflow config file')
        self.push()

        self.assert_refs({'refs/heads/master', 'refs/remotes/origin/master'})