Skip to content

Commit

Permalink
Modify existing scenario agama_auto_dolomite for selecting another in…
Browse files Browse the repository at this point in the history
…stallation device
  • Loading branch information
openQA web UI committed Sep 7, 2023
1 parent c2b83ef commit 1587820
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data/yam/agama/auto/alp_dolomite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"software": {
"product": "ALP-Dolomite"
},
"user": {
"fullName": "Bernhard M. Wiedemann",
"password": "nots3cr3t",
"userName": "bernhard"
},
"root": {
"password": "nots3cr3t"
}
}

29 changes: 29 additions & 0 deletions data/yam/agama/auto/alp_tumbleweed.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
local agama = import 'hw.libsonnet';
local findBiggestDisk(disks) =
local sizedDisks = std.filter(function(d) std.objectHas(d, 'size'), disks);
local sorted = std.sort(sizedDisks, function(x) -x.size);
sorted[0].logicalname;

{
software: {
product: 'Tumbleweed',
},
root: {
password: 'nots3cr3t',
},
user: {
fullName: 'Bernhard M. Wiedemann',
password: 'nots3cr3t',
userName: 'bernhard',
},
localization: {
language: 'en_US',
},
storage: {
devices: [
{
name: findBiggestDisk(agama.disks),
},
],
},
}
11 changes: 11 additions & 0 deletions schedule/yam/agama_auto_tumbleweed_select_installation_device.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: agama_auto_tumbleweed_select_installation_device
description: >
Prepare url for agama.auto boot parameter, boot, perform auto-installation with agama.
schedule:
- installation/bootloader_start
- yam/agama/auto
- yam/validate/validate_installed_disk
- yam/validate/validate_product
- yam/validate/validate_user
- yam/validate/validate_apparmor
1 change: 1 addition & 0 deletions test_data/yam/agama_auto_tumbleweed.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
os_release_name: openSUSE Tumbleweed
installed_disk: vda
22 changes: 22 additions & 0 deletions tests/yam/validate/validate_installed_disk.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SUSE's openQA tests

Check failure on line 1 in tests/yam/validate/validate_installed_disk.pm

View workflow job for this annotation

GitHub Actions / CI: Running static tests with perl v5.32

File tests/yam/validate/validate_installed_disk.pm needs tidying
#
# Copyright 2023 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Validate that the product installed at expected disk
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

use base "consoletest";
use strict;
use warnings;
use testapi;
use scheduler 'get_test_suite_data';

sub run {
select_console 'root-console';

my $installed_disk_expected = get_test_suite_data()->{installed_disk};
validate_script_output("df -h | grep /\$", sub { m/$installed_disk_expected/ });
}

1;

0 comments on commit 1587820

Please sign in to comment.