You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: datafactory_live_test.go
    path of file: ./repos/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory
    
    the code of the file until where you have to start completion: //go:build go1.18
// +build go1.18

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

package armdatafactory_test

import (
	"context"
	"fmt"
	"testing"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v6"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2/testutil"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources"
	"github.com/stretchr/testify/suite"
)

type DatafactoryTestSuite struct {
	suite.Suite

	ctx                        context.Context
	cred                       azcore.TokenCredential
	options                    *arm.ClientOptions
	credentialName             string
	dataFlowName               string
	datasetName                string
	factoryName                string
	integrationRuntimeName     string
	linkedServiceName          string
	locationId                 string
	managedPrivateEndpointName string
	managedVirtualNetworkName  string
	nodeName                   string
	pipelineName               string
	runId                      string
	triggerName                string
	location                   string
	resourceGroupName          string
	subscriptionId             string

	datafactoryId string
}

func (testsuite *DatafactoryTestSuite) SetupSuite() {
	testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/datafactory/armdatafactory/testdata")

	testsuite.ctx = context.Background()
	testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T())
	testsuite.credentialName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "credenti", 8+6, false)
	testsuite.dataFlowName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "dataflow", 8+6, false)
	testsuite.datasetName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "datasetn", 8+6, false)
	testsuite.factoryName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "factoryn", 8+6, false)
	testsuite.integrationRuntimeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "integrat", 8+6, false)
	testsuite.linkedServiceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "linkedse", 8+6, false)
	testsuite.locationId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "location", 8+6, false)
	testsuite.managedPrivateEndpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "managedp", 8+6, false)
	testsuite.managedVirtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "managedv", 8+6, false)
	testsuite.nodeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "nodename", 8+6, false)
	testsuite.pipelineName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "pipeline", 8+6, false)
	testsuite.runId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "runid", 8+6, false)
	testsuite.triggerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "triggern", 8+6, false)
	testsuite.location = recording.GetEnvVariable("LOCATION", "eastus")
	testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup")
	testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
	resourceGr
    
func (testsuite *DatafactoryTestSuite) TestPipelines() {
	// runId := testsuite.runId
	var err error
	// From step Pipelines_ListByFactory
	fmt.Println("Call operation: Pipelines_ListByFactory")
	pipelinesClient, err := armdatafactory.NewPipelinesClient(testsuite.subscriptionId, testsuite.cred, testsuite.options)
	testsuite.Require().NoError(err)
	pipelinesClientNewListByFactoryPager := pipelinesClient.NewListByFactoryPager(testsuite.resourceGroupName, testsuite.factoryName, nil)
	for pipelinesClientNewListByFactoryPager.More() {
		_, err := pipelinesClientNewListByFactoryPager.NextPage(testsuite.ctx)
		testsuite.Require().NoError(err)
		break
	}

	// From step Pipelines_Get
	fmt.Println("Call operation: Pipelines_Get")
	_, err = pipelinesClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, testsuite.pipelineName, &armdatafactory.PipelinesClientGetOptions{IfNoneMatch: nil})
	testsuite.Require().NoError(err)

	// From step Pipelines_CreateRun
	fmt.Println("Call operation: Pipelines_CreateRun")
	pipelinesClientCreateRunResponse, err := pipelinesClient.CreateRun(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, testsuite.pipelineName, &armdatafactory.PipelinesClientCreateRunOptions{ReferencePipelineRunID: nil,
		IsRecovery:        nil,
		StartActivityName: nil,
		StartFromFailure:  nil,
		Parameters: map[string]any{
			"OutputBlobNameList": []any{
				"exampleoutput.csv",
			},
		},
	})
	testsuite.Require().NoError(err)
	testsuite.runId = *pipelinesClientCreateRunResponse.RunID

	// From step PipelineRuns_Get
	fmt.Println("Call operation: PipelineRuns_Get")
	pipelineRunsClient, err := armdatafactory.NewPipelineRunsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options)
	testsuite.Require().NoError(err)
	_, err = pipelineRunsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, testsuite.runId, nil)
	testsuite.Require().NoError(err)

	// From step ActivityRuns_QueryByPipelineRun
	fmt.Println("Call operation: ActivityRuns_QueryByPipelineRun")
	activityRunsClient, err := armdatafactory.NewActivityRunsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options)
	testsuite.Require().NoError(err)
	_, err = activityRunsClient.QueryByPipelineRun(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, testsuite.runId, armdatafactory.RunFilterParameters{
		LastUpdatedAfter:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:36:44.3345758Z"); return t }()),
		LastUpdatedBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:49:48.3686473Z"); return t }()),
	}, nil)
	testsuite.Require().NoError(err)

	// From step PipelineRuns_QueryByFactory
	fmt.Println("Call operation: PipelineRuns_QueryByFactory")
	_, err = pipelineRunsClient.QueryByFactory(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, armdatafactory.RunFilterParameters{
		Filters: []*armdatafactory.RunQueryFilter{
			{
				Operand:  to.Ptr(armdatafactory.RunQueryFilterOperandPipelineName),
				Operator: to.Ptr(armdatafactory.RunQueryFilterOperatorEquals),
				Values: []*string{
					to.Ptr("examplePipeline")},
			}},
		LastUpdatedAfter:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:36:44.3345758Z"); return t }()),
		LastUpdatedBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:49:48.3686473Z"); return t }()),
	}, nil)
	testsuite.Require().NoError(err)

	// From step PipelineRuns_Cancel
	fmt.Println("Call operation: PipelineRuns_Cancel")
	_, err = pipelineRunsClient.Cancel(testsuite.ctx, testsuite.resourceGroupName, testsuite.factoryName, testsuite.runId, &armdatafactory.PipelineRunsClientCancelOptions{IsRecursive: nil})
	testsuite.Require().NoError(err)
}