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: metrics_influxdb_types_test.go
    path of file: ./repos/benthos/internal/impl/influxdb
    
    the code of the file until where you have to start completion: package influxdb

import "testing"

func Test_encodeInfluxDBName(t *testing.T) {
	type test struct {
		desc      string
		name      string
		tagNames  []string
		tagValues []string
		encoded   string
	}

	tests := []test{
		{"empty name", "", nil, nil, ""},
		{"no tags", "name", nil, nil, "name"},
		{"one tag", "name", []string{"tag"}, []string{"value"}, "name,tag=value"},
		{"escaped", "name, with spaces", []string{"tag ", "t ag2 "}, []string{"value ", "value2"}, `name\,\ with\ spaces,t\ ag2\ =value2,tag\ =value\ `},
		{"bad length tags", "name", []string{"tag", ""}, []string{"value"}, "name"},
	}
	for _, tt := range tests {
		t.Run(tt.desc, func(t *testing.T) {
			result := encodeInfluxDBName(tt.name, tt.tagNames, tt.tagValues)
			if result != tt.encoded {
				t.Errorf("encoded '%s' but 
    
func Test_encodeInfluxDBName(t *testing.T) {
	type test struct {
		desc      string
		name      string
		tagNames  []string
		tagValues []string
		encoded   string
	}

	tests := []test{
		{"empty name", "", nil, nil, ""},
		{"no tags", "name", nil, nil, "name"},
		{"one tag", "name", []string{"tag"}, []string{"value"}, "name,tag=value"},
		{"escaped", "name, with spaces", []string{"tag ", "t ag2 "}, []string{"value ", "value2"}, `name\,\ with\ spaces,t\ ag2\ =value2,tag\ =value\ `},
		{"bad length tags", "name", []string{"tag", ""}, []string{"value"}, "name"},
	}
	for _, tt := range tests {
		t.Run(tt.desc, func(t *testing.T) {
			result := encodeInfluxDBName(tt.name, tt.tagNames, tt.tagValues)
			if result != tt.encoded {
				t.Errorf("encoded '%s' but received '%s'", tt.encoded, result)
			}
		})
	}
}