Skip to content

Commit

Permalink
test: use a simpler way to append content to a file
Browse files Browse the repository at this point in the history
Use the existing API of a cockpit Machine, rather than running a shell
command manually.

There is no behaviour change.
  • Loading branch information
ptoscano committed Oct 25, 2024
1 parent 7c42af1 commit 13ab574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/check-subscriptions
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SubscriptionsCase(MachineCase):
self.candlepin.execute(["/root/run-candlepin"])

# make sure the cockpit machine can resolve the service machine hostname
m.execute(f"echo '{CANDLEPIN_ADDR} {CANDLEPIN_HOSTNAME}' >> /etc/hosts")
m.write("/etc/hosts", f"{CANDLEPIN_ADDR} {CANDLEPIN_HOSTNAME}\n", append=True)

# download product info from the candlepin machine
def download_product(product):
Expand Down

0 comments on commit 13ab574

Please sign in to comment.