Example #1
0
        public async Task TestGetPipeline()
        {
            await foreach (var expectedPipeline in PipelineClient.GetPipelinesByWorkspaceAsync())
            {
                PipelineResource actualPipeline = await PipelineClient.GetPipelineAsync(expectedPipeline.Name);

                Assert.AreEqual(expectedPipeline.Name, actualPipeline.Name);
                Assert.AreEqual(expectedPipeline.Id, actualPipeline.Id);
            }
        }
Example #2
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);
            }
        }
Example #3
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();
        }