Skip to content

Commit

Permalink
[Perl] Update _test.mustache templates to use done_testing (#17649)
Browse files Browse the repository at this point in the history
* test(perl): Update test plan to use done_testing

close #14921

* fixup! test(perl): Update test plan to use done_testing

results of "./bin/generate-samples.sh ./bin/configs/perl.yaml"

* fixup! test(perl): Update test plan to use done_testing

regenerate samples

---------

Co-authored-by: William E Little Jr <[email protected]>
  • Loading branch information
bmodotdev and William E Little Jr authored Jan 20, 2024
1 parent 3767110 commit 5b6b082
Show file tree
Hide file tree
Showing 61 changed files with 216 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -29,3 +29,5 @@ isa_ok($api, '{{moduleName}}::{{classname}}');

{{/operation}}
{{/operations}}

done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -23,3 +23,5 @@ use_ok('{{moduleName}}::Object::{{classname}}');

{{/model}}
{{/models}}

done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AdditionalPropertiesClass');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AdditionalPropertiesClass');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AllOfWithSingleRefTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AllOfWithSingleRef');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AllOfWithSingleRef');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AnimalTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Animal');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Animal');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AnotherFakeApiTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -36,3 +36,5 @@ isa_ok($api, 'WWW::OpenAPIClient::AnotherFakeApi');
#my $call_123_test_special_tags_client = undef; # replace NULL with a proper value
#my $call_123_test_special_tags_result = $api->call_123_test_special_tags(client => $call_123_test_special_tags_client);


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ApiResponseTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ApiResponse');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ApiResponse');


done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfNumberOnly');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfNumberOnly');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ArrayTestTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayTest');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayTest');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CapitalizationTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Capitalization');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Capitalization');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CatTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Cat');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Cat');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CategoryTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Category');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Category');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ChildWithNullableTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ChildWithNullable');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ChildWithNullable');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ClassModelTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ClassModel');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ClassModel');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ClientTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Client');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Client');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DefaultApiTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -35,3 +35,5 @@ isa_ok($api, 'WWW::OpenAPIClient::DefaultApi');
# uncomment below and update the test
#my $foo_get_result = $api->foo_get();


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DeprecatedModelTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::DeprecatedModel');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::DeprecatedModel');


done_testing();
34 changes: 0 additions & 34 deletions samples/client/petstore/perl/t/DeprecatedObjectTest.t

This file was deleted.

4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DogTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Dog');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Dog');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumArraysTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumArrays');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumArrays');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumClassTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumClass');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumClass');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumTestTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumTest');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumTest');


done_testing();
Loading

0 comments on commit 5b6b082

Please sign in to comment.