public async Task GetDataFlows()
        {
            DataFlowClient client = CreateClient();

            await using DisposableDataFlow flow = await DisposableDataFlow.Create(client, this.Recording);

            AsyncPageable <DataFlowResource> dataFlows = client.GetDataFlowsByWorkspaceAsync();

            Assert.GreaterOrEqual((await dataFlows.ToListAsync()).Count, 1);
        }
        public async Task GetDataFlow()
        {
            DataFlowClient client = CreateClient();

            await using DisposableDataFlow flow = await DisposableDataFlow.Create(client, this.Recording);

            DataFlowResource dataFlow = await client.GetDataFlowAsync(flow.Name);

            Assert.AreEqual(flow.Name, dataFlow.Name);
        }
Beispiel #3
0
        public async Task DeleteDataFlow()
        {
            DataFlowClient client = CreateClient();

            DataFlowResource resource = await DisposableDataFlow.CreateResource(client, this.Recording);

            DataFlowDeleteDataFlowOperation operation = await client.StartDeleteDataFlowAsync(resource.Name);

            await operation.WaitAndAssertSuccessfulCompletion();
        }
        public async Task QuerySessions()
        {
            DataFlowClient             flowClient  = CreateFlowClient();
            DataFlowDebugSessionClient debugClient = CreateDebugClient();

            await using DisposableDataFlow flow = await DisposableDataFlow.Create(flowClient, this.Recording);

            await using DisposableDataFlowDebugSession debugSession = await DisposableDataFlowDebugSession.Create(debugClient, this.Recording);

            AsyncPageable <DataFlowDebugSessionInfo> sessions = debugClient.QueryDataFlowDebugSessionsByWorkspaceAsync();

            Assert.GreaterOrEqual((await sessions.ToListAsync()).Count, 1);
        }
        public async Task ExecuteCommand()
        {
            DataFlowClient             flowClient  = CreateFlowClient();
            DataFlowDebugSessionClient debugClient = CreateDebugClient();

            await using DisposableDataFlow flow = await DisposableDataFlow.Create(flowClient, this.Recording);

            await using DisposableDataFlowDebugSession debugSession = await DisposableDataFlowDebugSession.Create(debugClient, this.Recording);

            // SYNAPSE_API_ISSUE - What payload do we need here?
            DataFlowDebugSessionExecuteCommandOperation executeOperation = await debugClient.StartExecuteCommandAsync(new DataFlowDebugCommandRequest { SessionId = debugSession.SessionId });

            DataFlowDebugCommandResponse response = await executeOperation.WaitForCompletionAsync();

            Assert.AreEqual(200, response.Status);
        }
        public async Task AddDataFlow()
        {
            DataFlowClient             flowClient  = CreateFlowClient();
            DataFlowDebugSessionClient debugClient = CreateDebugClient();

            await using DisposableDataFlow flow = await DisposableDataFlow.Create(flowClient, this.Recording);

            await using DisposableDataFlowDebugSession debugSession = await DisposableDataFlowDebugSession.Create(debugClient, this.Recording);

            // SYNAPSE_API_ISSUE - Why do we need to pass in SessionId here?
            DataFlowDebugPackage debugPackage = new DataFlowDebugPackage()
            {
                DataFlow = new DataFlowDebugResource(flow.Resource.Properties), SessionId = debugSession.SessionId
            };
            AddDataFlowToDebugSessionResponse response = await debugClient.AddDataFlowAsync(debugPackage);

            Assert.NotNull(response.JobVersion);
        }
        public async Task DeleteDataFlow()
        {
            DataFlowClient client = CreateClient();

            DataFlowResource resource = await DisposableDataFlow.CreateResource(client, this.Recording);

            DataFlowDeleteDataFlowOperation operation = await client.StartDeleteDataFlowAsync(resource.Name);

            Response response = await operation.WaitForCompletionAsync();

            switch (response.Status)
            {
            case 200:
            case 204:
                break;

            default:
                Assert.Fail($"Unexpected status ${response.Status} returned");
                break;
            }
        }
Beispiel #8
0
        public async Task RenameDataFlow()
        {
            DataFlowClient client = CreateClient();

            DataFlowResource resource = await DisposableDataFlow.CreateResource(client, this.Recording);

            string newFlowName = Recording.GenerateAssetName("DataFlow2");

            DataFlowRenameDataFlowOperation renameOperation = await client.StartRenameDataFlowAsync(resource.Name, new ArtifactRenameRequest()
            {
                NewName = newFlowName
            });

            await renameOperation.WaitForCompletionResponseAsync();

            DataFlowResource dataFlow = await client.GetDataFlowAsync(newFlowName);

            Assert.AreEqual(newFlowName, dataFlow.Name);

            DataFlowDeleteDataFlowOperation operation = await client.StartDeleteDataFlowAsync(newFlowName);

            await operation.WaitForCompletionResponseAsync();
        }