Merge with main branch

This commit is contained in:
Konstantin Knizhnik
2021-04-21 16:10:05 +03:00
parent 07507274c0
commit d8fa2ec367
12 changed files with 47 additions and 98 deletions
+3 -2
View File
@@ -19,6 +19,7 @@ use postgres::{Client, NoTls};
use crate::local_env::LocalEnv;
use crate::storage::{PageServerNode, WalProposerNode};
use pageserver::ZTimelineId;
use pageserver::zenith_repo_dir;
//
// ComputeControlPlane
@@ -449,8 +450,8 @@ impl PostgresNode {
pub fn pg_regress(&self) {
self.safe_psql("postgres", "CREATE DATABASE regression");
let regress_run_path = self.env.data_dir.join("regress");
let data_dir = zenith_repo_dir();
let regress_run_path = data_dir.join("regress");
fs::create_dir_all(regress_run_path.clone()).unwrap();
fs::create_dir_all(regress_run_path.join("testtablespace")).unwrap();
std::env::set_current_dir(regress_run_path).unwrap();
+1 -8
View File
@@ -16,6 +16,7 @@ use anyhow::Result;
use serde_derive::{Deserialize, Serialize};
use pageserver::ZTimelineId;
use pageserver::zenith_repo_dir;
use walkeeper::xlog_utils;
//
@@ -52,14 +53,6 @@ impl LocalEnv {
}
}
fn zenith_repo_dir() -> PathBuf {
// Find repository path
match std::env::var_os("ZENITH_REPO_DIR") {
Some(val) => PathBuf::from(val.to_str().unwrap()),
None => ".zenith".into(),
}
}
//
// Initialize a new Zenith repository
//
-1
View File
@@ -13,7 +13,6 @@ use std::time::Duration;
use postgres::{Client, NoTls};
use crate::compute::PostgresNode;
use crate::local_env::LocalEnv;
use pageserver::ZTimelineId;