Beispiel #1
0
        public async Task TestPipelineRun()
        {
            PipelineClient client = CreateClient();

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(client, this.Recording);

            CreateRunResponse runResponse = await client.CreatePipelineRunAsync(pipeline.Name);

            Assert.NotNull(runResponse.RunId);
        }
Beispiel #2
0
        public async Task TestDeleteNotebook()
        {
            PipelineClient client = CreateClient();

            PipelineResource resource = await DisposablePipeline.CreateResource(client, this.Recording);

            PipelineDeletePipelineOperation operation = await client.StartDeletePipelineAsync(resource.Name);

            await operation.WaitAndAssertSuccessfulCompletion();
        }
        public async Task TestQueryRuns()
        {
            PipelineClient    pipelineClient = CreatePipelineClient();
            PipelineRunClient runClient      = CreatePipelineRunClient();

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(pipelineClient, this.Recording);

            CreateRunResponse runResponse = await pipelineClient.CreatePipelineRunAsync(pipeline.Name);

            Assert.NotNull(runResponse.RunId);

            PipelineRunsQueryResponse queryResponse = await runClient.QueryPipelineRunsByWorkspaceAsync(new RunFilterParameters (DateTimeOffset.MinValue, DateTimeOffset.MaxValue));

            Assert.GreaterOrEqual(queryResponse.Value.Count, 1);
        }
        public async Task TestCancelRun()
        {
            PipelineClient    pipelineClient = CreatePipelineClient();
            PipelineRunClient runClient      = CreatePipelineRunClient();

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(pipelineClient, this.Recording);

            CreateRunResponse runResponse = await pipelineClient.CreatePipelineRunAsync(pipeline.Name);

            Assert.NotNull(runResponse.RunId);

            Response response = await runClient.CancelPipelineRunAsync(runResponse.RunId);

            response.AssertSuccess();
        }
        public async Task TestGet()
        {
            PipelineClient    pipelineClient = CreatePipelineClient();
            PipelineRunClient runClient      = CreatePipelineRunClient();

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(pipelineClient, this.Recording);

            CreateRunResponse runResponse = await pipelineClient.CreatePipelineRunAsync(pipeline.Name);

            Assert.NotNull(runResponse.RunId);

            PipelineRun run = await runClient.GetPipelineRunAsync(runResponse.RunId);

            Assert.AreEqual(run.RunId, runResponse.RunId);
            Assert.NotNull(run.Status);
        }
Beispiel #6
0
        public async Task TestGetPipeline()
        {
            PipelineClient client = CreateClient();

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(client, this.Recording);

            IList <PipelineResource> pipelines = await client.GetPipelinesByWorkspaceAsync().ToListAsync();

            Assert.GreaterOrEqual(pipelines.Count, 1);

            foreach (var expectedPipeline in pipelines)
            {
                PipelineResource actualPipeline = await client.GetPipelineAsync(expectedPipeline.Name);

                Assert.AreEqual(expectedPipeline.Name, actualPipeline.Name);
                Assert.AreEqual(expectedPipeline.Id, actualPipeline.Id);
            }
        }
Beispiel #7
0
        public async Task TestRenameLinkedService()
        {
            PipelineClient client = CreateClient();

            PipelineResource resource = await DisposablePipeline.CreateResource(client, Recording);

            string newPipelineName = Recording.GenerateId("Pipeline2", 16);

            PipelineRenamePipelineOperation renameOperation = await client.StartRenamePipelineAsync(resource.Name, new ArtifactRenameRequest()
            {
                NewName = newPipelineName
            });

            await renameOperation.WaitForCompletionResponseAsync();

            PipelineResource pipeline = await client.GetPipelineAsync(newPipelineName);

            Assert.AreEqual(newPipelineName, pipeline.Name);

            PipelineDeletePipelineOperation operation = await client.StartDeletePipelineAsync(newPipelineName);

            await operation.WaitForCompletionResponseAsync();
        }
Beispiel #8
0
        public async Task TestStartStop()
        {
            TriggerClient  client         = CreateClient();
            PipelineClient pipelineClient = CreatePipelineClient();

            await using DisposableTrigger trigger = await DisposableTrigger.Create(client, Recording);

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(pipelineClient, Recording);

            // SYNAPSE_API_ISSUE - How do we point the trigger to our pipeline

            TriggerStartTriggerOperation startOperation = await client.StartStartTriggerAsync(trigger.Name);

            Response startResponse = await startOperation.WaitForCompletionResponseAsync();

            startResponse.AssertSuccess();

            TriggerStopTriggerOperation stopOperation = await client.StartStopTriggerAsync(trigger.Name);

            Response stopResponse = await stopOperation.WaitForCompletionResponseAsync();

            stopResponse.AssertSuccess();
        }