Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package openQA for openSUSE:Factory checked 
in at 2025-08-08 15:13:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openQA (Old)
 and      /work/SRC/openSUSE:Factory/.openQA.new.1085 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openQA"

Fri Aug  8 15:13:31 2025 rev:726 rq:1298270 version:5.1754567283.cc45a4c0

Changes:
--------
--- /work/SRC/openSUSE:Factory/openQA/openQA.changes    2025-08-07 
16:50:11.731777561 +0200
+++ /work/SRC/openSUSE:Factory/.openQA.new.1085/openQA.changes  2025-08-08 
15:15:08.580380809 +0200
@@ -1,0 +2,10 @@
+Thu Aug 07 15:11:29 UTC 2025 - ok...@suse.com
+
+- Update to version 5.1754567283.cc45a4c0:
+  * Rewrote client script from perl to bash to fix heavy tests
+  * Remove script declaration on profiles
+  * build(deps-dev): bump eslint-plugin-prettier from 5.5.3 to 5.5.4
+  * Remove test related to deprecated client script
+  * Obsolete script/client after 4 year deprecation period
+
+-------------------------------------------------------------------

Old:
----
  openQA-5.1754477962.22b1fea4.obscpio

New:
----
  openQA-5.1754567283.cc45a4c0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openQA-client-test.spec ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:10.292452507 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:10.292452507 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name openQA-client
 Name:           %{short_name}-test
-Version:        5.1754477962.22b1fea4
+Version:        5.1754567283.cc45a4c0
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ openQA-devel-test.spec ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:10.320453681 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:10.320453681 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name openQA-devel
 Name:           %{short_name}-test
-Version:        5.1754477962.22b1fea4
+Version:        5.1754567283.cc45a4c0
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ openQA-test.spec ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:10.344454685 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:10.348454853 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name openQA
 Name:           %{short_name}-test
-Version:        5.1754477962.22b1fea4
+Version:        5.1754567283.cc45a4c0
 Release:        0
 Summary:        Test package for openQA
 License:        GPL-2.0-or-later

++++++ openQA-worker-test.spec ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:10.372455858 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:10.376456026 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name openQA-worker
 Name:           %{short_name}-test
-Version:        5.1754477962.22b1fea4
+Version:        5.1754567283.cc45a4c0
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ openQA.spec ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:10.404457198 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:10.408457366 +0200
@@ -97,7 +97,7 @@
 %define devel_requires %devel_no_selenium_requires chromedriver
 
 Name:           openQA
-Version:        5.1754477962.22b1fea4
+Version:        5.1754567283.cc45a4c0
 Release:        0
 Summary:        The openQA web-frontend, scheduler and tools
 License:        GPL-2.0-or-later

++++++ node_modules.obscpio ++++++
Binary files old/eslint-plugin-prettier-5.5.3.tgz and 
new/eslint-plugin-prettier-5.5.3.tgz differ
Binary files old/eslint-plugin-prettier-5.5.4.tgz and 
new/eslint-plugin-prettier-5.5.4.tgz differ

++++++ node_modules.spec.inc ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:11.268493383 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:11.272493550 +0200
@@ -75,7 +75,7 @@
 Source1074:         
https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#/escape-string-regexp-4.0.0.tgz
 Source1075:         
https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz#/eslint-9.32.0.tgz
 Source1076:         
https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz#/eslint-config-prettier-10.1.8.tgz
-Source1077:         
https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.3.tgz#/eslint-plugin-prettier-5.5.3.tgz
+Source1077:         
https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz#/eslint-plugin-prettier-5.5.4.tgz
 Source1078:         
https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz#/eslint-scope-8.4.0.tgz
 Source1079:         
https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#/eslint-visitor-keys-3.4.3.tgz
 Source1080:         
https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#/eslint-visitor-keys-4.2.1.tgz

