github.com/octohelm/storage@v0.0.0-20240516030302-1ac2cc1ea347/internal/sql/adapter/postgres/catalog_test.go (about) 1 package postgres 2 3 import ( 4 "testing" 5 6 "github.com/octohelm/storage/pkg/sqlbuilder" 7 ) 8 9 func TestIndexSchema_ToKey(t *testing.T) { 10 i := indexSchema{ 11 TABLE_SCHEMA: "public", 12 TABLE_NAME: "t_kubepkg_version", 13 INDEX_NAME: "t_kubepkg_version_i_version", 14 INDEX_DEF: "CREATE UNIQUE INDEX t_kubepkg_version_i_version ON public.t_kubepkg_version USING btree (f_channel, f_version)", 15 } 16 _ = i.ToKey(sqlbuilder.T("t_kubepkg_version")) 17 }