Skip to content

Commit 8127661

Browse files
committed
Add cvdr create with env config e2e test.
Bug: b/519240653
1 parent cd1841e commit 8127661

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

e2etests/cvdr/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ sh_test(
2727
"@aosp_artifact//:images_zip",
2828
],
2929
)
30+
31+
sh_test(
32+
name = "cvdr_create_with_env_config_test",
33+
srcs = ["cvdr_create_with_env_config_test.sh"],
34+
data = [":cvdr_common_utils"],
35+
)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
source ${TEST_SRCDIR}/_main/cvdr/common_utils.sh
5+
validate_components
6+
7+
SERVICE=$(cvdr get_config user_default_service || cvdr get_config system_default_service)
8+
SERVICE_URL=$(cvdr get_config "services[\"$SERVICE\"].service_url")
9+
10+
HOSTNAME=$(cvdr host create)
11+
cleanup() {
12+
cvdr host delete ${HOSTNAME}
13+
}
14+
trap cleanup EXIT
15+
16+
config=$(mktemp)
17+
18+
cat > ${config} << EOF
19+
{
20+
"instances": [{
21+
"@import": "phone",
22+
"vm": {
23+
"memory_mb": 8192,
24+
"setupwizard_mode": "OPTIONAL",
25+
"cpus": 4
26+
},
27+
"disk": {
28+
"default_build": "@ab/aosp-android-latest-release/aosp_cf_x86_64_only_phone-userdebug",
29+
"download_img_zip": true
30+
}
31+
}
32+
]
33+
}
34+
EOF
35+
36+
out=$(cvdr create --host=${HOSTNAME} ${config})
37+
38+
verify_adb_connection "${out}"

0 commit comments

Comments
 (0)