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: admin_test.go
    path of file: ./repos/flyte/flytepropeller/pkg/controller/nodes/subworkflow/launchplan
    
    the code of the file until where you have to start completion: package launchplan

import (
	"context"
	"testing"
	"time"

	"github.com/golang/protobuf/proto"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/mock"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	"github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks"
	"github.com/flyteorg/flyte/flyteidl/clients/go/coreutils"
	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
	"github.com/flyteorg/flyte/flytestdlib/cache"
	mocks2 "github.com/flyteorg/flyte/flytestdlib/cache/mocks"
	"github.com/flyteorg/flyte/flytestdlib/contextutils"
	"github.com/flyteorg/flyte/flytestdlib/promutils"
	"github.com/flyteorg/flyte/flytestdlib/promutils/labeled"
	"github.com/flyteorg/flyte/flytestdlib/storage"
	storageMocks "github.com/flyteorg/flyte/flytestdlib/storage/mocks"
)

func TestAdminLaunchPlanExecutor_GetStatus(t *testing.T) {
	ctx := context.TODO()
	id := &core.WorkflowExecutionIdentifier{
		Name:    "n",
		Domain:  "d",
		Project: "p",
	}
	var result *admin.ExecutionClosure

	memStore, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope())
	assert.NoError(t, err)

	t.Run("happy", func(t *testing.T) {
		mockClient := &mocks.AdminServiceClient{}
		exec, err := NewAdminLaunchPlanExecutor(ctx, mockClient, time.Millisecond, defaultAdminConfig, promutils.NewTestScope(), memStore)
		assert.NoError(t, err)
		mockClient.On("GetExecution",
			ctx,
			mock.MatchedBy(func(o *admin.WorkflowExecutionGetRequest) bool { return true }),
		).Return(result, nil)
		assert.NoError(t, err)
		s, _, err := exec.GetStatus(ctx, id)
		ass
    
func TestAdminLaunchPlanExecutor_GetStatus(t *testing.T) {
	ctx := context.TODO()
	id := &core.WorkflowExecutionIdentifier{
		Name:    "n",
		Domain:  "d",
		Project: "p",
	}
	var result *admin.ExecutionClosure

	memStore, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope())
	assert.NoError(t, err)

	t.Run("happy", func(t *testing.T) {
		mockClient := &mocks.AdminServiceClient{}
		exec, err := NewAdminLaunchPlanExecutor(ctx, mockClient, time.Millisecond, defaultAdminConfig, promutils.NewTestScope(), memStore)
		assert.NoError(t, err)
		mockClient.On("GetExecution",
			ctx,
			mock.MatchedBy(func(o *admin.WorkflowExecutionGetRequest) bool { return true }),
		).Return(result, nil)
		assert.NoError(t, err)
		s, _, err := exec.GetStatus(ctx, id)
		assert.NoError(t, err)
		assert.Equal(t, result, s)
	})

	t.Run("notFound", func(t *testing.T) {
		mockClient := &mocks.AdminServiceClient{}

		mockClient.On("CreateExecution",
			ctx,
			mock.MatchedBy(func(o *admin.ExecutionCreateRequest) bool {
				return o.Project == "p" && o.Domain == "d" && o.Name == "n" && o.Spec.Inputs == nil
			}),
		).Return(nil, nil)

		mockClient.On("GetExecution",
			mock.Anything,
			mock.MatchedBy(func(o *admin.WorkflowExecutionGetRequest) bool { return true }),
		).Return(nil, status.Error(codes.NotFound, ""))

		exec, err := NewAdminLaunchPlanExecutor(ctx, mockClient, time.Millisecond, defaultAdminConfig, promutils.NewTestScope(), memStore)
		assert.NoError(t, err)

		assert.NoError(t, exec.Initialize(ctx))

		err = exec.Launch(ctx,
			LaunchContext{
				ParentNodeExecution: &core.NodeExecutionIdentifier{
					NodeId: "node-id",
					ExecutionId: &core.WorkflowExecutionIdentifier{
						Project: "p",
						Domain:  "d",
						Name:    "w",
					},
				},
			},
			id,
			&core.Identifier{},
			nil,
		)
		assert.NoError(t, err)

		// Allow for sync to be called
		time.Sleep(time.Second)

		s, _, err := exec.GetStatus(ctx, id)
		assert.Error(t, err)
		assert.Nil(t, s)
		assert.True(t, IsNotFound(err))
	})

	t.Run("other", func(t *testing.T) {
		mockClient := &mocks.AdminServiceClient{}

		mockClient.On("CreateExecution",
			ctx,
			mock.MatchedBy(func(o *admin.ExecutionCreateRequest) bool {
				return o.Project == "p" && o.Domain == "d" && o.Name == "n" && o.Spec.Inputs == nil
			}),
		).Return(nil, nil)

		mockClient.On("GetExecution",
			mock.Anything,
			mock.MatchedBy(func(o *admin.WorkflowExecutionGetRequest) bool { return true }),
		).Return(nil, status.Error(codes.Canceled, ""))

		exec, err := NewAdminLaunchPlanExecutor(ctx, mockClient, time.Millisecond, defaultAdminConfig, promutils.NewTestScope(), memStore)
		assert.NoError(t, err)

		assert.NoError(t, exec.Initialize(ctx))

		err = exec.Launch(ctx,
			LaunchContext{
				ParentNodeExecution: &core.NodeExecutionIdentifier{
					NodeId: "node-id",
					ExecutionId: &core.WorkflowExecutionIdentifier{
						Project: "p",
						Domain:  "d",
						Name:    "w",
					},
				},
			},
			id,
			&core.Identifier{},
			nil,
		)
		assert.NoError(t, err)

		// Allow for sync to be called
		time.Sleep(time.Second)

		s, _, err := exec.GetStatus(ctx, id)
		assert.Error(t, err)
		assert.Nil(t, s)
		assert.False(t, IsNotFound(err))
	})

}