Skip to content

Commit 5b6b082

Browse files
bmodotdevWilliam E Little Jr
and
William E Little Jr
authored
[Perl] Update _test.mustache templates to use done_testing (#17649)
* 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]>
1 parent 3767110 commit 5b6b082

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+216
-129
lines changed

modules/openapi-generator/src/main/resources/perl/api_test.mustache

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Please update the test cases below to test the API endpoints.
55
# Ref: https://openapi-generator.tech
66
#
7-
use Test::More tests => 1; #TODO update number of test cases
7+
use Test::More;
88
use Test::Exception;
99

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

3030
{{/operation}}
3131
{{/operations}}
32+
33+
done_testing();

modules/openapi-generator/src/main/resources/perl/object_test.mustache

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Please update the test cases below to test the model.
55
# Ref: https://openapi-generator.tech
66
#
7-
use Test::More tests => 2;
7+
use Test::More;
88
use Test::Exception;
99

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

2424
{{/model}}
2525
{{/models}}
26+
27+
done_testing();

samples/client/petstore/perl/t/AdditionalPropertiesClassTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AdditionalPropertiesClass');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AdditionalPropertiesClass');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/AllOfWithSingleRefTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AllOfWithSingleRef');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AllOfWithSingleRef');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/AnimalTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Animal');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Animal');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/AnotherFakeApiTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the API endpoints.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 1; #TODO update number of test cases
20+
use Test::More;
2121
use Test::Exception;
2222

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

39+
40+
done_testing();

samples/client/petstore/perl/t/ApiResponseTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ApiResponse');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ApiResponse');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ArrayOfArrayOfNumberOnlyTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfNumberOnly');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfNumberOnly');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ArrayTestTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayTest');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayTest');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/CapitalizationTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Capitalization');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Capitalization');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/CatTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Cat');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Cat');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/CategoryTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Category');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Category');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ChildWithNullableTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ChildWithNullable');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ChildWithNullable');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ClassModelTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ClassModel');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ClassModel');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/ClientTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Client');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Client');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/DefaultApiTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the API endpoints.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 1; #TODO update number of test cases
20+
use Test::More;
2121
use Test::Exception;
2222

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

38+
39+
done_testing();

samples/client/petstore/perl/t/DeprecatedModelTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::DeprecatedModel');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::DeprecatedModel');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/DeprecatedObjectTest.t

-34
This file was deleted.

samples/client/petstore/perl/t/DogTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Dog');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Dog');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/EnumArraysTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumArrays');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumArrays');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/EnumClassTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumClass');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumClass');
3434

35+
36+
done_testing();

samples/client/petstore/perl/t/EnumTestTest.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
1717
# Please update the test cases below to test the model.
1818
# Ref: https://openapi-generator.tech
1919
#
20-
use Test::More tests => 2;
20+
use Test::More;
2121
use Test::Exception;
2222

2323
use lib 'lib';
@@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumTest');
3232
#
3333
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumTest');
3434

35+
36+
done_testing();

0 commit comments

Comments
 (0)