Skip to content

Commit dd2d1eb

Browse files
committed
test: Remove special handling for golang client
See: * mendersoftware/mender-image-tests@7f390bf Ticket: QA-1453 Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
1 parent f1894f6 commit dd2d1eb

File tree

6 files changed

+30
-74
lines changed

6 files changed

+30
-74
lines changed

tests/acceptance/commercial/test_delta_update_module.py

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
@pytest.mark.cross_platform
3737
@pytest.mark.commercial
38-
@pytest.mark.min_mender_version("2.1.0")
38+
@pytest.mark.min_mender_version("4.0.0")
3939
class TestDeltaUpdateModule:
4040
@pytest.mark.only_with_image("ext4")
4141
def test_build_module(
@@ -75,7 +75,6 @@ def do_install_mender_binary_delta(
7575
bitbake_variables,
7676
bitbake_image,
7777
connection,
78-
mender_update_binary,
7978
http_server,
8079
board_type,
8180
use_s3,
@@ -97,19 +96,13 @@ def do_install_mender_binary_delta(
9796
)
9897

9998
Helpers.install_update(
100-
image,
101-
connection,
102-
mender_update_binary,
103-
http_server,
104-
board_type,
105-
use_s3,
106-
s3_address,
99+
image, connection, http_server, board_type, use_s3, s3_address,
107100
)
108101

109102
reboot(connection)
110103

111104
run_after_connect("true", connection)
112-
connection.run(f"{mender_update_binary} commit")
105+
connection.run("mender-update commit")
113106

114107
return image
115108

@@ -123,7 +116,6 @@ def test_runtime_checksum(
123116
bitbake_image,
124117
bitbake_path,
125118
connection,
126-
mender_update_binary,
127119
http_server,
128120
board_type,
129121
use_s3,
@@ -145,7 +137,6 @@ def test_runtime_checksum(
145137
bitbake_variables,
146138
bitbake_image,
147139
connection,
148-
mender_update_binary,
149140
http_server,
150141
board_type,
151142
use_s3,
@@ -181,7 +172,6 @@ def test_perform_update(
181172
bitbake_image,
182173
bitbake_path,
183174
connection,
184-
mender_update_binary,
185175
http_server,
186176
board_type,
187177
use_s3,
@@ -204,7 +194,6 @@ def test_perform_update(
204194
bitbake_variables,
205195
bitbake_image,
206196
connection,
207-
mender_update_binary,
208197
http_server,
209198
board_type,
210199
use_s3,
@@ -242,7 +231,7 @@ def test_perform_update(
242231
)
243232

244233
# Verbose provides/depends of the different Artifacts and the client (when supported)
245-
connection.run(f"{mender_update_binary} show-provides", warn=True)
234+
connection.run("mender-update show-provides", warn=True)
246235
subprocess.check_call(
247236
"mender-artifact read %s" % artifact_from, shell=True,
248237
)
@@ -258,13 +247,7 @@ def test_perform_update(
258247
bitbake_variables, connection
259248
)
260249
Helpers.install_update(
261-
artifact_delta,
262-
connection,
263-
mender_update_binary,
264-
http_server,
265-
board_type,
266-
use_s3,
267-
s3_address,
250+
artifact_delta, connection, http_server, board_type, use_s3, s3_address,
268251
)
269252
reboot(connection)
270253
run_after_connect("true", connection)
@@ -273,4 +256,4 @@ def test_perform_update(
273256
)
274257
assert new_active == passive
275258
assert new_passive == active
276-
connection.run(f"{mender_update_binary} commit")
259+
connection.run("mender-update commit")

tests/acceptance/test_bootstrap_artifact.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ def boot_device_with_bootstrap_image(
109109

110110

111111
@pytest.mark.cross_platform
112-
@pytest.mark.min_mender_version("3.5.0")
112+
@pytest.mark.min_mender_version("4.0.0")
113113
@pytest.mark.min_yocto_version("dunfell")
114114
@pytest.mark.only_with_image("ext4", "ext3", "ext2")
115115
def test_bootstrap_artifact_install(
116-
request, boot_device_with_bootstrap_image, connection, mender_update_binary
116+
request, boot_device_with_bootstrap_image, connection
117117
):
118118
"""Test that the Mender Bootstrap Artifact works correctly
119119
@@ -138,16 +138,12 @@ def test_bootstrap_artifact_install(
138138
)
139139

140140
# Check that the database of the client has been populated
141-
device_provides = connection.run(
142-
f"{mender_update_binary} show-provides"
143-
).stdout.strip()
141+
device_provides = connection.run("mender-update show-provides").stdout.strip()
144142
assert "rootfs-image.checksum" in device_provides
145143
assert "rootfs-image.version" in device_provides
146144

147145
# Verify that no errors occured during the install (in which case the artifact-name would be uknown)
148-
show_artifact = connection.run(
149-
f"{mender_update_binary} show-artifact"
150-
).stdout.strip()
146+
show_artifact = connection.run("mender-update show-artifact").stdout.strip()
151147
assert (
152148
show_artifact != "unknown"
153149
), "There were errors installing the Bootstrap Artifact"

tests/acceptance/test_build.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,14 +1239,9 @@ def test_mender_inventory_network_scripts(
12391239
), "mender-inventory-network-scripts unexpectedly a part of the image"
12401240

12411241
@pytest.mark.cross_platform
1242-
@pytest.mark.min_mender_version("2.7.0")
1242+
@pytest.mark.min_mender_version("4.0.0")
12431243
def test_mender_dbus_interface_file(
1244-
self,
1245-
request,
1246-
prepared_test_build,
1247-
bitbake_image,
1248-
bitbake_path,
1249-
mender_update_binary,
1244+
self, request, prepared_test_build, bitbake_image, bitbake_path,
12501245
):
12511246
"""
12521247
Test that the D-Bus interface files are provided by the mender-client-dev package,

tests/acceptance/test_dbus.py

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,22 @@ def test_dbus_system_configuration_file(self, bitbake_variables, connection):
4444
).stdout.strip()
4545
assert "io.mender.AuthenticationManager" in output
4646

47-
@pytest.mark.min_mender_version("2.5.0")
47+
@pytest.mark.min_mender_version("4.0.0")
4848
def test_dbus_non_root_access(
49-
self,
50-
request,
51-
bitbake_variables,
52-
connection,
53-
mender_auth_binary,
54-
mender_auth_service,
49+
self, request, bitbake_variables, connection,
5550
):
5651
"""Test that only root user can access Mender DBus API."""
5752

5853
# This is the command that is expected to fail for non-root user
5954
dbus_send_command = "dbus-send --system --dest=io.mender.AuthenticationManager --print-reply /io/mender/AuthenticationManager io.mender.Authentication1.GetJwtToken"
6055

6156
try:
62-
connection.run(f"{mender_auth_binary} bootstrap", warn=True)
63-
connection.run(f"systemctl start {mender_auth_service}")
57+
connection.run("mender-auth bootstrap", warn=True)
58+
connection.run("systemctl start mender-authd")
6459

6560
# Wait one state machine cycle for the D-Bus API to be available
6661
for _ in range(60):
67-
result = connection.run(f"journalctl --unit {mender_auth_service}")
62+
result = connection.run("journalctl --unit mender-authd")
6863
if (
6964
"Authorize failed:" in result.stdout
7065
or "Failed to authorize" in result.stdout
@@ -88,23 +83,17 @@ def test_dbus_non_root_access(
8883
), result.stderr
8984

9085
finally:
91-
connection.run(f"systemctl stop {mender_auth_service}")
86+
connection.run("systemctl stop mender-authd")
9287
cleanup_mender_state(request, connection)
9388

94-
@pytest.mark.min_mender_version("2.5.0")
89+
@pytest.mark.min_mender_version("4.0.0")
9590
def test_dbus_fetch_jwt_token(
96-
self,
97-
request,
98-
bitbake_variables,
99-
connection,
100-
setup_mock_server,
101-
mender_auth_binary,
102-
mender_auth_service,
91+
self, request, bitbake_variables, connection, setup_mock_server,
10392
):
10493
"""Test that the JWT token can be fetched using D-Bus."""
10594

10695
# bootstrap the auth service
107-
result = connection.run(f"{mender_auth_binary} bootstrap --forcebootstrap")
96+
result = connection.run("mender-auth bootstrap --forcebootstrap")
10897
assert result.exited == 0
10998

11099
try:
@@ -117,7 +106,7 @@ def test_dbus_fetch_jwt_token(
117106
# get the JWT token via D-Bus
118107
try:
119108
# start the mender-auth service
120-
result = connection.run(f"systemctl start {mender_auth_service}")
109+
result = connection.run("systemctl start mender-authd")
121110
assert result.exited == 0
122111

123112
# fetch the JWT token
@@ -163,7 +152,7 @@ def test_dbus_fetch_jwt_token(
163152

164153
finally:
165154
p.terminate()
166-
connection.run(f"systemctl stop {mender_auth_service}")
155+
connection.run("systemctl stop mender-authd")
167156
connection.run("rm -f /tmp/dbus-monitor.log")
168157

169158
finally:

tests/acceptance/test_ubimg.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -246,29 +246,22 @@ def test_volumes(self, bitbake_variables, ubimg_without_uboot_env):
246246
assert int(ubinfo["rootfsa"]["ubinize"]["vol_size"]) <= 1.02 * rootfs_size
247247
assert int(ubinfo["rootfsb"]["ubinize"]["vol_size"]) <= 1.02 * rootfs_size
248248

249+
@pytest.mark.min_mender_version("4.0.0")
249250
def test_volume_contents(
250-
self,
251-
bitbake_variables,
252-
mender_auth_binary,
253-
mender_update_binary,
254-
ubimg_without_uboot_env,
251+
self, bitbake_variables, ubimg_without_uboot_env,
255252
):
256253
"""Test that data volume has correct contents"""
257254

258255
with make_tempdir() as tmpdir:
259256
rootdir = extract_ubimg_files(ubimg_without_uboot_env, tmpdir)
260257

258+
assert os.path.exists(os.path.join(rootdir, "rootfsa/usr/bin/mender-auth"))
259+
assert os.path.exists(os.path.join(rootdir, "rootfsb/usr/bin/mender-auth"))
261260
assert os.path.exists(
262-
os.path.join(rootdir, f"rootfsa/usr/bin/{mender_auth_binary}")
261+
os.path.join(rootdir, "rootfsa/usr/bin/mender-update")
263262
)
264263
assert os.path.exists(
265-
os.path.join(rootdir, f"rootfsb/usr/bin/{mender_auth_binary}")
266-
)
267-
assert os.path.exists(
268-
os.path.join(rootdir, f"rootfsa/usr/bin/{mender_update_binary}")
269-
)
270-
assert os.path.exists(
271-
os.path.join(rootdir, f"rootfsb/usr/bin/{mender_update_binary}")
264+
os.path.join(rootdir, "rootfsb/usr/bin/mender-update")
272265
)
273266
# TODO: verify contents of data partition
274267

0 commit comments

Comments
 (0)