@@ -213,6 +213,25 @@ func TestPartitions_Gateway(t *testing.T) {
213213 k8s .KubectlDeleteK (t , secondaryPartitionClusterContext .KubectlOptions (t ), kustomizeDir )
214214 })
215215
216+ // Ensure proxy-defaults config entries are created in Consul before proceeding.
217+ // This is critical for mesh gateways to be properly configured for TLS.
218+ logger .Log (t , "waiting for proxy-defaults config entries to be created in Consul" )
219+ retry .Run (t , func (r * retry.R ) {
220+ ceDefault , _ , err := consulClient .ConfigEntries ().Get (api .ProxyDefaults , api .ProxyConfigGlobal , serverQueryServerOpts )
221+ require .NoError (r , err )
222+ configEntryDefault , ok := ceDefault .(* api.ProxyConfigEntry )
223+ require .True (r , ok )
224+ require .Equal (r , configEntryDefault .GetName (), api .ProxyConfigGlobal )
225+ logger .Log (t , "proxy-defaults config entry verified on default partition" )
226+
227+ ceSecondary , _ , err := consulClient .ConfigEntries ().Get (api .ProxyDefaults , api .ProxyConfigGlobal , serverQueryClientOpts )
228+ require .NoError (r , err )
229+ configEntrySecondary , ok := ceSecondary .(* api.ProxyConfigEntry )
230+ require .True (r , ok )
231+ require .Equal (r , configEntrySecondary .GetName (), api .ProxyConfigGlobal )
232+ logger .Log (t , "proxy-defaults config entry verified on secondary partition" )
233+ })
234+
216235 // We use the static-client pod so that we can make calls to the api gateway
217236 // via kubectl exec without needing a route into the cluster from the test machine.
218237 // Since we're deploying the gateway in the secondary cluster, we create the static client
0 commit comments