// MustHasSameServiceName ensures the source keeps same ReceiveAdapterServiceName even if ksvc gets accidentally deleted.
MustHasSameServiceName ensures the source keeps same ReceiveAdapterServiceName even if ksvc gets accidentally deleted.
// MustHasSameServiceName ensures the source keeps same ReceiveAdapterServiceName even if ksvc gets accidentally deleted .
func MustHasSameServiceName(ctx context.Context, c *eventingtestlib.Client, dockerHubSource *sourcesv1alpha1.DockerHubSource) {
	before := GetSourceOrFail(ctx, c, c.Namespace, dockerHubSource.Name).Status.ReceiveAdapterServiceName
	if before == "" {
		c.T.Fatalf("Failed to get DockerHubSource Service for %q", dockerHubSource.Name)
	}
	DeleteKServiceOrFail(ctx, c, before, c.Namespace)
	c.WaitForAllTestResourcesReadyOrFail(ctx)
	after := GetSourceOrFail(ctx, c, c.Namespace, dockerHubSource.Name).Status.ReceiveAdapterServiceName
	if after == "" {
		c.T.Fatalf("Failed to get DockerHubSource Service for %q", dockerHubSource.Name)
	}
	if diff := cmp.Diff(before, after); diff != "" {
		c.T.Fatalf("Source Service name should be same: (-want, +got) = %v", diff)
	}
}
func MustHasSameServiceName ( ctx context . Context , c * eventingtestlib . Client , dockerHubSource * sourcesv1alpha1 . DockerHubSource ) { before := GetSourceOrFail ( ctx , c , c . Namespace , dockerHubSource . Name ) . Status . ReceiveAdapterServiceName if before == " " { c . T . Fatalf ( " " , dockerHubSource . Name ) } DeleteKServiceOrFail ( ctx , c , before , c . Namespace ) c . WaitForAllTestResourcesReadyOrFail ( ctx ) after := GetSourceOrFail ( ctx , c , c . Namespace , dockerHubSource . Name ) . Status . ReceiveAdapterServiceName if after == " " { c . T . Fatalf ( " " , dockerHubSource . Name ) } if diff := cmp . Diff ( before , after ) ; diff != " " { c . T . Fatalf ( " " , diff ) } }
MustHasSameServiceName ensures the source keeps same ReceiveAdapterServiceName even if ksvc gets accidentally deleted.
MustHasSameServiceName ensures the source keeps same ReceiveAdapterServiceName even if ksvc gets accidentally deleted .
// wait for DockerHubSource to re-make ksvc