This commit is contained in:
@@ -114,15 +114,15 @@ def main():
|
||||
test_env = os.environ.copy()
|
||||
test_env["E2E_BASE_URL"] = base_url
|
||||
# Set default test credentials
|
||||
test_env["E2E_ADMIN_USERNAME"] = "test_admin"
|
||||
test_env["E2E_ADMIN_PASSWORD"] = "admin123"
|
||||
test_env["E2E_ADMIN_USERNAME"] = "admin"
|
||||
test_env["E2E_ADMIN_PASSWORD"] = "Admin123!@#456"
|
||||
|
||||
# Run playwright test command
|
||||
# Local 1차 검증은 Desktop Chrome만 대상으로 잡아 불필요한 브라우저 설치 의존을 줄인다.
|
||||
cmd = ["npx", "playwright", "test"]
|
||||
has_project_arg = any(arg.startswith("--project=") or arg == "--project" for arg in sys.argv[1:])
|
||||
if not has_project_arg:
|
||||
cmd.append('--project="Desktop Chrome"')
|
||||
cmd.extend(["--project", "Desktop Chrome"])
|
||||
if len(sys.argv) > 1:
|
||||
cmd.extend(sys.argv[1:])
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
EXPECTED = "Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123"
|
||||
TARGETS = [
|
||||
ROOT / "src" / "TaxBaik.Web" / "appsettings.json",
|
||||
ROOT / "src" / "TaxBaik.Web" / "appsettings.Development.json",
|
||||
]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
failed = False
|
||||
for path in TARGETS:
|
||||
try:
|
||||
data = json.loads(path.read_text(encoding="utf-8"))
|
||||
actual = data["ConnectionStrings"]["Default"]
|
||||
except Exception as exc:
|
||||
print(f"ERROR: {path} could not be read: {exc}")
|
||||
failed = True
|
||||
continue
|
||||
|
||||
if actual != EXPECTED:
|
||||
print(f"ERROR: {path} connection string mismatch")
|
||||
print(f" expected: {EXPECTED}")
|
||||
print(f" actual: {actual}")
|
||||
failed = True
|
||||
else:
|
||||
print(f"OK: {path} connection string locked")
|
||||
|
||||
return 1 if failed else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user