From 8f40d13441219a932bb0cc31304516e81bc9858f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 10 Jul 2024 11:12:56 +0100 Subject: [PATCH] Bug 33227: (follow-up) Set test to failed if swagger-cli missing --- xt/api.t | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xt/api.t b/xt/api.t index 3165f8ff6e5..8ffa0ec5c0b 100755 --- a/xt/api.t +++ b/xt/api.t @@ -91,14 +91,13 @@ subtest 'The spec passes the swagger-cli validation' => sub { plan tests => 1; -SKIP: { - skip "Skipping tests, swagger-cli missing", 1 - unless can_run('swagger-cli'); - + if ( can_run('swagger-cli') ) { my $spec_dir = "$FindBin::Bin/../api/v1/swagger"; my $var = qx{swagger-cli validate $spec_dir/swagger.yaml 2>&1}; is( $?, 0, 'Validation exit code is 0' ) or diag $var; + } else { + ok( 0, "Test skipped, swagger-cli missing" ); } }; -- 2.45.2