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: select_volume_size_activity_test.go
    path of file: ./repos/pipeline/internal/cluster/distribution/eks/eksprovider/workflow
    
    the code of the file until where you have to start completion: // Copyright Â© 2020 Banzai Cloud
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package workflow

import (
	"context"
	"testing"
	"time"

	"emperror.dev/errors"
	"github.com/stretchr/testify/require"
	"go.uber.org/cadence/activity"
	"go.uber.org/cadence/testsuite"
	"go.uber.org/cadence/workflow"
)

func TestNewSelectVolumeSizeActivity(t *testing.T) {
	testCases := []struct {
		caseDescription            string
		expectedActivity           *SelectVolumeSizeActivity
		inputDefaultNodeVolumeSize int
	}{
		{
			caseDescription: "not zero default node volume size success",
			expectedActivity: &SelectVolumeSizeActivity{
				defaultVolumeSize: 1,
			},
			inputDefaultNodeVolumeSize: 1,
		},
		{
			caseDescription:            "zero default node volume size success",
			expectedActivity:           &SelectVolumeSizeActivity{},
			inputDefaultNodeVolumeSize: 0,
		},
	}

	for _, testCase := range testCases 
    
func TestSelectVolumeSize(t *testing.T) {
	type inputType struct {
		amiSize            int
		optionalVolumeSize int
	}

	type outputType struct {
		expectedError      error
		expectedVolumeSize int
	}

	testCases := []struct {
		caseDescription string
		input           inputType
		output          outputType
	}{
		{
			caseDescription: "success",
			input: inputType{
				amiSize:            1,
				optionalVolumeSize: 2,
			},
			output: outputType{
				expectedError:      nil,
				expectedVolumeSize: 2,
			},
		},
		{
			caseDescription: "error",
			input: inputType{
				amiSize:            2,
				optionalVolumeSize: 1,
			},
			output: outputType{
				expectedError: errors.New(
					"selected volume size of 1 GiB (source: explicitly set) is less than the AMI size of 2 GiB",
				),
				expectedVolumeSize: 0,
			},
		},
	}

	for _, testCase := range testCases {
		testCase := testCase

		t.Run(testCase.caseDescription, func(t *testing.T) {
			suite := testsuite.WorkflowTestSuite{}
			environment := suite.NewTestWorkflowEnvironment()
			environment.RegisterActivityWithOptions(
				func(ctx context.Context, input SelectVolumeSizeActivityInput) (*SelectVolumeSizeActivityOutput, error) {
					if testCase.output.expectedError != nil {
						return nil, testCase.output.expectedError
					}

					return &SelectVolumeSizeActivityOutput{
						VolumeSize: testCase.output.expectedVolumeSize,
					}, nil
				},
				activity.RegisterOptions{
					Name: SelectVolumeSizeActivityName,
				},
			)

			var actualError error
			var actualVolumeSize int
			environment.ExecuteWorkflow(func(ctx workflow.Context) error {
				ctx = workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
					ScheduleToCloseTimeout: 10 * time.Second,
					ScheduleToStartTimeout: 3 * time.Second,
					StartToCloseTimeout:    7 * time.Second,
					WaitForCancellation:    true,
				})

				actualVolumeSize, actualError = selectVolumeSize(
					ctx,
					testCase.input.amiSize,
					testCase.input.optionalVolumeSize,
				)

				return nil
			})

			if testCase.output.expectedError == nil {
				require.NoError(t, actualError)
			} else {
				require.EqualError(t, actualError, testCase.output.expectedError.Error())
			}
			require.Equal(t, testCase.output.expectedVolumeSize, actualVolumeSize)
		})
	}
}