예제 #1
0
    def test_set_project_name_is_global(self):
        import foundations

        foundations.set_project_name(self.project_name)
        self.assertEqual(
            self.project_name,
            self.foundations_job.project_name,
        )
예제 #2
0
    def test_set_project_name_is_global(self):
        import foundations

        foundations.set_project_name(self.project_name)
        self.assertEqual(
            self.project_name,
            self.foundations_context.pipeline_context().provenance.
            project_name,
        )
    def set_up(self):
        from uuid import uuid4
        from foundations_events.producers.jobs import QueueJob
        from foundations_contrib.global_state import message_router, current_foundations_job

        foundations.set_project_name('default')
        self._job_id = str(uuid4())
        current_foundations_job().job_id = self._job_id
        queue_job = QueueJob(message_router, current_foundations_job())
        queue_job.push_message()
    def set_up(self):
        from uuid import uuid4
        from foundations_events.producers.jobs import QueueJob
        from foundations_contrib.global_state import message_router, current_foundations_context
        from acceptance.cleanup import cleanup

        cleanup()

        foundations.set_project_name('default')
        self._job_id = str(uuid4())
        pipeline_context = current_foundations_context().pipeline_context()
        pipeline_context.file_name = self._job_id
        queue_job = QueueJob(message_router, pipeline_context)
        queue_job.push_message()
import os

import foundations
from foundations_contrib.global_state import current_foundations_job, message_router
from foundations_events.producers.jobs import RunJob

foundations.set_project_name('default')

job_id = os.environ['ACCEPTANCE_TEST_JOB_ID']
current_foundations_job().job_id = job_id

RunJob(message_router, current_foundations_job()).push_message()

foundations.log_metric('key', 'value')
print('Hello World!')