@series.lts @uses.config.contract_token @uses.config.machine_type.lxd.container
Scenario Outline: APT auth file is edited correctly on enable -- @1.1 ubuntu release # features/attached_enable.feature:1135
Given a `xenial` machine with ubuntu-advantage-tools installed # features/steps/steps.py:61
When I attach `contract_token` with sudo # features/steps/steps.py:510
When I run `wc -l /etc/apt/auth.conf.d/90ubuntu-advantage` with sudo # features/steps/steps.py:373
Then I will see the following on stdout # features/steps/steps.py:611
"""
2 /etc/apt/auth.conf.d/90ubuntu-advantage
"""
When I run `cp /etc/apt/auth.conf.d/90ubuntu-advantage /etc/apt/auth.conf.d/90ubuntu-advantage.backup` with sudo # features/steps/steps.py:373
When I run `pro disable esm-infra` with sudo # features/steps/steps.py:373
When I run `cp /etc/apt/auth.conf.d/90ubuntu-advantage.backup /etc/apt/auth.conf.d/90ubuntu-advantage` with sudo # features/steps/steps.py:373
When I run `pro enable esm-infra` with sudo # features/steps/steps.py:373
When I run `wc -l /etc/apt/auth.conf.d/90ubuntu-advantage` with sudo # features/steps/steps.py:373
Then I will see the following on stdout # features/steps/steps.py:611
"""
2 /etc/apt/auth.conf.d/90ubuntu-advantage
"""
When I run `pro enable cis` with sudo # features/steps/steps.py:373
When I run `wc -l /etc/apt/auth.conf.d/90ubuntu-advantage` with sudo # features/steps/steps.py:373
Then I will see the following on stdout # features/steps/steps.py:611
"""
3 /etc/apt/auth.conf.d/90ubuntu-advantage
"""
Output of the automated test for this bug:
Loading config defaults from "./tox.ini" s:%(levelname) s:%(name) s:%(message) s outline_ annotation_ schema {name} -- @{row.id} {examples.name} work/ubuntu- advantage- client/ features instance = False credentials_ path = None token_staging = <REDACTED> token_staging_ expired = <REDACTED> integration rce.PROPOSED contract_ token attached_ enable. feature: 2
Using defaults:
color True
show_snippets True
show_skipped False
dry_run False
show_source True
show_timings True
stdout_capture False
stderr_capture False
log_capture False
logging_format %(asctime)
logging_level info
steps_catalog False
summary True
junit True
stage None
userdata {}
default_format pretty
default_tags
scenario_
more_formatters {}
Using default path "./features"
Trying base directory: /home/renan/
--- job suffix: None
Config options:
image_clean = True
destroy_instances = True
ephemeral_
snapshot_strategy = False
cloud_
contract_token = <REDACTED>
contract_
contract_
machine_type = lxd.container
private_key_file = None
private_key_name = uaclient-
reuse_image = None
debs_path = None
artifact_dir = None
install_from = InstallationSou
custom_ppa = None
custom_ppa_keyid = None
userdata_file = None
check_version = 27.11.2~16.04.1
sbuild_chroot = None
@uses.config.
Feature: Enable command behaviour when attached to an Ubuntu Pro subscription # features/
@series.lts @uses.config. contract_ token @uses.config. machine_ type.lxd. container attached_ enable. feature: 1135 advantage- tools installed # features/ steps/steps. py:61 steps/steps. py:510 auth.conf. d/90ubuntu- advantage` with sudo # features/ steps/steps. py:373 steps/steps. py:611 auth.conf. d/90ubuntu- advantage auth.conf. d/90ubuntu- advantage /etc/apt/ auth.conf. d/90ubuntu- advantage. backup` with sudo # features/ steps/steps. py:373 steps/steps. py:373 auth.conf. d/90ubuntu- advantage. backup /etc/apt/ auth.conf. d/90ubuntu- advantage` with sudo # features/ steps/steps. py:373 steps/steps. py:373 auth.conf. d/90ubuntu- advantage` with sudo # features/ steps/steps. py:373 steps/steps. py:611 auth.conf. d/90ubuntu- advantage steps/steps. py:373 auth.conf. d/90ubuntu- advantage` with sudo # features/ steps/steps. py:373 steps/steps. py:611 auth.conf. d/90ubuntu- advantage
Scenario Outline: APT auth file is edited correctly on enable -- @1.1 ubuntu release # features/
Given a `xenial` machine with ubuntu-
When I attach `contract_token` with sudo # features/
When I run `wc -l /etc/apt/
Then I will see the following on stdout # features/
"""
2 /etc/apt/
"""
When I run `cp /etc/apt/
When I run `pro disable esm-infra` with sudo # features/
When I run `cp /etc/apt/
When I run `pro enable esm-infra` with sudo # features/
When I run `wc -l /etc/apt/
Then I will see the following on stdout # features/
"""
2 /etc/apt/
"""
When I run `pro enable cis` with sudo # features/
When I run `wc -l /etc/apt/
Then I will see the following on stdout # features/
"""
3 /etc/apt/
"""
1 feature passed, 0 failed, 30 skipped _______ _______ _______ _______ summary _______ _______ _______ _______ _______ _
1 scenario passed, 0 failed, 474 skipped
13 steps passed, 0 failed, 8510 skipped, 0 undefined
Took 1m46.529s
_______
behave-lxd-16.04: commands succeeded
congratulations :)