From b8ebeecec58418b1dc69156cf667e2b6b407d045 Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Tue, 5 Jul 2022 02:12:56 +0800 Subject: [PATCH] tests: replace local hello world bundle with busybox bundle Currently only amd64 and arm64v8 tarball have been checked in testdata, while busybox bundle is downloaded on fly, and supports multiple architectures. To enable integration tests for more architectures, the hello world bundle is replaced by busybox one. Signed-off-by: Shengjing Zhu (cherry picked from commit 66bf3718b4829490b433e25b7be6e92d60121a15) --- tests/integration/README.md | 3 +-- tests/integration/debug.bats | 3 ++- tests/integration/get-images.sh | 4 ---- tests/integration/helpers.bash | 5 ----- tests/integration/mounts_sshfs.bats | 3 ++- tests/integration/run.bats | 3 ++- tests/integration/spec.bats | 3 ++- tests/integration/start_hello.bats | 3 ++- .../integration/testdata/hello-world-amd64.tar | Bin 9216 -> 0 bytes .../testdata/hello-world-arm64v8.tar | Bin 12800 -> 0 bytes 10 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 tests/integration/testdata/hello-world-amd64.tar delete mode 100644 tests/integration/testdata/hello-world-arm64v8.tar diff --git a/tests/integration/README.md b/tests/integration/README.md index 6d0201c16..8712caef4 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -60,7 +60,7 @@ load helpers # setup is called at the beginning of every test. function setup() { - setup_hello + setup_busybox } # teardown is called at the end of every test. @@ -77,5 +77,4 @@ function teardown() { # check expected output [[ "${output}" == *"Hello"* ]] } - ``` diff --git a/tests/integration/debug.bats b/tests/integration/debug.bats index 333745e39..9db676b89 100644 --- a/tests/integration/debug.bats +++ b/tests/integration/debug.bats @@ -3,7 +3,8 @@ load helpers function setup() { - setup_hello + setup_busybox + update_config '.process.args = ["/bin/echo", "Hello World"]' } function teardown() { diff --git a/tests/integration/get-images.sh b/tests/integration/get-images.sh index 9f1bf96ad..63ce40cda 100755 --- a/tests/integration/get-images.sh +++ b/tests/integration/get-images.sh @@ -64,7 +64,3 @@ DEBIAN_IMAGE="$TESTDATA/debian-${arch}.tar.xz" get "$DEBIAN_IMAGE" \ "https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-${arch}/buster/slim/rootfs.tar.xz" echo "DEBIAN_IMAGE=$DEBIAN_IMAGE" - -# hello-world is local, no need to download. -HELLO_IMAGE="$TESTDATA/hello-world-${arch}.tar" -echo "HELLO_IMAGE=$HELLO_IMAGE" diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index b55d1056e..05d94f7fa 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -569,11 +569,6 @@ function setup_busybox() { setup_bundle "$BUSYBOX_IMAGE" } -function setup_hello() { - setup_bundle "$HELLO_IMAGE" - update_config '(.. | select(.? == "sh")) |= "/hello"' -} - function setup_debian() { setup_bundle "$DEBIAN_IMAGE" } diff --git a/tests/integration/mounts_sshfs.bats b/tests/integration/mounts_sshfs.bats index abf82357d..41f1cf4eb 100644 --- a/tests/integration/mounts_sshfs.bats +++ b/tests/integration/mounts_sshfs.bats @@ -16,7 +16,8 @@ function setup() { skip "test requires working sshfs mounts" fi - setup_hello + setup_busybox + update_config '.process.args = ["/bin/echo", "Hello World"]' } function teardown() { diff --git a/tests/integration/run.bats b/tests/integration/run.bats index 63be89d2c..420040a52 100644 --- a/tests/integration/run.bats +++ b/tests/integration/run.bats @@ -3,7 +3,8 @@ load helpers function setup() { - setup_hello + setup_busybox + update_config '.process.args = ["/bin/echo", "Hello World"]' } function teardown() { diff --git a/tests/integration/spec.bats b/tests/integration/spec.bats index b24c6b714..8091ba339 100644 --- a/tests/integration/spec.bats +++ b/tests/integration/spec.bats @@ -3,7 +3,8 @@ load helpers function setup() { - setup_hello + setup_busybox + update_config '.process.args = ["/bin/echo", "Hello World"]' } function teardown() { diff --git a/tests/integration/start_hello.bats b/tests/integration/start_hello.bats index 1c3c906fa..ae138c9c5 100644 --- a/tests/integration/start_hello.bats +++ b/tests/integration/start_hello.bats @@ -3,7 +3,8 @@ load helpers function setup() { - setup_hello + setup_busybox + update_config '.process.args = ["/bin/echo", "Hello World"]' } function teardown() { diff --git a/tests/integration/testdata/hello-world-amd64.tar b/tests/integration/testdata/hello-world-amd64.tar deleted file mode 100644 index aec830e2ec6c6a2ea81a7359a6396f7833c47e22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9216 zcmeHM!E)0u5H&Ep_`)wN49AklPU0{O!}I`558Nmppx8>SsV!wBxoJ;)3ctZ{06vXf zDJ>z>hT_BwGqn%4CG9?~-qXgCGAML@CX7($QD+xR7@JNe5ewJmlWL$t&?)~Z^)ZVs*$$iH_Q1pTFwuCvZt=s#v@uYYHPtN|C|e7IKZ z-I_dS_pUSr*372=OJ@woo|Ji8N>wmjy`)eWnOKqLvb!Q8J z7T^C#*02BfC-N4gEB);jn_Zh)=#S?B{rYcL-tXd1`qz%n?qb{4h9xPRPVrnPT$@j- z-8lalB^jRoq{D^L7@lsF>ui4B^Zg&`Zv<}t&Ih;+oVS&DtKZ+}f138^KU*o?TVpAz zO79KrW}rXlpGtNUCVO)@zt`UL{Qva!{kw+`9$a(sFnS$P z=^{Gvb>Z$`uWv`u3vWXeWP5PkLN7?wfpJ+H0N*L}0g8afgT=j;o`V3nH%ryqGB!BC~!oG|l z8NdlPgs>p5q)-mQmE*Y+g?C!D64Pr=ta|zY3XsT*u|J0}BbBweqo`S4tgnsN4 z!3ylSnIY2XCZya597q8ilvsvPBo6Kh0yzqh%Tnegm_`wEA_ly~g~%IR2UNrZ8se9? zXma5VKsRpDc!Gf&0eOQ2DkKoFzXB=2c*ZxyV;vgQeryQ2LP0UsMiXc|gb>)Wo&J_&}@bPhmD+jD0O*|1x=}J`Y z85DjldAsM*K@$vT+?H|tp`<~2rVx@hPS-R&X!^`?3Q(OYLf3?cY|o8Ymj`&B)0zc) zDxJf*G8~pDTIdr$vvnN5($Rj+hYHprv3i^4$SUuVlTTr`=tn5=+CD8|3ABn+avT0^bGV2Y+>LhVv;7b diff --git a/tests/integration/testdata/hello-world-arm64v8.tar b/tests/integration/testdata/hello-world-arm64v8.tar deleted file mode 100644 index 186c8aefc47da2e2acc74c636e53204c63253c41..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12800 zcmeHNO^*~s7_Qmob1=aJi6k1R1rCNRJ>4@qGek^WScLT>M%N|rhCSW2(;d3ICSBG0 zAqUsQ9{|R)axu}lani(t_z#Q`f;Sa0d-Q4o!T0U%f@Z=JcHAZ=R3+V2_161U&(k&2 zRWqi?-3u&X@e--5Shi(#+ihayWwb^qv0HYx)9$odU7J|8-E6f8wJOV~LH^o=~W)TlbDWle9Af3Rp0+O9e=^so7ExI7j-WR;;k#`>SO+j{+1Mo7sq zuK$4)m3{_{vHm-4ORxVDO_eo~f8j^}JN{d?=D#x1OOBazE9D+Tjj{f%R#)?1qN%bb z^6zsYV<)QY1z?Qt|8}RNzyB*Ez2sQ&FG{klZjQmfZNvBff8LWl$wZ#<_kZL+l1}eQ zpc+@lvYS@7+a2BatNtVQ|8N)p`~PNRkZ?$kr?IT;`PBS35(eA9B@?!Ri{n!KSi8-y z|7O$DpZ|}=bgKq^7KVJQoNeGI1c6$5Cq4=w|)v+tZE*T1iwn0?{qSF=a2e)+|X{U5OP!@rhu zxqI=4ZzceaQ*`&`S#Ry6Hv2FOLv3+>k*fIRe*f|89Uk=`R?dmB)7OolRZ-DQ8X!i-knEdT~!(LKhPr(bL&a3X}B(KM*uxLO6X!h0m7-mA)hCDo+y{ z#BlH)hK>w)Or61iISCAN+GBK?Cl`XaPhFlQ%$4D)S+6f}+GjCK9Ld1R1HV&6G%)2C zV1&^{4v8$Iy^w4mUa3>tqzf>Rr$yZ`V6g<}v2aV-7f83Pd1F_FyT><}B{RJQ}HBNk0V}@RzSzT-#V`AI+0(D+g*XK6fzdqx>bf zKD=}9-tkPLZyEuOfJQ(gpb^jrXaqC@8iCCtp!TC1TAIR#w|_hVHe)WC*^g7Rmj`m7Zd!U$do-Hh}q{b2sd*O$_)c-ZeS0n<6a&1omo-)dbQs_ zQpi=M_UWpB02;7gh4YELsB?^KD1`E9UfsWs;)DKCRmGp1n1LQ4bA{kAZp=$%SE-H7 zDY(k^gY7dYCWGP}#L9XPZlm@c7($s*OiZ1JsB??a`HuEq1zU`-(j2uPov(_o>XRe( z>&3audT~y(AI8f?*{Ql5yR1iwz;8Yz%yS(P>F!fRAp3=-;&@~H{@-ls-~TISC3i1Y ctNrg6Mj3;D+tUC4d@B6wAQ}OUz_W|Mzje)nnE(I)