@@ -42,26 +42,17 @@ var (
4242func TestBackupHAClust (t * testing.T ) {
4343
4444 backupRestoreTest (t , "alpha1_backup_clust_ha" , "zero1_backup_clust_ha" ,
45- testutil .ContainerAddr ("alpha1_backup_clust_ha" , 9080 ),
46- testutil .ContainerAddr ("alpha4_restore_clust_ha" , 8080 ),
47- testutil .ContainerAddr ("zero1_backup_clust_ha" , 6080 ),
48- backupDstHA ,
49- testutil .ContainerAddr ("alpha1_backup_clust_ha" , 8080 ))
45+ "alpha4_restore_clust_ha" , backupDstHA )
5046}
5147
5248func TestBackupNonHAClust (t * testing.T ) {
5349
5450 backupRestoreTest (t , "alpha7_backup_clust_non_ha" , "zero7_backup_clust_non_ha" ,
55- testutil .ContainerAddr ("alpha7_backup_clust_non_ha" , 9080 ),
56- testutil .ContainerAddr ("alpha8_restore_clust_non_ha" , 8080 ),
57- testutil .ContainerAddr ("zero7_backup_clust_non_ha" , 6080 ),
58- backupDstNonHA ,
59- testutil .ContainerAddr ("alpha7_backup_clust_non_ha" , 8080 ))
51+ "alpha8_restore_clust_non_ha" , backupDstNonHA )
6052}
6153
6254func backupRestoreTest (t * testing.T , backupAlphaName string , backupZeroName string ,
63- backupAlphaSocketAddr string , restoreAlphaAddr string ,
64- backupZeroAddr string , backupDst string , backupAlphaSocketAddrHttp string ) {
55+ restoreAlphaName string , backupDst string ) {
6556
6657 // Wait for containers to be healthy before proceeding
6758 t .Logf ("Waiting for %s to be healthy..." , backupAlphaName )
@@ -72,6 +63,12 @@ func backupRestoreTest(t *testing.T, backupAlphaName string, backupZeroName stri
7263 backupZero := testutil.ContainerInstance {Name : backupZeroName , Prefix : testutil .DockerPrefix }
7364 require .NoError (t , backupZero .BestEffortWaitForHealthy (6080 ))
7465
66+ // Resolve addresses after containers are healthy
67+ backupAlphaSocketAddr := testutil .ContainerAddr (backupAlphaName , 9080 )
68+ backupAlphaSocketAddrHttp := testutil .ContainerAddr (backupAlphaName , 8080 )
69+ restoreAlphaAddr := testutil .ContainerAddr (restoreAlphaName , 8080 )
70+ backupZeroAddr := testutil .ContainerAddr (backupZeroName , 6080 )
71+
7572 var dg * dgo.Dgraph
7673 var err error
7774 ctx := context .Background ()
0 commit comments