(ctx context.Context, t *testing.T, client *agentsdk.Client)
| 172 | } |
| 173 | |
| 174 | func requireGetAnnouncementBanners(ctx context.Context, t *testing.T, client *agentsdk.Client) []codersdk.BannerConfig { |
| 175 | cc, err := client.ConnectRPC(ctx) |
| 176 | require.NoError(t, err) |
| 177 | defer func() { |
| 178 | _ = cc.Close() |
| 179 | }() |
| 180 | aAPI := proto.NewDRPCAgentClient(cc) |
| 181 | bannersProto, err := aAPI.GetAnnouncementBanners(ctx, &proto.GetAnnouncementBannersRequest{}) |
| 182 | require.NoError(t, err) |
| 183 | banners := make([]codersdk.BannerConfig, 0, len(bannersProto.AnnouncementBanners)) |
| 184 | for _, bannerProto := range bannersProto.AnnouncementBanners { |
| 185 | banners = append(banners, agentsdk.BannerConfigFromProto(bannerProto)) |
| 186 | } |
| 187 | return banners |
| 188 | } |
| 189 | |
| 190 | func TestCustomSupportLinks(t *testing.T) { |
| 191 | t.Parallel() |
no test coverage detected