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: rules_test.go
    path of file: ./repos/cockroach/pkg/sql/schemachanger/scplan/internal/rules/release_23_1
    
    the code of the file until where you have to start completion: // Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package release_23_1

import (
	"sort"
	"testing"

	"github.com/cockroachdb/cockroach/pkg/sql/schemachanger/rel"
	"github.com/cockroac
    
func TestRulesYAML(t *testing.T) {
	datadriven.Walk(t, datapathutils.TestDataPath(t), func(t *testing.T, path string) {
		datadriven.RunTest(t, path, func(t *testing.T, d *datadriven.TestData) string {
			switch d.Cmd {
			case "rules":
				var m yaml.Node
				m.Kind = yaml.MappingNode
				var s []rel.RuleDef
				screl.Schema.ForEachRule(func(def rel.RuleDef) {
					s = append(s, def)
				})
				sort.SliceStable(s, func(i, j int) bool {
					return s[i].Name < s[j].Name
				})
				for _, def := range s {
					var rule yaml.Node
					if err := rule.Encode(def); err != nil {
						panic(err)
					}
					m.Content = append(m.Content, rule.Content...)
				}
				out, err := yaml.Marshal(m)
				if err != nil {
					d.Fatalf(t, "failed to marshal rules: %v", err)
				}
				return string(out)
			case "deprules":
				out, err := registry.MarshalDepRules()
				require.NoError(t, err)
				return out
			}
			d.Fatalf(t, "deprules, oprules, and rules are the only commands, got %s", d.Cmd)
			return ""
		})
	})
}