mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 01:20:38 +00:00
Add neon_local test
This commit is contained in:
committed by
Kirill Bulatov
parent
7db018e147
commit
49a211c98a
@@ -900,6 +900,7 @@ fn cli() -> Command {
|
||||
let stop_mode_arg = Arg::new("stop-mode")
|
||||
.short('m')
|
||||
.value_parser(["fast", "immediate"])
|
||||
.default_value("fast")
|
||||
.help("If 'immediate', don't flush repository data at shutdown")
|
||||
.required(false)
|
||||
.value_name("stop-mode");
|
||||
|
||||
@@ -1742,6 +1742,12 @@ class NeonCli(AbstractNeonCli):
|
||||
|
||||
return self.raw_cli(args, check_return_code=check_return_code)
|
||||
|
||||
def start(self, check_return_code=True) -> "subprocess.CompletedProcess[str]":
|
||||
return self.raw_cli(["start"], check_return_code=check_return_code)
|
||||
|
||||
def stop(self, check_return_code=True) -> "subprocess.CompletedProcess[str]":
|
||||
return self.raw_cli(["stop"], check_return_code=check_return_code)
|
||||
|
||||
|
||||
class WalCraft(AbstractNeonCli):
|
||||
"""
|
||||
|
||||
10
test_runner/regress/test_neon_local_cli.py
Normal file
10
test_runner/regress/test_neon_local_cli.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||
|
||||
|
||||
# Test that neon cli is able to start and stop all processes with the user defaults.
|
||||
# def test_neon_cli_basics(neon_simple_env: NeonEnv):
|
||||
def test_neon_cli_basics(neon_env_builder: NeonEnvBuilder):
|
||||
env = neon_env_builder.init()
|
||||
|
||||
env.neon_cli.start()
|
||||
env.neon_cli.stop()
|
||||
Reference in New Issue
Block a user