@@ -724,7 +724,7 @@ func TestChannelSettingsRendersManagedConnections(t *testing.T) {
724724 "status" : "resolved" ,
725725 "installations" : []map [string ]any {
726726 {
727- "id" : "ci_1 " ,
727+ "id" : "chinst_workspace_1 " ,
728728 "route" : map [string ]any {
729729 "principalId" : "shared-slack-gateway" ,
730730 "provider" : "slack" ,
@@ -740,24 +740,24 @@ func TestChannelSettingsRendersManagedConnections(t *testing.T) {
740740 },
741741 "connections" : []map [string ]any {
742742 {
743- "id" : "cc_1 " ,
743+ "id" : "chconn_default " ,
744744 "isDefault" : true ,
745745 "state" : "ready" ,
746746 "routes" : []map [string ]any {
747747 {
748- "id" : "cr_1 " ,
748+ "id" : "chroute_channel_1 " ,
749749 "externalChannelId" : "C_channel_1" ,
750750 "requireMention" : false ,
751751 "enabled" : true ,
752752 },
753753 },
754754 },
755755 {
756- "id" : "cc_2 " ,
756+ "id" : "chconn_secondary " ,
757757 "state" : "ready" ,
758758 "routes" : []map [string ]any {
759759 {
760- "id" : "cr_2 " ,
760+ "id" : "chroute_channel_2 " ,
761761 "externalChannelId" : "C_channel_2" ,
762762 "requireMention" : true ,
763763 "enabled" : true ,
@@ -781,27 +781,27 @@ func TestChannelSettingsRendersManagedConnections(t *testing.T) {
781781 HTTPTimeout : 5 * time .Second ,
782782 }, slog .New (slog .NewTextHandler (io .Discard , nil )))
783783
784- installationReq := httptest .NewRequest (http .MethodGet , "/settings/channels/installations/ci_1 " , nil )
784+ installationReq := httptest .NewRequest (http .MethodGet , "/settings/channels/installations/chinst_workspace_1 " , nil )
785785 installationReq .Header .Set ("X-Spritz-User-Id" , "user-1" )
786786 installationRec := httptest .NewRecorder ()
787787 gateway .routes ().ServeHTTP (installationRec , installationReq )
788788
789789 if installationRec .Code != http .StatusSeeOther {
790790 t .Fatalf ("expected installation redirect, got %d: %s" , installationRec .Code , installationRec .Body .String ())
791791 }
792- if location := installationRec .Header ().Get ("Location" ); location != "https://gateway.example.test/settings/slack/channels/installations/ci_1 " {
792+ if location := installationRec .Header ().Get ("Location" ); location != "https://gateway.example.test/settings/slack/channels/installations/chinst_workspace_1 " {
793793 t .Fatalf ("expected installation React route, got %q" , location )
794794 }
795795
796- req := httptest .NewRequest (http .MethodGet , "/settings/channels/installations/ci_1 /connections/cc_2 " , nil )
796+ req := httptest .NewRequest (http .MethodGet , "/settings/channels/installations/chinst_workspace_1 /connections/chconn_secondary " , nil )
797797 req .Header .Set ("X-Spritz-User-Id" , "user-1" )
798798 rec := httptest .NewRecorder ()
799799 gateway .routes ().ServeHTTP (rec , req )
800800
801801 if rec .Code != http .StatusSeeOther {
802802 t .Fatalf ("expected connection redirect, got %d: %s" , rec .Code , rec .Body .String ())
803803 }
804- if location := rec .Header ().Get ("Location" ); location != "https://gateway.example.test/settings/slack/channels/installations/ci_1 /connections/cc_2 " {
804+ if location := rec .Header ().Get ("Location" ); location != "https://gateway.example.test/settings/slack/channels/installations/chinst_workspace_1 /connections/chconn_secondary " {
805805 t .Fatalf ("expected connection React route, got %q" , location )
806806 }
807807}
@@ -891,7 +891,7 @@ func TestChannelSettingsListDoesNotInventLegacyConnectionIDs(t *testing.T) {
891891 "status" : "resolved" ,
892892 "installations" : []map [string ]any {
893893 {
894- "id" : "ci_1 " ,
894+ "id" : "chinst_workspace_1 " ,
895895 "route" : map [string ]any {
896896 "principalId" : "shared-slack-gateway" ,
897897 "provider" : "slack" ,
@@ -942,7 +942,7 @@ func TestChannelSettingsUpdatePostsRoutePolicies(t *testing.T) {
942942 "status" : "resolved" ,
943943 "installations" : []map [string ]any {
944944 {
945- "id" : "ci_1 " ,
945+ "id" : "chinst_workspace_1 " ,
946946 "route" : map [string ]any {
947947 "principalId" : "shared-slack-gateway" ,
948948 "provider" : "slack" ,
@@ -952,24 +952,24 @@ func TestChannelSettingsUpdatePostsRoutePolicies(t *testing.T) {
952952 "state" : "ready" ,
953953 "connections" : []map [string ]any {
954954 {
955- "id" : "cc_1 " ,
955+ "id" : "chconn_default " ,
956956 "isDefault" : true ,
957957 "state" : "ready" ,
958958 "routes" : []map [string ]any {
959959 {
960- "id" : "cr_1 " ,
960+ "id" : "chroute_existing " ,
961961 "externalChannelId" : "C_existing" ,
962962 "requireMention" : true ,
963963 "enabled" : true ,
964964 },
965965 },
966966 },
967967 {
968- "id" : "cc_2 " ,
968+ "id" : "chconn_secondary " ,
969969 "state" : "ready" ,
970970 "routes" : []map [string ]any {
971971 {
972- "id" : "cr_2 " ,
972+ "id" : "chroute_channel_2 " ,
973973 "externalChannelId" : "C_channel_2" ,
974974 "requireMention" : true ,
975975 "enabled" : true ,
@@ -1010,7 +1010,7 @@ func TestChannelSettingsUpdatePostsRoutePolicies(t *testing.T) {
10101010
10111011 req := httptest .NewRequest (
10121012 http .MethodPost ,
1013- "/settings/channels/installations/ci_1 /connections/cc_1 " ,
1013+ "/settings/channels/installations/chinst_workspace_1 /connections/chconn_default " ,
10141014 strings .NewReader ("action=upsert&externalChannelId=C_new" ),
10151015 )
10161016 req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -1024,7 +1024,7 @@ func TestChannelSettingsUpdatePostsRoutePolicies(t *testing.T) {
10241024 if updatePayload ["callerAuthId" ] != "user-1" {
10251025 t .Fatalf ("expected caller auth id, got %#v" , updatePayload ["callerAuthId" ])
10261026 }
1027- if updatePayload ["installationId" ] != "ci_1 " || updatePayload ["connectionId" ] != "cc_1 " {
1027+ if updatePayload ["installationId" ] != "chinst_workspace_1 " || updatePayload ["connectionId" ] != "chconn_default " {
10281028 t .Fatalf ("expected installation and connection ids, got %#v" , updatePayload )
10291029 }
10301030 policies , ok := updatePayload ["channelPolicies" ].([]any )
0 commit comments