https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37302

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from David Nind <[email protected]> ---
I had a go at testing, but this is not my wheelhouse and I don't think I've
done this correctly.

Does this mean that:
1. an actual test is failing, and the cause of this needs fixing, 
   but
2. that is OK as this bug was fixing the reason the failed test was not
showing?

Testing notes (using KTD):
1. Run prove xt/api.t -v
2. Tests pass (before patches) - but note  "ok 1 # skip Skipping tests,
swagger-cli missing" [1]
3. Apply the first patch and re-run: tests should fail [2]
4. Apply the second patch.
5. IGNORE: Shutdown KTD and the start it up again (I tried a yarn build and a
reset_all first, but got same results as in [2].
6. Ran yarn install the restart_all [3]
   Note this warning: warning swagger-cli > @apidevtools/[email protected]:
This package has been abandoned. Please switch to using the actively maintained
@redocly/cli
7. I expected the tests to now pass, but they fail [4]

[1] Tests pass before any patches are applied:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

prove xt/api.t -v
xt/api.t .. 
1..4
ok 1 - GET /api/v1/
ok 2
# Subtest: The spec passes the swagger-cli validation
    1..1
    ok 1 # skip Skipping tests, swagger-cli missing
ok 3 - The spec passes the swagger-cli validation
# Subtest: tags tests
    1..1
    ok 1 - No tag errors in the spec
ok 4 - tags tests
ok
All tests successful.
Files=1, Tests=4,  4 wallclock secs ( 0.02 usr  0.00 sys +  3.54 cusr  0.17
csys =  3.73 CPU)
Result: PASS

[2] Tests fail after first patch is applied:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

prove xt/api.t -v
xt/api.t .. 
1..4
ok 1 - GET /api/v1/
ok 2
# Subtest: The spec passes the swagger-cli validation
    1..1
    not ok 1 - Test skipped, swagger-cli missing

    #   Failed test 'Test skipped, swagger-cli missing'
    #   at xt/api.t line 100.
    # Looks like you failed 1 test of 1.
not ok 3 - The spec passes the swagger-cli validation
# Subtest: tags tests

#   Failed test 'The spec passes the swagger-cli validation'
#   at xt/api.t line 102.
    1..1
    ok 1 - No tag errors in the spec
ok 4 - tags tests
# Looks like you failed 1 test of 4.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 

Test Summary Report
-------------------
xt/api.t (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=4,  4 wallclock secs ( 0.02 usr  0.01 sys +  3.60 cusr  0.20
csys =  3.83 CPU)
Result: FAIL

[3] yarn install output
~~~~~~~~~~~~~~~~~~~~~~~

yarn install
yarn install v1.22.22
[1/4] Resolving packages...
warning swagger-cli > @apidevtools/[email protected]: This package has been
abandoned. Please switch to using the actively maintained @redocly/cli
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
warning " > [email protected]" has unmet peer dependency
"eslint@>=7.0.0".
warning " > [email protected]" has unmet peer dependency
"eslint@>=8.0.0".
warning " > [email protected]" has unmet peer dependency
"prettier@>=3.0.0".
warning "swagger-cli > @apidevtools/swagger-cli >
@apidevtools/[email protected]" has unmet peer dependency
"openapi-types@>=7".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 34.47s.

[4] Tests fail after both patches apply and a reset_all:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

prove xt/api.t -v
xt/api.t .. 
1..4
ok 1 - GET /api/v1/
ok 2
# Subtest: The spec passes the swagger-cli validation
    1..1
    not ok 1 - Validation exit code is 0

    #   Failed test 'Validation exit code is 0'
    #   at xt/api.t line 97.
    #          got: '256'
    #     expected: '0'
    # Validation failed. /paths/libraries/{library_id}/cash_registers/get is
missing path parameter(s) for {library_id}
    # Looks like you failed 1 test of 1.
not ok 3 - The spec passes the swagger-cli validation

#   Failed test 'The spec passes the swagger-cli validation'
#   at xt/api.t line 102.
# Subtest: tags tests
    1..1
    ok 1 - No tag errors in the spec
ok 4 - tags tests
# Looks like you failed 1 test of 4.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 

Test Summary Report
-------------------
xt/api.t (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=4,  5 wallclock secs ( 0.01 usr  0.00 sys +  4.21 cusr  0.30
csys =  4.52 CPU)
Result: FAIL

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to