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: actions_test.go
    path of file: ./repos/graphql-engine/cli/internal/metadataobject/actions
    
    the code of the file until where you have to start completion: package actions

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"path/filepath"
	"testing"

	goyaml "github.com/goccy/go-yaml"
	"github.com/hasura/graphql-engine/c
    
func TestActionConfig_Export(t *testing.T) {
	testEC := cli.NewExecutionContext()
	testEC.Version = version.NewCLIVersion(version.DevVersion)
	testEC.Logger = logrus.New()
	home, err := homedir.Dir()
	assert.NoError(t, err)
	testEC.GlobalConfigDir = filepath.Join(home, cli.GlobalConfigDirName)
	assert.NoError(t, cliext.Setup(testEC))

	type fields struct {
		MetadataDir        string
		ActionConfig       *types.ActionExecutionConfig
		serverFeatureFlags *version.ServerFeatureFlags
		cliExtensionConfig *cliextension.Config
		ensureCliExt       func() error
		cleanupCliExt      func()
		logger             *logrus.Logger
	}
	type args struct {
		metadata map[string]yaml.Node
	}
	tests := []struct {
		id        string
		name      string
		fields    fields
		args      args
		want      map[string][]byte
		wantErr   bool
		assertErr require.ErrorAssertionFunc
	}{
		{
			"t1",
			"can export actions metadata",
			fields{
				MetadataDir:  "metadata",
				ActionConfig: nil,
				serverFeatureFlags: &version.ServerFeatureFlags{
					HasAction: true,
				},
				cliExtensionConfig: cliextension.NewCLIExtensionConfig(&testEC.CliExtDestinationBinPath, testEC.Logger),
				ensureCliExt: func() error {
					return cliext.Setup(testEC)
				},
				cleanupCliExt: func() {
					cliext.Cleanup(testEC)
				},
				logger: testEC.Logger,
			},
			args{
				metadata: func() map[string]yaml.Node {
					bs, err := ioutil.ReadFile("testdata/export/t1/metadata.json")
					assert.NoError(t, err)
					yamlbs, err := metadatautil.JSONToYAML(bs)
					assert.NoError(t, err)
					var v map[string]yaml.Node
					assert.NoError(t, yaml.Unmarshal(yamlbs, &v))
					return v
				}(),
			},
			map[string][]byte{
				"metadata/actions.graphql": func() []byte {
					bs, err := ioutil.ReadFile("testdata/export/t1/want.actions.graphql")
					assert.NoError(t, err)
					return bs
				}(),
				"metadata/actions.yaml": func() []byte {
					bs, err := ioutil.ReadFile("testdata/export/t1/want.actions.yaml")
					assert.NoError(t, err)
					return bs
				}(),
			},
			false,
			require.NoError,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			a := &ActionConfig{
				MetadataDir:        tt.fields.MetadataDir,
				ActionConfig:       tt.fields.ActionConfig,
				serverFeatureFlags: tt.fields.serverFeatureFlags,
				cliExtensionConfig: tt.fields.cliExtensionConfig,
				ensureCliExt:       tt.fields.ensureCliExt,
				cleanupCliExt:      tt.fields.cleanupCliExt,
				logger:             tt.fields.logger,
			}
			got, err := a.Export(tt.args.metadata)
			tt.assertErr(t, err)
			if tt.wantErr {
				return
			}
			for k, v := range got {
				assert.Contains(t, tt.want, k)
				// uncomment to update golden files
				// assert.NoError(t, ioutil.WriteFile(fmt.Sprintf("testdata/export/%v/want.%v", tt.id, filepath.Base(k)), v, os.ModePerm))
				assert.Equalf(t, string(tt.want[k]), string(v), "%v", k)
			}
		})
	}
}