Project

General

Profile

Actions

action #167932

closed

coordination #127031: [saga][epic] openQA for SUSE customers

coordination #130414: [epic] Improved code coverage in os-autoinst

Cover code of os-autoinst path needle.pm fully (statement coverage) size:S

Added by okurz 5 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-10-08
Due date:
% Done:

100%

Estimated time:

Description

Acceptance criteria

  • AC1: the path needle.pm is listed in codecov.yml under "fully_covered"

Suggestions


Related issues 2 (0 open2 closed)

Copied from openQA Project (public) - action #167929: Cover code of os-autoinst path testapi.pm fully (statement coverage) size:MResolvedmkittler2024-10-08

Actions
Copied to openQA Project (public) - action #167935: Cover code of os-autoinst path myjsonrpc.pm fully (statement coverage) size:SResolvedgpuliti2024-10-08

Actions
Actions #1

Updated by okurz 5 months ago

  • Copied from action #167929: Cover code of os-autoinst path testapi.pm fully (statement coverage) size:M added
Actions #2

Updated by okurz 5 months ago

  • Copied to action #167935: Cover code of os-autoinst path myjsonrpc.pm fully (statement coverage) size:S added
Actions #3

Updated by okurz 5 months ago

  • Parent task changed from #167917 to #130414
Actions #4

Updated by okurz 3 months ago

  • Subject changed from Cover code of os-autoinst path needle.pm fully (statement coverage) size:M to Cover code of os-autoinst path needle.pm fully (statement coverage)
Actions #5

Updated by okurz 3 months ago

  • Target version changed from future to Ready
Actions #6

Updated by okurz 3 months ago

  • Subject changed from Cover code of os-autoinst path needle.pm fully (statement coverage) to Cover code of os-autoinst path needle.pm fully (statement coverage) size:S
  • Status changed from New to Workable
Actions #7

Updated by okurz 3 months ago

  • Target version changed from Ready to Tools - Next
Actions #8

Updated by okurz 2 months ago

  • Target version changed from Tools - Next to Ready
Actions #9

Updated by gpuliti 2 months ago

  • Status changed from Workable to In Progress
  • Assignee set to gpuliti
Actions #10

Updated by gpuliti about 2 months ago

  • Status changed from In Progress to Feedback

I added 2 test to cover save and tags subroutine, but I got errors while creating new needles and checking for updated args, see diff of the 2 new test.

I'm wondering why I get Can't call method "save" on unblessed reference at t/01-test_needle.t line 554. for the save and Needle test1.json is not under needle directory /tmp/wHdVRbLc0o at /home/wabri/Workspaces/Github-Wabri/OS-Autoinst/os-autoinst/wt2/needle.pm line 60. for tags. I need to test, but I think for the tags test I need to create those json I'm using.

Actions #11

Updated by tinita about 2 months ago

I think the save method is not used at all.
I found a PR from 2019 that did an incorrect change there: https://github.com/os-autoinst/os-autoinst/pull/1153/files#r1906147139
That would have been noticed if it was used.
And the last usage was removed in 2013:
https://github.com/os-autoinst/os-autoinst/commit/525b71d5c8d86cc009af730003a6ebea47660f11

Actions #12

Updated by tinita about 2 months ago

gpuliti wrote in #note-10:

I'm wondering why I get Can't call method "save" on unblessed reference at t/01-test_needle.t line 554. for the save

Because needle->new actually returned undef in that case, and then you treated the variable as a hashref, so it ends up as a hashref, but not blessed, so not a "needle" object.

Actions #13

Updated by tinita about 2 months ago ยท Edited

I found another problem which is responsible for the missing warning that you should have gotten for the undefined needle: https://github.com/os-autoinst/os-autoinst/pull/1570/files#r1906157649

https://github.com/os-autoinst/os-autoinst/pull/2613 Fix warn+return precendence

Actions #14

Updated by gpuliti about 2 months ago

  • % Done changed from 0 to 100

thanks @tinita for the feedback, I've updated the pr https://github.com/os-autoinst/os-autoinst/pull/2603

Actions #15

Updated by gpuliti about 2 months ago

  • Status changed from Feedback to In Progress
Actions #16

Updated by gpuliti about 2 months ago

  • % Done changed from 100 to 90

Working on solving feedbacks

Actions #17

Updated by gpuliti about 2 months ago

  • Status changed from In Progress to Feedback
Actions #18

Updated by gpuliti about 2 months ago

  • Status changed from Feedback to In Progress
Actions #19

Updated by gpuliti about 2 months ago

  • Status changed from In Progress to Feedback

I've added 2 test to check when more than 2 tags are passed to needle::tags subroutine https://github.com/os-autoinst/os-autoinst/pull/2620

Actions #20

Updated by gpuliti about 2 months ago

Failing during the fullstack job: https://github.com/os-autoinst/os-autoinst/actions/runs/12795434702/job/35672901801

it seems that it can't find perl-DBI-1.645.0:

+ sudo zypper -n install --download-only bsdtar-3.7.2 chrony-4.1 chrony-pool-openSUSE-4.1 cmark-0.30.2 hostname-3.16 jq-1.6 libcmark0_30_2-0.30.2 libjq1-1.6 libonig4-6.7.0 libssh2-1-1.11.0 lsof-4.99.0 openssh-common-9.6p1 optipng-0.7.8 perl-Algorithm-C3-0.11 perl-Algorithm-Diff-1.1903 perl-aliased-0.34 perl-App-cpanminus-1.7047 perl-Archive-Zip-1.60 perl-B-Hooks-EndOfScope-0.21 perl-B-Keywords-1.26 perl-BSD-Resource-1.2911 perl-Capture-Tiny-0.48 perl-Carp-Always-0.16 perl-Carp-Clan-6.06 perl-Class-Accessor-0.51 perl-Class-Accessor-Grouped-0.10014 perl-Class-C3-0.35 perl-Class-C3-Componentised-1.001002 perl-Class-Data-Inheritable-0.08 perl-Class-Factory-Util-1.7 perl-Class-Inspector-1.32 perl-Class-Load-0.25 perl-Class-Load-XS-0.10 perl-Class-Method-Modifiers-2.12 perl-Class-Singleton-1.5 perl-Class-Tiny-1.006 perl-Class-XSAccessor-1.19 perl-Clone-0.46 perl-Clone-Choose-0.010 perl-Code-TidyAll-0.83 perl-CommonMark-0.290000 perl-Config-Any-0.33 perl-Config-INI-0.029 perl-Config-IniFiles-2.94 perl-Config-Tiny-2.
Loading repository data...
Reading installed packages...
Package 'perl-DBI-1.645.0' not found.
Error: Process completed with exit code 104.
Actions #22

Updated by gpuliti about 2 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF