Skip to content

Commit

Permalink
global replace for /tmp/ files to /var/lib/ubuntu-advantage
Browse files Browse the repository at this point in the history
  • Loading branch information
panlinux committed Oct 17, 2023
1 parent ec1f64e commit b1ee21c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion features/apt_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 8 additions & 8 deletions features/attached_commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<release>` 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": {
Expand All @@ -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
"""
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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": {
Expand All @@ -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": [
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion features/attached_enable.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions features/attached_status.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions features/i18n.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion features/motd_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit b1ee21c

Please sign in to comment.