コード例 #1
0
    def setUpClass(cls):
        grpc_spec = GrpcSpec(
            authority=cls._TEST_AUTHORITY,
            extra_headers={cls._X_HOST_HEADER_KEY: cls._TEST_X_HOST})
        participant = Participant(name=cls._TEST_RECEIVER_NAME,
                                  domain_name='fl-test.com',
                                  grpc_spec=grpc_spec)
        project_config = Project(name=cls._TEST_PROJECT_NAME,
                                 domain_name=cls._TEST_SELF_DOMAIN_NAME,
                                 token='test-auth-token',
                                 participants=[participant],
                                 variables=[{
                                     'name': 'EGRESS_URL',
                                     'value': cls._TEST_URL
                                 }])

        cls._participant = participant
        cls._project_config = project_config
        cls._project = ProjectModel(name=cls._TEST_PROJECT_NAME)
        cls._project.set_config(project_config)

        # Inserts the project entity
        cls._DB.create_all()
        cls._DB.session.add(cls._project)
        cls._DB.session.commit()
コード例 #2
0
    def setUpClass(cls):

        grpc_spec = GrpcSpec(
            authority=cls._TEST_AUTHORITY,
            extra_headers={cls._X_HOST_HEADER_KEY: cls._TEST_X_HOST})
        participant = Participant(name=cls._TEST_RECEIVER_NAME,
                                  domain_name='fl-test.com',
                                  grpc_spec=grpc_spec)
        project_config = Project(name=cls._TEST_PROJECT_NAME,
                                 token='test-auth-token',
                                 participants=[participant],
                                 variables=[{
                                     'name': 'EGRESS_URL',
                                     'value': cls._TEST_URL
                                 }])
        job = Job(name='test-job')

        cls._participant = participant
        cls._project_config = project_config
        cls._project = ProjectModel(name=cls._TEST_PROJECT_NAME)
        cls._project.set_config(project_config)
        cls._job = job
コード例 #3
0
    def setUpClass(cls):
        grpc_spec = GrpcSpec(
            url=cls._TEST_URL,
            authority=cls._TEST_AUTHORITY,
            extra_headers={cls._X_HOST_HEADER_KEY: cls._TEST_X_HOST})
        participant = Participant(name=cls._TEST_RECEIVER_NAME,
                                  sender_auth_token='test-sender-auth-token',
                                  grpc_spec=grpc_spec)
        project_config = Project(
            project_name=cls._TEST_PROJECT_NAME,
            self_name=cls._TEST_PROJECT_NAME,
            participants={cls._TEST_RECEIVER_NAME: participant})

        cls._participant = participant
        cls._project_config = project_config
        cls._project = ProjectModel(name=cls._TEST_PROJECT_NAME)
        cls._project.set_config(project_config)

        # Inserts the project entity
        cls._DB.create_all()
        cls._DB.session.add(cls._project)
        cls._DB.session.commit()