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: partition_test.go
    path of file: ./repos/aws-sdk-go-v2/internal/endpoints/awsrulesfn
    
    the code of the file until where you have to start completion: package awsrulesfn

import (
	"testing"
)

var mockPartitions = []Partition{
	{
		ID:          "aws",
		RegionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
		DefaultConfig: PartitionConfig{
			Name:               "aws",
			DnsSuffix:          "amazonaws.com",
			DualStackDnsSuffix: "a
    
func TestGetPartition(t *testing.T) {
	cases := map[string]struct {
		Region        string
		PartitionName string
	}{
		"test region match aws": {
			Region: "us-west-2", PartitionName: "aws",
		},
		"test region match aws-cn": {
			Region: "aws-cn-global", PartitionName: "aws-cn",
		},
		"test invalid region; default partition": {
			Region: "foo", PartitionName: "aws",
		},
	}

	for n, c := range cases {
		t.Run(n, func(t *testing.T) {

			// monkey patch the partitions data structure
			// thats used by the GetPartition func
			partitions = mockPartitions

			p := GetPartition(c.Region)
			expected := c.PartitionName
			actual := p.Name
			if expected != actual {
				t.Errorf("expected %v, got %v", expected, actual)
			}
		})
	}
}