Skip to content

Commit 873758c

Browse files
authored
chore: dev-env and e2e improvements (#331)
Makes a few small improvements to `dev-env.zsh` and the E2E configuration: - `_choose-scope` now highlights `database` by default because its the most common usage. - `E2E_PARALLEL` now defaults to 4 because this is a good setting for all fixtures. - The `use-*` functions now set `E2E_FIXTURE`. This makes it so that instead of setting `E2E_FIXTURE` explicitly, you can do: ```sh use-lima make test-e2e ``` or ```sh use-dev-lima make test-e2e ```
1 parent a5bc626 commit 873758c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONTROL_PLANE_IMAGE_REPO ?= host.docker.internal:5000/control-plane
99
TEST_RERUN_FAILS ?= 0
1010
TEST_DISABLE_CACHE ?= 0
1111
E2E_FIXTURE ?=
12-
E2E_PARALLEL ?= 8
12+
E2E_PARALLEL ?= 4
1313
E2E_RUN ?=
1414
E2E_SKIP_CLEANUP ?= 0
1515
E2E_DEBUG ?= 0

hack/dev-env.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ _use-test-config() {
7171

7272
_choose-scope() {
7373
# (j:\n:) joins the array with newlines
74-
local scope_choice=$(echo "host\ndatabase" | sk)
74+
local scope_choice=$(echo "database\nhost" | sk)
7575

7676
if [[ -z "${scope_choice}" ]]; then
7777
return 1
@@ -232,6 +232,7 @@ _psql-local() {
232232

233233
use-compose() {
234234
export CP_ENV=compose
235+
unset E2E_FIXTURE
235236

236237
_update-restish-config \
237238
http://localhost:3000 \
@@ -244,6 +245,7 @@ use-compose() {
244245

245246
use-dev-lima() {
246247
export CP_ENV=dev-lima
248+
export E2E_FIXTURE=dev-lima
247249

248250
_update-restish-config \
249251
http://localhost:3000 \
@@ -261,12 +263,14 @@ use-dev-lima() {
261263

262264
use-lima() {
263265
export CP_ENV=lima
266+
export E2E_FIXTURE=lima
264267

265268
_use-test-config
266269
}
267270

268271
use-ec2() {
269272
export CP_ENV=ec2
273+
export E2E_FIXTURE=ec2
270274

271275
_use-test-config
272276
}

0 commit comments

Comments
 (0)