Example #1
0
def remote_system(remote_garden):
    system = System(name="somesystem",
                    version="1.0.0",
                    namespace=remote_garden.name).save()

    yield system
    system.delete()
Example #2
0
def test_system_2_0_0(role_assignment_for_system_scope):
    system = System(
        version="2.0.0", **role_assignment_for_system_scope.domain.identifiers
    ).save()

    yield system
    system.delete()
Example #3
0
def local_system(local_garden):
    system = System(name="somesystem",
                    version="1.0.0",
                    namespace=local_garden.name).save()

    yield system
    system.delete()
Example #4
0
def system_not_permitted(garden):
    system = System(name="not_permitted",
                    version="1.0.0",
                    namespace=garden.name).save()

    yield system
    system.delete()
Example #5
0
def system_not_permitted(garden):
    system = System(
        name="system_not_permitted",
        version="0.0.1",
        namespace=garden.name,
        commands=[Command(name="command_not_permitted")],
    ).save()

    yield system
    system.delete()
Example #6
0
def system_permitted(garden):
    system = System(
        name="permitted_system",
        version="0.0.1",
        namespace=garden.name,
        commands=[Command(name="icandoit")],
    ).save()

    yield system
    system.delete()
Example #7
0
def system(garden):
    instance = Instance(name="instance")
    system = System(
        name="system",
        version="1.0.0",
        namespace=garden.name,
        instances=[instance],
    ).save()

    yield system
    system.delete()
Example #8
0
    def default_system(self, default_command, default_instance):
        default_system = System(
            id="1234",
            name="foo",
            version="1.0.0",
            namespace="ns",
            instances=[default_instance],
            commands=[default_command],
        )
        default_system.save = Mock()
        default_system.validate = Mock()
        default_system.delete = Mock()

        return default_system
Example #9
0
    def setUp(self):
        self.app = brew_view.app.test_client()

        self.default_instance = Instance(name="default", status="RUNNING")
        self.default_command = Command(id="54ac18f778c4b57e963f3c18",
                                       name="command",
                                       description="foo")
        self.default_system = System(
            id="54ac18f778c4b57e963f3c18",
            name="default_system",
            version="1.0.0",
            instances=[self.default_instance],
            commands=[self.default_command],
            max_instances="1",
        )
Example #10
0
    def setUp(self):
        self.app = brew_view.app.test_client()

        self.default_instance = Instance(name="default", status="RUNNING")
        self.default_command = Command(id="54ac18f778c4b57e963f3c18",
                                       name="command",
                                       description="foo")
        self.default_system = System(
            id="54ac18f778c4b57e963f3c18",
            name="default_system",
            version="1.0.0",
            instances=[self.default_instance],
            commands=[self.default_command],
            max_instances="1",
        )

        self.client_mock = Mock(name="client_mock")
        self.fake_context = MagicMock(
            __enter__=Mock(return_value=self.client_mock),
            __exit__=Mock(return_value=False),
        )
Example #11
0
 def child_system(self):
     return System(name="echoer", namespace="child_garden")