aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-tests-fix-running-tests-over-ssh.patch
blob: 716de21149afcbceac84911698692ce88efe211a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 93ce539bc6946b9090cc7bf8430f9bdfa0d20fbc Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 18 Jul 2022 12:09:07 +0200
Subject: [PATCH] tests: fix running tests over ssh

setup-alpine checks SSH_CONNECTION. Make sure to clear it when running
tests so tests does not fail when we run the testsuite over ssh.
---
 tests/setup_alpine_test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/setup_alpine_test b/tests/setup_alpine_test
index 903d220..668d20b 100755
--- a/tests/setup_alpine_test
+++ b/tests/setup_alpine_test
@@ -19,7 +19,7 @@ setup_alpine_quick_body() {
 	echo 2 >sys/class/net/eth0/ifindex
 	echo down >sys/class/net/lo/operstate
 	echo down >sys/class/net/eth0/operstate
-	atf_check -s exit:0 \
+	SSH_CONNECTION= atf_check -s exit:0 \
 		-o match:"openrc boot" \
 		-o match:"openrc default" \
 		-e empty \
@@ -43,7 +43,7 @@ setup_alpine_create_answerfile_body() {
 	echo 'USERSSHKEY="ssh-rsa blahbla user@example.com"' >> answers
 	echo 'ROOTSSHKEY="ssh-rsa blahbla user@example.com"' >> answers
 
-	atf_check -s exit:0 \
+	SSH_CONNECTION= atf_check -s exit:0 \
 		-o match:"Starting hostname" \
 		-o match:"Starting mdev" \
 		-o match:"Added mirror" \
-- 
2.37.1