From b1ee21c9f1d77953d5a71a00efd5d0dc37eaaece Mon Sep 17 00:00:00 2001 From: Andreas Hasenack Date: Tue, 17 Oct 2023 10:12:39 -0300 Subject: [PATCH] global replace for /tmp/ files to /var/lib/ubuntu-advantage --- features/apt_messages.feature | 2 +- features/attached_commands.feature | 16 ++++++++-------- features/attached_enable.feature | 2 +- features/attached_status.feature | 4 ++-- features/i18n.feature | 4 ++-- features/motd_messages.feature | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/features/apt_messages.feature b/features/apt_messages.feature index 98569f7401..4790e3e909 100644 --- a/features/apt_messages.feature +++ b/features/apt_messages.feature @@ -653,7 +653,7 @@ Feature: APT Messages """ "*Your Ubuntu Pro subscription has EXPIRED*\nRenew your service at https://ubuntu.com/pro/dashboard" """ - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { diff --git a/features/attached_commands.feature b/features/attached_commands.feature index f619e80abf..6dabcaac29 100644 --- a/features/attached_commands.feature +++ b/features/attached_commands.feature @@ -318,7 +318,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription @uses.config.machine_type.lxd-container Scenario Outline: Attached status in a ubuntu machine with feature overrides Given a `` machine with ubuntu-advantage-tools installed - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { @@ -336,7 +336,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription And I append the following on uaclient config: """ features: - machine_token_overlay: "/tmp/machine-token-overlay.json" + machine_token_overlay: "/var/lib/ubuntu-advantage/machine-token-overlay.json" disable_auto_attach: true other: false """ @@ -352,7 +352,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription """ FEATURES disable_auto_attach: True - machine_token_overlay: /tmp/machine-token-overlay.json + machine_token_overlay: /var/lib/ubuntu-advantage/machine-token-overlay.json other: False """ When I run `pro status --all` as non-root @@ -366,7 +366,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription """ FEATURES disable_auto_attach: True - machine_token_overlay: /tmp/machine-token-overlay.json + machine_token_overlay: /var/lib/ubuntu-advantage/machine-token-overlay.json other: False """ When I run `pro detach --assume-yes` with sudo @@ -782,7 +782,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription Then I verify that `activityInfo.activityToken` value has been updated on the contract And I verify that `activityInfo.activityID` value has been updated on the contract # We are keeping this test to guarantee that the activityPingInterval is also updated - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { @@ -793,7 +793,7 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription } } """ - And I create the file `/tmp/response-overlay.json` with the following: + And I create the file `/var/lib/ubuntu-advantage/response-overlay.json` with the following: """ { "https://contracts.canonical.com/v1/contracts/testCID/machine-activity/testMID": [ @@ -810,8 +810,8 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription And I append the following on uaclient config: """ features: - machine_token_overlay: "/tmp/machine-token-overlay.json" - serviceclient_url_responses: "/tmp/response-overlay.json" + machine_token_overlay: "/var/lib/ubuntu-advantage/machine-token-overlay.json" + serviceclient_url_responses: "/var/lib/ubuntu-advantage/response-overlay.json" """ When I delete the file `/var/lib/ubuntu-advantage/jobs-status.json` And I run `python3 /usr/lib/ubuntu-advantage/timer.py` with sudo diff --git a/features/attached_enable.feature b/features/attached_enable.feature index 6002838576..a9f1209e1f 100644 --- a/features/attached_enable.feature +++ b/features/attached_enable.feature @@ -94,7 +94,7 @@ Feature: Enable command behaviour when attached to an Ubuntu Pro subscription One moment, checking your subscription first Ubuntu Pro: ESM Infra is not available for Ubuntu .* """ - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { diff --git a/features/attached_status.feature b/features/attached_status.feature index ae962593c8..c5b9876adb 100644 --- a/features/attached_status.feature +++ b/features/attached_status.feature @@ -11,7 +11,7 @@ Feature: Attached status When I run `pro status --format yaml` as non-root Then stdout is a yaml matching the `ua_status` schema - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { @@ -24,7 +24,7 @@ Feature: Attached status And I append the following on uaclient config: """ features: - machine_token_overlay: "/tmp/machine-token-overlay.json" + machine_token_overlay: "/var/lib/ubuntu-advantage/machine-token-overlay.json" """ And I run `pro status` with sudo Then stdout contains substring: diff --git a/features/i18n.feature b/features/i18n.feature index 6fb938ab1a..ee99b64ca9 100644 --- a/features/i18n.feature +++ b/features/i18n.feature @@ -126,7 +126,7 @@ Feature: Pro supports multiple languages Then stdout is a json matching the `ua_status` schema When I run `pro status --format yaml` as non-root Then stdout is a yaml matching the `ua_status` schema - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": { @@ -139,7 +139,7 @@ Feature: Pro supports multiple languages And I append the following on uaclient config: """ features: - machine_token_overlay: "/tmp/machine-token-overlay.json" + machine_token_overlay: "/var/lib/ubuntu-advantage/machine-token-overlay.json" """ And I run `pro status` with sudo Then stdout contains substring: diff --git a/features/motd_messages.feature b/features/motd_messages.feature index 98020e6404..14a0a7096e 100644 --- a/features/motd_messages.feature +++ b/features/motd_messages.feature @@ -125,7 +125,7 @@ Feature: MOTD Messages Renew your service at https:\/\/ubuntu.com\/pro\/dashboard """ - When I create the file `/tmp/machine-token-overlay.json` with the following: + When I create the file `/var/lib/ubuntu-advantage/machine-token-overlay.json` with the following: """ { "machineTokenInfo": {