++++++ openQA-5.1754477962.22b1fea4.obscpio -> 
openQA-5.1754567283.cc45a4c0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openQA-5.1754477962.22b1fea4/docs/Installing.asciidoc 
new/openQA-5.1754567283.cc45a4c0/docs/Installing.asciidoc
--- old/openQA-5.1754477962.22b1fea4/docs/Installing.asciidoc   2025-08-06 
12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/docs/Installing.asciidoc   2025-08-07 
13:48:03.000000000 +0200
@@ -1242,7 +1242,6 @@
   /usr/bin/curl rix,
   /usr/bin/jq rix,
   /usr/bin/mktemp rix,
-  /usr/share/openqa/script/client rix,
 ```
 
 Additions should be added to 
`/etc/apparmor.d/local/usr.share.openqa.script.openqa`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openQA-5.1754477962.22b1fea4/lib/OpenQA/Script/Client.pm 
new/openQA-5.1754567283.cc45a4c0/lib/OpenQA/Script/Client.pm
--- old/openQA-5.1754477962.22b1fea4/lib/OpenQA/Script/Client.pm        
2025-08-06 12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/lib/OpenQA/Script/Client.pm        
1970-01-01 01:00:00.000000000 +0100
@@ -1,176 +0,0 @@
-# Copyright 2018-2021 SUSE LLC
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-package OpenQA::Script::Client;
-
-use Mojo::Base -strict, -signatures;
-
-use Exporter 'import';
-use Mojo::JSON;    # booleans
-use Data::Dump 'dd';
-use Mojo::URL;
-use Feature::Compat::Try;
-use Scalar::Util ();
-use OpenQA::Client;
-use OpenQA::YAML qw(dump_yaml load_yaml);
-# use UTF-8 on all streams to prevent problems when reading/writing unicode
-use open ':std', ':encoding(UTF-8)';
-
-
-our @EXPORT = qw(
-  handle_result
-  prepend_api_base
-  url_from_host
-  run
-);
-
-our $apibase = '/api/v1';
-
-sub handle_result ($options, $res) {
-    my $rescode = $res->code // 0;
-    my $message = '{no message}';
-    $message = $res->{error}->{message} if ($rescode != 200 && $res->{error} 
&& $res->{error}->{message});
-
-    if ($rescode >= 200 && $rescode <= 299) {
-        printf(STDERR "%s - %s\n", $rescode, $message) if $rescode > 200;
-        my $content_type = $res->headers->content_type;
-        my $json = $res->json;
-        my $body = $res->body;
-        if ($options->{'json-output'}) {
-            if ($content_type =~ m{text/yaml}) {
-                my $yaml = load_yaml(string => $body);
-                print Cpanel::JSON::XS->new->pretty->encode($yaml);
-            }
-            else {
-                print 
Cpanel::JSON::XS->new->allow_nonref->pretty->encode($json);
-            }
-        }
-        elsif ($options->{'yaml-output'}) {
-            if ($content_type =~ m{text/yaml}) {
-                # avoid messy prompt when missing final linebreak
-                $body .= "\n" unless $body =~ m/\n\z/;
-                print $body;
-            }
-            else {
-                print dump_yaml($json);
-            }
-        }
-        else {
-            dd($content_type =~ m{text/yaml} ? load_yaml(string => $body) : 
$json);
-        }
-        return $json;
-    }
-
-    printf(STDERR "ERROR: %s - %s\n", $rescode, $message);
-    if ($res->body) {
-        if ($options->{json}) {
-            print Cpanel::JSON::XS->new->pretty->encode($res->json);
-        }
-        else {
-            dd($res->json || $res->body);
-        }
-    }
-    return undef;
-}
-
-# prepend the API-base if the specified path is relative
-sub prepend_api_base ($path) {
-    $path = join('/', $apibase, $path) if $path !~ m/^\//;
-    return $path;
-}
-
-sub url_from_host ($host) {
-    return Mojo::URL->new($host) if $host =~ '/';
-    my $url = Mojo::URL->new();
-    $url->host($host);
-    $url->scheme($host eq 'localhost' ? 'http' : 'https');
-    return $url;
-}
-
-sub run ($options, $operation, @args) {
-    $options->{host} ||= 'localhost';
-    $apibase = $options->{apibase} if $options->{apibase};
-    my $path = prepend_api_base($operation);
-    my $method = 'get';
-    my %params;
-
-    if ($options->{params}) {
-        local $/;
-        open(my $fh, '<', $options->{params});
-        my $info = Cpanel::JSON::XS->new->relaxed->decode(<$fh>);
-        close $fh;
-        %params = %{$info};
-    }
-
-    for my $arg (@ARGV) {
-        if ($arg =~ /^(?:get|post|delete|put)$/i) {
-            $method = lc $arg;
-        }
-        elsif ($arg =~ /^([[:alnum:]_\[\]\.]+)=(.+)$/s) {
-            $params{$1} = $2;
-        }
-    }
-
-    my $url = url_from_host($options->{host});
-    $url->path($path);
-
-    if ($options->{form}) {
-        my %form;
-        for (keys %params) {
-            if (/(\S+)\.(\S+)/) {
-                $form{$1}{$2} = $params{$_};
-            }
-            else {
-                $form{$_} = $params{$_};
-            }
-        }
-        %params = %form;
-    }
-    else {
-        $url->query([%params]) if %params;
-    }
-
-    my $accept = $options->{accept} || '';
-    my %accept = (
-        yaml => 'text/yaml',
-        json => 'application/json',
-    );
-    # We accept any content-type by default
-    my $accept_header = $accept{$accept} || '*/*';
-
-    my $client
-      = OpenQA::Client->new(apikey => $options->{apikey}, apisecret => 
$options->{apisecret}, api => $url->host);
-
-    return handle_result($options, $client->$method($url, form => 
\%params)->res) if $options->{form};
-    return handle_result($options,
-        $client->$method($url, {'Content-Type' => 'application/json'} => 
$options->{'json-data'})->res)
-      if $options->{'json-data'};
-
-    # Either the user wants to call a command or wants to interact with
-    # the rest api directly.
-    if ($options->{archive}) {
-        my $res;
-        $options->{path} = $path;
-        $options->{url} = $url;
-        $options->{params} = \%params;
-        $options->{params2} = @ARGV;
-        try { $res = $client->archive->run($options) }
-        catch ($e) { die "ERROR: $e\n" }
-        exit(0);
-    }
-    elsif ($operation eq 'jobs/overview/restart') {
-        $url->path(prepend_api_base('jobs/overview'));
-        my $relevant_jobs = handle_result($options, $client->get($url)->res);
-        my @job_ids = map { $_->{id} } @$relevant_jobs;
-        $url->path(prepend_api_base('jobs/restart'));
-        $url->query(Mojo::Parameters->new);
-        $url->query(jobs => \@job_ids);
-        print("$url\n");
-        return handle_result($options, $client->post($url, {Accept => 
$accept_header})->res);
-    }
-    else {
-        return handle_result($options, $client->$method($url, {Accept => 
$accept_header})->res);
-    }
-}
-
-1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openQA-5.1754477962.22b1fea4/package-lock.json 
new/openQA-5.1754567283.cc45a4c0/package-lock.json
--- old/openQA-5.1754477962.22b1fea4/package-lock.json  2025-08-06 
12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/package-lock.json  2025-08-07 
13:48:03.000000000 +0200
@@ -24,7 +24,7 @@
       "devDependencies": {
         "eslint": "^9.32.0",
         "eslint-config-prettier": "^10.1.8",
-        "eslint-plugin-prettier": "^5.5.3",
+        "eslint-plugin-prettier": "^5.5.4",
         "prettier": "3.6.2"
       }
     },
@@ -967,9 +967,9 @@
       }
     },
     "node_modules/eslint-plugin-prettier": {
-      "version": "5.5.3",
-      "resolved": 
"https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.3.tgz";,
-      "integrity": 
"sha512-NAdMYww51ehKfDyDhv59/eIItUVzU0Io9H2E8nHNGKEeeqlnci+1gCvrHib6EmZdf6GxF+LCV5K7UC65Ezvw7w==",
+      "version": "5.5.4",
+      "resolved": 
"https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz";,
+      "integrity": 
"sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openQA-5.1754477962.22b1fea4/package.json 
new/openQA-5.1754567283.cc45a4c0/package.json
--- old/openQA-5.1754477962.22b1fea4/package.json       2025-08-06 
12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/package.json       2025-08-07 
13:48:03.000000000 +0200
@@ -14,7 +14,7 @@
   "devDependencies": {
     "eslint": "^9.32.0",
     "eslint-config-prettier": "^10.1.8",
-    "eslint-plugin-prettier": "^5.5.3",
+    "eslint-plugin-prettier": "^5.5.4",
     "prettier": "3.6.2"
   },
   "dependencies": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openQA-5.1754477962.22b1fea4/profiles/apparmor.d/usr.share.openqa.script.openqa
 
new/openQA-5.1754567283.cc45a4c0/profiles/apparmor.d/usr.share.openqa.script.openqa
--- 
old/openQA-5.1754477962.22b1fea4/profiles/apparmor.d/usr.share.openqa.script.openqa
 2025-08-06 12:59:22.000000000 +0200
+++ 
new/openQA-5.1754567283.cc45a4c0/profiles/apparmor.d/usr.share.openqa.script.openqa
 2025-08-07 13:48:03.000000000 +0200
@@ -132,7 +132,6 @@
   /opt/openqa-trigger-from-obs/*:*/*/*products* rw,
 
   /opt/os-autoinst-scripts/** rix,
-  /usr/share/openqa/script/client rix,
   /usr/share/openqa/script/openqa-cli px,
   /usr/share/openqa/script/openqa-clone-job mrix,
   /usr/share/openqa/script/openqa-clone-job r,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openQA-5.1754477962.22b1fea4/script/client 
new/openQA-5.1754567283.cc45a4c0/script/client
--- old/openQA-5.1754477962.22b1fea4/script/client      2025-08-06 
12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/script/client      2025-08-07 
13:48:03.000000000 +0200
@@ -1,188 +1,18 @@
-#!/usr/bin/env perl
+#!/usr/bin/env bash
 
 # Copyright 2014-2020 SUSE LLC
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-=head1 NAME
+# NAME
+#   openqa-client - obsolete script for talking to an openQA server
+#
+# SYNOPSIS
+#   This script is obsolete, use openqa-cli instead
+#
+#   openqa-client
 
-openqa-client - deprecated script for talking to an openQA server
+echo "NOTICE: openqa-client is obsolete. Use openqa-cli instead" >&2
 
-=head1 SYNOPSIS
+[[ $1 == "--help" || $1 == "-h" ]] && exit 0
 
-This script is deprecated, use openqa-cli instead
-
-openqa-client [OPTIONS] PATH
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<--host> HOST
-
-Connect to specified host, defaults to localhost
-
-=item B<--params> FILE
-
-Load get/post parameters from a json file. For example
-
-{
-   "FLAVOR" : "DVD",
-   "BUILD" : "42",
-   "ARCH" : "i586",
-   "DISTRI" : "opensuse",
-   "VERSION" : "26",
-}
-
-=item B<--apibase>
-
-Set API base URL component, default: '/api/v1'
-
-=item B<--json-output>
-
-Output JSON instead of Perl structures.
-
-=item B<--yaml-output>
-
-Output YAML instead of Perl structures.
-
-=item B<accept> (json|yaml)
-
-Send Accept header to explicitly tell the API what format is accepted
-
-Returning YAML is deprecated, and currently only one endpoint
-(job_templates_scheduling) is able to return YAML anyway.
-
-By default, C<Accept: */*> is sent.
-
-=item B<--verbose, -v>
-
-Be verbose in output.
-
-=item B<--apikey> KEY, B<--apisecret> SECRET
-
-Specify api key and secret to use, overrides use of config file 
~/.config/openqa/client.conf
-
-=item B<--json-data>
-
-Send JSON data; expected by certain routes
-
-For example:
-jobs/639172 put --json-data '{"group_id": 1}'
-
-=item B<--form>
-
-Send form data (application/x-www-form-urlencoded) instead of appending 
supplied parameters
-as URL query; expected by certain routes
-
-This is for instance used to post job templates, e.g.:
-
-job_templates_scheduling/1 post --form schema=JobTemplates-01.yaml preview=0 
template="$(cat foo.yaml)"
-
-To create nested forms use dotted syntax, e.g.:
-
-jobs/1/artefact post --form file.file=bar file.filename=bar.log
-
-=item B<--help, -h>
-
-print help
-
-=back
-
-=head2 Archive mode
-
-=over 4
-
-=item B<--archive, -a> DIRECTORY
-
-Archive mode: Download assets and test results from a job to DIRECTORY.
-
-=item B<--with-thumbnails>
-
-Archive mode: Include thumbnails
-
-=item B<--asset-size-limit> LIMIT
-
-Archive mode: Download assets that do not exceed the specified limit in bytes
-The default limit is 200 MB.
-
-=back
-
-=head1 SYNOPSIS
-
-Interact with the openQA API by specified route entry points and optionally
-operations, defaults to the 'get' operation, i.e. just reading out the data
-without changing it. See the help on the openQA instance you want to access
-for available API routes.
-
-Common top level entry points: jobs, workers, isos.
-
-=over 4
-
-=item client --host openqa.example.com jobs
-
-List all jobs. Caution: this will take a very long time or even timeout on big
-productive instances.
-
-=item client --host openqa.example.com jobs groupid=135 distri=caasp 
version=3.0 latest=1
-
-List all jobs matching the specified search criteria.
-
-=item client --host openqa.example.com jobs/overview groupid=135 distri=caasp 
version=3.0
-
-List the latest jobs for the latest build in the given scenario.
-In contrast to the route above, this will limit the results to the latest 
build in the same
-way the test result overview in the web UI does.
-
-=item client --host openqa.example.com jobs/1
-
-Show details of job nr. B<1>.
-
-=item client --host openqa.example.com jobs/1 delete
-
-Delete job nr. B<1> (permissions read from config file).
-
-=item client --host openqa.example.com isos post ISO=bar.iso DISTRI=my-distri 
FLAVOR=my-flavor ARCH=my-arch VERSION=42 BUILD=1234
-
-Trigger jobs on iso B<bar.iso> matching test suite B<blah>.
-
-=item client --archive /path/to/directory --asset-size-limit 1048576000 
--with-thumbnails --host openqa.opensuse.org jobs/42
-
-Download all assets and test logs and images from job B<42> with asset limit 
of B<1GB> to B</path/to/directory>.
-
-=back
-=cut
-
-use FindBin;
-BEGIN { unshift @INC, "$FindBin::RealBin/../lib" }
-
-use Mojo::Base -strict, -signatures;
-use OpenQA::Script::Client;
-use Getopt::Long;
-Getopt::Long::Configure("no_ignore_case");
-
-my %options;
-
-sub usage ($r) { require Pod::Usage; Pod::Usage::pod2usage($r) }
-
-GetOptions(
-    \%options, 'host=s', 'apibase=s', 'json-output',
-    'verbose|v', 'apikey:s', 'apisecret:s', 'params=s',
-    'form', 'json-data:s', 'help|h|?', 'archive|a:s',
-    'asset-size-limit:i', 'with-thumbnails', 'accept=s', 'yaml-output',
-) or usage(1);
-
-warn "WARNING: openqa-client is deprecated and planned to be removed in the 
future. Please use openqa-cli instead\n"
-  unless $ENV{OPENQA_CLIENT_DISABLE_DEPRECATION_WARNING};
-
-usage(0) if $options{help};
-usage(1) unless @ARGV;
-
-if ($options{form} && $options{'json-data'}) {
-    print STDERR "ERROR: The options --form and --json-data can not be 
combined.\n";
-    exit(2);
-}
-
-my $ret = run(\%options, @ARGV);
-exit(defined $ret ? 0 : 1);
-
-1;
+exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openQA-5.1754477962.22b1fea4/t/31-client.t 
new/openQA-5.1754567283.cc45a4c0/t/31-client.t
--- old/openQA-5.1754477962.22b1fea4/t/31-client.t      2025-08-06 
12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/t/31-client.t      1970-01-01 
01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-# Copyright 2018-2021 SUSE LLC
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-use Test::Most;
-
-use FindBin;
-use lib "$FindBin::Bin/lib", 
"$FindBin::Bin/../external/os-autoinst-common/lib";
-use OpenQA::Test::TimeLimit '6';
-
-use Test::Mojo;
-use Test::MockModule;
-use Test::MockObject;
-use Test::Output;
-use Test::Warnings ':report_warnings';
-use OpenQA::WebAPI;
-use OpenQA::Test::Case;
-use OpenQA::Script::Client;
-use OpenQA::Scheduler::Client;
-use OpenQA::WebSockets::Client;
-use Mojo::File qw(tempdir);
-
-subtest 'hostnames configurable' => sub {
-    my $config_dir = tempdir;
-    $config_dir->child('client.conf')->spew("[foo]\nkey = fookey\nsome = 
config\n[bar]\nkey = barkey");
-    ($ENV{OPENQA_CONFIG}, $ENV{OPENQA_SCHEDULER_HOST}, 
$ENV{OPENQA_WEB_SOCKETS_HOST}) = ($config_dir, qw(foo bar));
-    my $scheduler_client = OpenQA::Scheduler::Client->new;
-    is $scheduler_client->host, 'foo', 'scheduler hostname configurable';
-    is $scheduler_client->client->apikey, 'fookey', 'scheduler hostname passed 
to client';
-    my $ws_client = OpenQA::WebSockets::Client->new;
-    is $ws_client->host, 'bar', 'websockets hostname configurable';
-    is $ws_client->client->apikey, 'barkey', 'websockets hostname passed to 
client';
-};
-
-subtest 'client instantiation prevented from the daemons itself' => sub {
-    OpenQA::WebSockets::Client::mark_current_process_as_websocket_server;
-    throws_ok(
-        sub {
-            OpenQA::WebSockets::Client->singleton;
-        },
-        qr/is forbidden/,
-        'can not create ws server client from ws server itself'
-    );
-
-    OpenQA::Scheduler::Client::mark_current_process_as_scheduler;
-    throws_ok(
-        sub {
-            OpenQA::Scheduler::Client->singleton;
-        },
-        qr/is forbidden/,
-        'can not create scheduler client from scheduler itself'
-    );
-};
-
-is prepend_api_base('jobs'), '/api/v1/jobs', 'API base prepended';
-is prepend_api_base('/my_route'), '/my_route', 'API base not prepended for 
absolute paths';
-
-my %options = (verbose => 1);
-my $client_mock = Test::MockModule->new('OpenQA::UserAgent');
-my $code = 200;
-my $content_type = 'application/json';
-my $headers_mock = Test::MockObject->new()->set_bound(content_type => 
\$content_type);
-my $json = {my => 'json'};
-my $code_mock = Test::MockObject->new()->set_bound(code => 
\$code)->mock(headers => sub { $headers_mock })
-  ->set_always(json => $json)->set_always(body => 'my: yaml');
-my $res = Test::MockObject->new()->mock(res => sub { $code_mock });
-$client_mock->redefine(
-    new => sub {
-        Test::MockObject->new()->mock(get => sub { $res });
-    });
-
-is run(\%options, qw(jobs)), $json, 'returns job data';
-is run(\%options, qw(jobs GeT)), $json, 'method can be passed (case 
in-sensitive)';
-
-is run({%options, 'json-output' => 1}, qw(jobs)), $json, 'returns job data in 
json mode';
-is run({%options, 'yaml-output' => 1}, qw(jobs)), $json, 'returns job data in 
yaml mode';
-$content_type = 'text/yaml';
-Test::MockModule->new('OpenQA::Script::Client')->redefine(load_yaml => undef);
-is run(\%options, qw(jobs)), $json, 'returns job data for YAML';
-is run({%options, 'json-output' => 1}, qw(jobs)), $json, 'returns job data in 
json mode for YAML';
-is run({%options, 'yaml-output' => 1}, qw(jobs)), $json, 'returns job data in 
yaml mode for YAML';
-
-$code = 201;
-$code_mock->{error} = {message => 'created'};
-my $ret;
-stderr_like { $ret = run(\%options, qw(jobs post test=foo)) } 
qr/$code.*created/, 'Codes reported';
-is $ret, $json, 'can create job';
-$code = 404;
-$code_mock->{error} = {message => 'Not Found'};
-sub wrong_call { $ret = run(\%options, qw(unknown)) }
-stderr_like \&wrong_call, qr/$code.*Not Found/, 'Error reported';
-is $ret, undef, 'undef shows error';
-$options{json} = 1;
-stderr_like \&wrong_call, qr/$code.*Not Found/, 'Error reported for 
undocumented "json" parameter';
-is $ret, undef, 'undef shows error for undocumented parameter';
-
-done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openQA-5.1754477962.22b1fea4/t/32-openqa_client-script.t 
new/openQA-5.1754567283.cc45a4c0/t/32-openqa_client-script.t
--- old/openQA-5.1754477962.22b1fea4/t/32-openqa_client-script.t        
2025-08-06 12:59:22.000000000 +0200
+++ new/openQA-5.1754567283.cc45a4c0/t/32-openqa_client-script.t        
1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2019-2020 SUSE LLC
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-use Test::Most;
-use Test::Warnings ':report_warnings';
-use FindBin;
-use lib "$FindBin::Bin/lib", 
"$FindBin::Bin/../external/os-autoinst-common/lib";
-use OpenQA::Test::TimeLimit '10';
-use OpenQA::Test::Utils qw(run_cmd test_cmd);
-
-
-sub test_once {
-    # Report failure at the callsite instead of the test function
-    local $Test::Builder::Level = $Test::Builder::Level + 1;
-    # prevent all network access to stay local
-    test_cmd('unshare -r -n script/client', @_);
-}
-
-test_once '', qr/Usage:/, 'hint shown for mandatory parameter missing', 1, 
'needs parameters';
-test_once '--help', qr/Usage:/, 'help text shown', 0, 'help screen is success';
-test_once '--invalid-arg', qr/Usage:/, 'invalid args also yield help', 1, 
'help screen on invalid not success';
-my $args = 'jobs 1';
-test_once $args, qr/ERROR.*not connected/, 'fails without network', 1, 'fail';
-
-done_testing();

++++++ openQA.obsinfo ++++++
--- /var/tmp/diff_new_pack.Bw0E8i/_old  2025-08-08 15:15:34.333459307 +0200
+++ /var/tmp/diff_new_pack.Bw0E8i/_new  2025-08-08 15:15:34.341459642 +0200
@@ -1,5 +1,5 @@
 name: openQA
-version: 5.1754477962.22b1fea4
-mtime: 1754477962
-commit: 22b1fea454ac331d490afe867bf939cd84cf0d6c
+version: 5.1754567283.cc45a4c0
+mtime: 1754567283
+commit: cc45a4c05c8a45cab7af755e4b25af3fcb175c20
 

Reply via email to