Exemplo n.º 1
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -*- coding: utf-8 -*-
'''
This is a positive ping test to go through a success deploy
'''
import unittest
import commons

systems_helper = commons.get_system_helper()
environs_helper = commons.get_environ_helper()
deploys_helper = commons.get_deploy_helper()
agents_helper = commons.get_agent_helper()
stageName = "prod"


class TestPings(unittest.TestCase):
    def setUp(self):
        self.envName = "ping-test-env-" + commons.gen_random_num()
        self.commit = commons.gen_random_num(32)
        self.host = "ping-test-host-" + commons.gen_random_num()
        self.group = "ping-test-group-" + commons.gen_random_num()
        self.groups = [self.group]
        self.env = commons.create_env(self.envName, stageName)
        environs_helper.update_env_capacity(commons.REQUEST,
                                            self.envName,
                                            stageName,
Exemplo n.º 2
0
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -*- coding: utf-8 -*-
'''
This is a positive ping test to go through a success deploy
'''
import unittest
import time
import commons
import threading

systems_helper = commons.get_system_helper()
environs_helper = commons.get_environ_helper()
deploys_helper = commons.get_deploy_helper()
envName = "agent-test-env-" + commons.gen_random_num()
stageName = "prod"
commit = commons.gen_random_num(32)
hostNamePrefix = "agent-test-host-"
group = "agent-test-group-" + commons.gen_random_num()


class TestPings(unittest.TestCase):
    def setUp(self):
        commons.create_env(envName, stageName)
        environs_helper.update_env_capacity(commons.REQUEST, envName, stageName,
                                            data=[group])
        environs_helper.update_env_basic_config(commons.REQUEST, envName, stageName,
                                                {"maxParallel": 5})
        environs_helper.update_env_script_config(commons.REQUEST, envName, stageName,