public void can_find_postgres_binaries_with_default_settings() { //arrange var postgresBinaryLocator = new PostgresBinaryLocator(null); //act var foundDirectory = postgresBinaryLocator.Directory; //assert Assert.True(!string.IsNullOrEmpty(foundDirectory)); }
private PostgresRunner Run() { _instanceDirectory = Path.Combine(_options.DataDirectory ?? TempDirectory.GetUnusedPath(), GetUniqueHash()); FileSystem.CreateFolder(_instanceDirectory); _port = _options.Port ?? PortPool.GetInstance.GetNextOpenPort(); _binDirectory = new PostgresBinaryLocator(_options.BinariesSearchPattern).Directory; PostgresPlatformSetup .Start(_binDirectory); PostgresInitializatorProcess .Exec(_binDirectory, _instanceDirectory, PostgresDefaults.User); PostgresStarterProcess .Exec(_binDirectory, _instanceDirectory, _port); State = State.Running; return(this); }