oh you're right, I don't have any remote cluster named remote_cluster running. I misunderstood the test setup and thought both the local and remote clusters are running on the localhost. But even though I never had this remote_cluster, the tests for ES 7.16.2 were passing.
Is there a way around not checking whether the remote cluster exists or not when the indices to be searched includes remote_cluster:xyz? How was this working with ES 7.16? I have enabled the xpack.security in ES 8.8, is that why I might be getting this error now?