Skip to content

Commit

Permalink
fix test for old version #900
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Apr 23, 2024
1 parent 686aba6 commit e5a495a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2214,9 +2214,12 @@ func runMainIntegrationScenario(t *testing.T, remoteStorageType, backupConfig st
generateIncrementTestData(t, ch, r, defaultIncrementData)
r.NoError(dockerExec("clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/"+backupConfig, "create", "--tables", tablesPattern, incrementBackupName))

log.Info("create --diff-from-remote backup")
r.NoError(dockerExec("clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/"+backupConfig, "create", "--diff-from-remote", testBackupName, "--tables", tablesPattern, incrementBackupName2))
r.NoError(dockerExec("clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/"+backupConfig, "delete", "local", incrementBackupName2))
// https://github.com/Altinity/clickhouse-backup/pull/900
if compareVersion(os.Getenv("CLICKHOUSE_VERSION"), "21.8") >= 0 {
log.Info("create --diff-from-remote backup")
r.NoError(dockerExec("clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/"+backupConfig, "create", "--diff-from-remote", testBackupName, "--tables", tablesPattern, incrementBackupName2))
r.NoError(dockerExec("clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/"+backupConfig, "delete", "local", incrementBackupName2))
}

log.Info("Upload")
uploadCmd := fmt.Sprintf("%s_COMPRESSION_FORMAT=zstd CLICKHOUSE_BACKUP_CONFIG=/etc/clickhouse-backup/%s clickhouse-backup upload --resume %s", remoteStorageType, backupConfig, testBackupName)
Expand Down

0 comments on commit e5a495a

Please sign in to comment.