Closed kylehodgetts closed 2 years ago
Im not sure why the Scrutinizer tests aren't passing. I have no issues when I run the tests locally
go test -v $(go list ./... | grep -v vendor) -coverprofile=cover.out
? github.com/muonsoft/openapi-mock/cmd/openapi-mock [no test files]
=== RUN TestExecute_ValidArguments_NoError
=== RUN TestExecute_ValidArguments_NoError/serve_command_with_short_url
=== RUN TestExecute_ValidArguments_NoError/serve_command_with_long_url
=== RUN TestExecute_ValidArguments_NoError/serve_command_with_url_from_config_(short)
=== RUN TestExecute_ValidArguments_NoError/serve_command_with_url_from_config_(long)
=== RUN TestExecute_ValidArguments_NoError/validate_command_with_short_url
=== RUN TestExecute_ValidArguments_NoError/validate_command_with_long_url
=== RUN TestExecute_ValidArguments_NoError/help_command_with_short_argument
OpenAPI Mock tool with random data generation.
Version . Build at .
See documentation at https://github.com/muonsoft/openapi-mock/blob/master/docs/usage_guide.md.
Usage:
openapi-mock [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
serve Starts an HTTP server for generating mock responses by OpenAPI specification
validate Validates an OpenAPI specification
version Prints application version
Flags:
-c, --configuration string Configuration filename in JSON/YAML format. By default configuration is loaded from 'openapi-mock.yaml', 'openapi-mock.yml' or 'openapi-mock.json'.
--dry-run Dry run will not start a server
-h, --help help for openapi-mock
-u, --specification-url string URL or path to file with OpenAPI v3 specification. Overrides specification defined in configuration file or environment variable.
Use "openapi-mock [command] --help" for more information about a command.
=== RUN TestExecute_ValidArguments_NoError/help_command_with_long_argument
OpenAPI Mock tool with random data generation.
Version . Build at .
See documentation at https://github.com/muonsoft/openapi-mock/blob/master/docs/usage_guide.md.
Usage:
openapi-mock [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
serve Starts an HTTP server for generating mock responses by OpenAPI specification
validate Validates an OpenAPI specification
version Prints application version
Flags:
-c, --configuration string Configuration filename in JSON/YAML format. By default configuration is loaded from 'openapi-mock.yaml', 'openapi-mock.yml' or 'openapi-mock.json'.
--dry-run Dry run will not start a server
-h, --help help for openapi-mock
-u, --specification-url string URL or path to file with OpenAPI v3 specification. Overrides specification defined in configuration file or environment variable.
Use "openapi-mock [command] --help" for more information about a command.
--- PASS: TestExecute_ValidArguments_NoError (0.01s)
--- PASS: TestExecute_ValidArguments_NoError/serve_command_with_short_url (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/serve_command_with_long_url (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/serve_command_with_url_from_config_(short) (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/serve_command_with_url_from_config_(long) (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/validate_command_with_short_url (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/validate_command_with_long_url (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/help_command_with_short_argument (0.00s)
--- PASS: TestExecute_ValidArguments_NoError/help_command_with_long_argument (0.00s)
=== RUN TestExecute_InvalidArguments_Error
=== RUN TestExecute_InvalidArguments_Error/no_specification_url
--- PASS: TestExecute_InvalidArguments_Error (0.00s)
--- PASS: TestExecute_InvalidArguments_Error/no_specification_url (0.00s)
PASS
coverage: 76.4% of statements
ok github.com/muonsoft/openapi-mock/internal/application 1.897s coverage: 76.4% of statements
=== RUN TestLoad_YAMLFile_ConfigurationWithExpectedValues
--- PASS: TestLoad_YAMLFile_ConfigurationWithExpectedValues (0.00s)
=== RUN TestLoad_JSONFile_ConfigurationWithExpectedValues
--- PASS: TestLoad_JSONFile_ConfigurationWithExpectedValues (0.00s)
=== RUN TestLoad_EmptyConfigFile_ConfigurationWithDefaultValues
--- PASS: TestLoad_EmptyConfigFile_ConfigurationWithDefaultValues (0.00s)
=== RUN TestLoad_EmptyFilenameAndNoEnvParams_ConfigurationWithDefaultValues
--- PASS: TestLoad_EmptyFilenameAndNoEnvParams_ConfigurationWithDefaultValues (0.00s)
=== RUN TestLoad_NoFileAndAllEnvironmentParams_ExpectedValues
--- PASS: TestLoad_NoFileAndAllEnvironmentParams_ExpectedValues (0.00s)
=== RUN TestLoad_EmptyFileAndAllEnvironmentParams_ValuesFromEnvironment
--- PASS: TestLoad_EmptyFileAndAllEnvironmentParams_ValuesFromEnvironment (0.00s)
=== RUN TestLoad_NotExistingFilename_Error
--- PASS: TestLoad_NotExistingFilename_Error (0.00s)
=== RUN TestLoad_InvalidFile_Error
--- PASS: TestLoad_InvalidFile_Error (0.00s)
=== RUN TestLoad_FileWithInvalidValues_Error
--- PASS: TestLoad_FileWithInvalidValues_Error (0.00s)
=== RUN TestLoad_DebugIsOn_LogLevelIsTrace
--- PASS: TestLoad_DebugIsOn_LogLevelIsTrace (0.00s)
PASS
coverage: 93.0% of statements
ok github.com/muonsoft/openapi-mock/internal/application/config 1.064s coverage: 93.0% of statements
? github.com/muonsoft/openapi-mock/internal/application/di [no test files]
? github.com/muonsoft/openapi-mock/internal/errors [no test files]
=== RUN TestCoordinatingGeneratorSuite
=== RUN TestCoordinatingGeneratorSuite/TestGenerateResponse_ContentGenerationError_Error
coordinatingGenerator_test.go:121: PASS: NegotiateStatusCode(*http.Request,openapi3.Responses)
coordinatingGenerator_test.go:122: PASS: NegotiateContentType(*http.Request,*openapi3.Response)
coordinatingGenerator_test.go:123: PASS: GenerateContent(string,*openapi3.Response,string)
=== RUN TestCoordinatingGeneratorSuite/TestGenerateResponse_RouteWithValidResponse_ResponseGeneratedAndReturned
coordinatingGenerator_test.go:121: PASS: NegotiateStatusCode(*http.Request,openapi3.Responses)
coordinatingGenerator_test.go:122: PASS: NegotiateContentType(*http.Request,*openapi3.Response)
coordinatingGenerator_test.go:123: PASS: GenerateContent(string,*openapi3.Response,string)
=== RUN TestCoordinatingGeneratorSuite/TestGenerateResponse_StatusCodeNegotiationError_Error
coordinatingGenerator_test.go:121: PASS: NegotiateStatusCode(*http.Request,openapi3.Responses)
--- PASS: TestCoordinatingGeneratorSuite (0.00s)
--- PASS: TestCoordinatingGeneratorSuite/TestGenerateResponse_ContentGenerationError_Error (0.00s)
--- PASS: TestCoordinatingGeneratorSuite/TestGenerateResponse_RouteWithValidResponse_ResponseGeneratedAndReturned (0.00s)
--- PASS: TestCoordinatingGeneratorSuite/TestGenerateResponse_StatusCodeNegotiationError_Error (0.00s)
PASS
coverage: 90.9% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/generator 1.367s coverage: 90.9% of statements
=== RUN TestContentProcessor
=== RUN TestContentProcessor/application/json
=== RUN TestContentProcessor/application/ld+json
=== RUN TestContentProcessor/application/xml
=== RUN TestContentProcessor/application/soap+xml
=== RUN TestContentProcessor/text/plain
=== RUN TestContentProcessor/text/html
=== RUN TestContentProcessor/not/supported
--- PASS: TestContentProcessor (0.00s)
--- PASS: TestContentProcessor/application/json (0.00s)
--- PASS: TestContentProcessor/application/ld+json (0.00s)
--- PASS: TestContentProcessor/application/xml (0.00s)
--- PASS: TestContentProcessor/application/soap+xml (0.00s)
--- PASS: TestContentProcessor/text/plain (0.00s)
--- PASS: TestContentProcessor/text/html (0.00s)
--- PASS: TestContentProcessor/not/supported (0.00s)
=== RUN TestDelegatingGenerator_GenerateContent_MatchingProcessorFound_ResponseProcessedByMatchingProcessor
delegatingGenerator_test.go:31: PASS: GenerateContent(string,*openapi3.Response,string)
--- PASS: TestDelegatingGenerator_GenerateContent_MatchingProcessorFound_ResponseProcessedByMatchingProcessor (0.00s)
=== RUN TestDelegatingGenerator_GenerateContent_NoMatchingProcessorFound_MediaTypeAndError
--- PASS: TestDelegatingGenerator_GenerateContent_NoMatchingProcessorFound_MediaTypeAndError (0.00s)
=== RUN TestDelegatingGenerator_GenerateContent_NoContentType_EmptyString
--- PASS: TestDelegatingGenerator_GenerateContent_NoContentType_EmptyString (0.00s)
=== RUN TestHtmlGeneratorSuite
=== RUN TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithObject_Warning
htmlGenerator_test.go:63: PASS: GenerateData(string,mock.argumentMatcher)
=== RUN TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithString_GeneratedDataWithoutWarnings
htmlGenerator_test.go:50: PASS: GenerateData(string,mock.argumentMatcher)
=== RUN TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithoutSchema_Warning
htmlGenerator_test.go:77: PASS: GenerateData(string,mock.argumentMatcher)
--- PASS: TestHtmlGeneratorSuite (0.00s)
--- PASS: TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithObject_Warning (0.00s)
--- PASS: TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithString_GeneratedDataWithoutWarnings (0.00s)
--- PASS: TestHtmlGeneratorSuite/TestHtmlProcessor_GenerateContent_ResponseWithoutSchema_Warning (0.00s)
=== RUN TestMediaGenerator_GenerateContent_ResponseWithContent_GeneratedMediaDataReturned
mediaGenerator_test.go:26: PASS: GenerateData(string,*openapi3.MediaType)
--- PASS: TestMediaGenerator_GenerateContent_ResponseWithContent_GeneratedMediaDataReturned (0.00s)
=== RUN TestMediaGenerator_GenerateContent_ResponseWithoutContent_EmptyDataReturned
--- PASS: TestMediaGenerator_GenerateContent_ResponseWithoutContent_EmptyDataReturned (0.00s)
=== RUN TestPlainTextGeneratorSuite
=== RUN TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithObject_Warning
plainTextProcessor_test.go:63: PASS: GenerateData(string,mock.argumentMatcher)
=== RUN TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithString_GeneratedDataWithoutWarnings
plainTextProcessor_test.go:50: PASS: GenerateData(string,mock.argumentMatcher)
=== RUN TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithoutSchema_Warning
plainTextProcessor_test.go:77: PASS: GenerateData(string,mock.argumentMatcher)
--- PASS: TestPlainTextGeneratorSuite (0.00s)
--- PASS: TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithObject_Warning (0.00s)
--- PASS: TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithString_GeneratedDataWithoutWarnings (0.00s)
--- PASS: TestPlainTextGeneratorSuite/TestPlainTextProcessor_GenerateContent_ResponseWithoutSchema_Warning (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/generator/content 1.544s coverage: 100.0% of statements
=== RUN TestArrayGenerationDelegatorSuite
=== RUN TestArrayGenerationDelegatorSuite/TestGenerateDataBySchema_RegularArray_DataGeneratedByRegularGenerator
arrayGenerationDelegator_test.go:59: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestArrayGenerationDelegatorSuite/TestGenerateDataBySchema_UniqueArray_DataGeneratedByUniqueGenerator
arrayGenerationDelegator_test.go:60: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestArrayGenerationDelegatorSuite (0.00s)
--- PASS: TestArrayGenerationDelegatorSuite/TestGenerateDataBySchema_RegularArray_DataGeneratedByRegularGenerator (0.00s)
--- PASS: TestArrayGenerationDelegatorSuite/TestGenerateDataBySchema_UniqueArray_DataGeneratedByUniqueGenerator (0.00s)
=== RUN TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths
=== RUN TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/empty_values,_random_value_equals_to_min
arrayLengthGenerator_test.go:64: PASS: Intn(int)
=== RUN TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/empty_values,_random_value_equals_to_max
arrayLengthGenerator_test.go:64: PASS: Intn(int)
=== RUN TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/given_range,_random_value_equals_to_min
arrayLengthGenerator_test.go:64: PASS: Intn(int)
=== RUN TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/given_range,_random_value_equals_to_max
arrayLengthGenerator_test.go:64: PASS: Intn(int)
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths (0.00s)
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/empty_values,_random_value_equals_to_min (0.00s)
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/empty_values,_random_value_equals_to_max (0.00s)
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/given_range,_random_value_equals_to_min (0.00s)
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_GivenRange_ExpectedLengths/given_range,_random_value_equals_to_max (0.00s)
=== RUN TestRandomArrayLengthGenerator_GenerateLength_MaxLessThanMin_MinValueReturned
--- PASS: TestRandomArrayLengthGenerator_GenerateLength_MaxLessThanMin_MinValueReturned (0.00s)
=== RUN TestBase64Generator_GenerateBase64Text_NoRange_GeneratedTextWithDefaultMaxLength
--- PASS: TestBase64Generator_GenerateBase64Text_NoRange_GeneratedTextWithDefaultMaxLength (0.00s)
=== RUN TestBase64Generator_GenerateBase64Text_FixedRange_GeneratedTextWithFixedLength
--- PASS: TestBase64Generator_GenerateBase64Text_FixedRange_GeneratedTextWithFixedLength (0.00s)
=== RUN TestBase64Generator_GenerateBase64Text_MaxLength1_StaticText
--- PASS: TestBase64Generator_GenerateBase64Text_MaxLength1_StaticText (0.00s)
=== RUN TestBooleanGenerator_GenerateDataBySchema_RandomLessThanTheEdge_TrueReturned
booleanGenerator_test.go:18: PASS: Float64()
--- PASS: TestBooleanGenerator_GenerateDataBySchema_RandomLessThanTheEdge_TrueReturned (0.00s)
=== RUN TestBooleanGenerator_GenerateDataBySchema_RandomEqualToTheEdge_FalseReturned
booleanGenerator_test.go:30: PASS: Float64()
--- PASS: TestBooleanGenerator_GenerateDataBySchema_RandomEqualToTheEdge_FalseReturned (0.00s)
=== RUN TestCombinedSchemaGeneratorSuite
=== RUN TestCombinedSchemaGeneratorSuite/TestGenerateDataBySchema_CombiningSchema_DataGeneratedForMergedSchema
combinedSchemaGenerator_test.go:43: PASS: MergeSchemas(*openapi3.Schema)
combinedSchemaGenerator_test.go:44: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestCombinedSchemaGeneratorSuite/TestGenerateDataBySchema_NotACombiningSchema_Error
combinedSchemaGenerator_test.go:56: PASS: MergeSchemas(*openapi3.Schema)
--- PASS: TestCombinedSchemaGeneratorSuite (0.00s)
--- PASS: TestCombinedSchemaGeneratorSuite/TestGenerateDataBySchema_CombiningSchema_DataGeneratedForMergedSchema (0.00s)
--- PASS: TestCombinedSchemaGeneratorSuite/TestGenerateDataBySchema_NotACombiningSchema_Error (0.00s)
=== RUN TestCoordinatingMediaGenerator_GenerateData_DataSchemaOnly_DataGeneratedBySchema
coordinatingMediaGenerator_test.go:25: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_DataSchemaOnly_DataGeneratedBySchema (0.00s)
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_no_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_given_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_no_example,_given_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_no_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_given_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_no_example,_given_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_no_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_given_example,_no_examples
=== RUN TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_no_example,_given_examples
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_no_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_given_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_disabled,_no_example,_given_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_no_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_given_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_if_present,_no_example,_given_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_no_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_given_example,_no_examples (0.00s)
--- PASS: TestCoordinatingMediaGenerator_GenerateData_UseExamplesOptionAndGivenExample_ExpectedData/use_examples_exclusively,_no_example,_given_examples (0.00s)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_NotSupportedType_Error
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_NotSupportedType_Error (0.00s)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_MatchingType_DataGeneratedBySpecificGenerator
coordinatingSchemaGenerator_test.go:37: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_MatchingType_DataGeneratedBySpecificGenerator (0.00s)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_SchemaWithEmptyTypeAndProperties_DataGeneratedByObjectGenerator
coordinatingSchemaGenerator_test.go:59: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_SchemaWithEmptyTypeAndProperties_DataGeneratedByObjectGenerator (0.00s)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/oneOf
coordinatingSchemaGenerator_test.go:101: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/anyOf
coordinatingSchemaGenerator_test.go:101: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/allOf
coordinatingSchemaGenerator_test.go:101: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator (0.00s)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/oneOf (0.00s)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/anyOf (0.00s)
--- PASS: TestCoordinatingSchemaGenerator_GenerateDataBySchema_CombiningType_DataGeneratedBySpecificGenerator/allOf (0.00s)
=== RUN TestErrorSuppressor_GenerateDataBySchema_GeneratorReturnsValue_ValueReturned
errorSuppressor_test.go:24: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestErrorSuppressor_GenerateDataBySchema_GeneratorReturnsValue_ValueReturned (0.00s)
=== RUN TestErrorSuppressor_GenerateDataBySchema_GeneratorReturnsError_ErrorIsLoggedAndDefaultValueReturned
errorSuppressor_test.go:41: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestErrorSuppressor_GenerateDataBySchema_GeneratorReturnsError_ErrorIsLoggedAndDefaultValueReturned (0.00s)
=== RUN TestExampleSchemaGenerator_GenerateDataBySchema_ExamplePresented_ExampleReturned
--- PASS: TestExampleSchemaGenerator_GenerateDataBySchema_ExamplePresented_ExampleReturned (0.00s)
=== RUN TestExampleSchemaGenerator_GenerateDataBySchema_NoExamplePresentedAndUseExamplesIsPresent_GeneratedDataReturned
exampleSchemaGenerator_test.go:36: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestExampleSchemaGenerator_GenerateDataBySchema_NoExamplePresentedAndUseExamplesIsPresent_GeneratedDataReturned (0.00s)
=== RUN TestExampleSchemaGenerator_GenerateDataBySchema_NoExamplePresentedAndUseExamplesExclusively_DefaultValueReturned
--- PASS: TestExampleSchemaGenerator_GenerateDataBySchema_NoExamplePresentedAndUseExamplesExclusively_DefaultValueReturned (0.00s)
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/date
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/date-time
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/email
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/uri
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/hostname
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/ipv4
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/ipv6
=== RUN TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/uuid
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp (0.01s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/date (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/date-time (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/email (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/uri (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/hostname (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/ipv4 (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/ipv6 (0.00s)
--- PASS: TestDefaultFormattedStringGenerators_GivenFormat_ExpectedRegExp/uuid (0.00s)
=== RUN TestFreeFormGeneratorSuite
=== RUN TestFreeFormGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_MapWithOneValue
freeFormGenerator_test.go:93: PASS: GenerateLength(uint64,uint64)
freeFormGenerator_test.go:94: PASS: GenerateKey()
=== RUN TestFreeFormGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error
freeFormGenerator_test.go:93: PASS: GenerateLength(uint64,uint64)
freeFormGenerator_test.go:94: PASS: GenerateKey()
=== RUN TestFreeFormGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndLengthIs1_OneKeyValueGenerated
freeFormGenerator_test.go:93: PASS: GenerateLength(uint64,uint64)
freeFormGenerator_test.go:94: PASS: GenerateKey()
=== RUN TestFreeFormGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndZeroLength_EmptyMap
freeFormGenerator_test.go:93: PASS: GenerateLength(uint64,uint64)
--- PASS: TestFreeFormGeneratorSuite (0.06s)
--- PASS: TestFreeFormGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_MapWithOneValue (0.03s)
--- PASS: TestFreeFormGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error (0.03s)
--- PASS: TestFreeFormGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndLengthIs1_OneKeyValueGenerated (0.00s)
--- PASS: TestFreeFormGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndZeroLength_EmptyMap (0.00s)
=== RUN TestHashMapGeneratorSuite
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultPropertyAndRandomPropertyWithEqualKey_DefaultValueOnlyGenerated
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:185: PASS: GenerateKey()
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultPropertyGenerationError_Error
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultProperty_DefaultValueGenerated
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_MapWithOneValue
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:185: PASS: GenerateKey()
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:185: PASS: GenerateKey()
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndLengthIs1_OneKeyValueGenerated
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:185: PASS: GenerateKey()
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndZeroLength_EmptyMap
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
=== RUN TestHashMapGeneratorSuite/TestGenerateDataBySchema_ValueGenerationError_Error
hashMapGenerator_test.go:184: PASS: GenerateLength(uint64,uint64)
hashMapGenerator_test.go:185: PASS: GenerateKey()
hashMapGenerator_test.go:186: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestHashMapGeneratorSuite (0.09s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultPropertyAndRandomPropertyWithEqualKey_DefaultValueOnlyGenerated (0.03s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultPropertyGenerationError_Error (0.00s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_DefaultProperty_DefaultValueGenerated (0.00s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_MapWithOneValue (0.03s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error (0.03s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndLengthIs1_OneKeyValueGenerated (0.00s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_NoLimitsAndZeroLength_EmptyMap (0.00s)
--- PASS: TestHashMapGeneratorSuite/TestGenerateDataBySchema_ValueGenerationError_Error (0.00s)
=== RUN TestHtmlGenerator_GenerateHTML_NoParams_GeneratedHTMLReturned
--- PASS: TestHtmlGenerator_GenerateHTML_NoParams_GeneratedHTMLReturned (0.00s)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_min_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_max_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_min_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_max_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_exclusive_range,_min_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_exclusive_range,_max_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/32bit_format,_min_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
=== RUN TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/multiple_of,_random_value
integerGenerator_test.go:116: PASS: Int63n(int64)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_min_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_max_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_min_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_max_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_exclusive_range,_min_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_exclusive_range,_max_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/32bit_format,_min_random_value (0.00s)
--- PASS: TestIntegerGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/multiple_of,_random_value (0.00s)
=== RUN TestIntegerGenerator_GenerateDataBySchema_MaxLessThanMin_Error
--- PASS: TestIntegerGenerator_GenerateDataBySchema_MaxLessThanMin_Error (0.00s)
=== RUN TestIntegerGenerator_GenerateDataBySchema_MaxEqualToMin_StaticValue
--- PASS: TestIntegerGenerator_GenerateDataBySchema_MaxEqualToMin_StaticValue (0.00s)
=== RUN TestCamelCaseKeyGenerator_GenerateKey_NoParams_CamelCaseKey
keyGenerator_test.go:20: PASS: Intn(int)
--- PASS: TestCamelCaseKeyGenerator_GenerateKey_NoParams_CamelCaseKey (0.00s)
=== RUN TestUniqueKeyGeneratorSuite
=== RUN TestUniqueKeyGeneratorSuite/TestGenerateKey_EmptyUniqueValues_FirstValue
keyGenerator_test.go:48: PASS: GenerateKey()
=== RUN TestUniqueKeyGeneratorSuite/TestGenerateKey_FailedToGenerateUniqueValue_ErrorReturned
keyGenerator_test.go:70: PASS: GenerateKey()
=== RUN TestUniqueKeyGeneratorSuite/TestGenerateKey_GenerationError_ErrorReturned
keyGenerator_test.go:81: PASS: GenerateKey()
=== RUN TestUniqueKeyGeneratorSuite/TestGenerateKey_SecondValueIsNotUnique_ThirdValueReturned
keyGenerator_test.go:59: PASS: GenerateKey()
--- PASS: TestUniqueKeyGeneratorSuite (0.02s)
--- PASS: TestUniqueKeyGeneratorSuite/TestGenerateKey_EmptyUniqueValues_FirstValue (0.00s)
--- PASS: TestUniqueKeyGeneratorSuite/TestGenerateKey_FailedToGenerateUniqueValue_ErrorReturned (0.02s)
--- PASS: TestUniqueKeyGeneratorSuite/TestGenerateKey_GenerationError_ErrorReturned (0.00s)
--- PASS: TestUniqueKeyGeneratorSuite/TestGenerateKey_SecondValueIsNotUnique_ThirdValueReturned (0.00s)
=== RUN TestNullGenerator_GenerateDataBySchema_NullableValueAndRandomValueLessThanProbability_GeneratedDataReturned
nullGenerator_test.go:27: PASS: Float64()
nullGenerator_test.go:28: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestNullGenerator_GenerateDataBySchema_NullableValueAndRandomValueLessThanProbability_GeneratedDataReturned (0.00s)
=== RUN TestNullGenerator_GenerateDataBySchema_NullableValueAndRandomValueMoreThanProbability_NullReturned
nullGenerator_test.go:47: PASS: Float64()
--- PASS: TestNullGenerator_GenerateDataBySchema_NullableValueAndRandomValueMoreThanProbability_NullReturned (0.00s)
=== RUN TestNullGenerator_GenerateDataBySchema_NotNullableValueAndRandomValueMoreThanProbability_GeneratedDataReturned
--- PASS: TestNullGenerator_GenerateDataBySchema_NotNullableValueAndRandomValueMoreThanProbability_GeneratedDataReturned (0.00s)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_min_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_max_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_min_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_max_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/exclusive_range,_min_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/exclusive_range,_max_random_value
numberGenerator_test.go:110: PASS: Intn(int)
=== RUN TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range_and_multiple_of,_middle_random_value
numberGenerator_test.go:110: PASS: Intn(int)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_min_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/no_params,_max_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_min_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range,_max_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/exclusive_range,_min_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/exclusive_range,_max_random_value (0.00s)
--- PASS: TestNumberGenerator_GenerateDataBySchema_GivenSchemaAndRandomValue_ExpectedValue/given_range_and_multiple_of,_middle_random_value (0.00s)
=== RUN TestNumberGenerator_GenerateDataBySchema_MaxLessThanMin_Error
--- PASS: TestNumberGenerator_GenerateDataBySchema_MaxLessThanMin_Error (0.00s)
=== RUN TestNumberGenerator_GenerateDataBySchema_MaxEqualToMin_StaticValue
--- PASS: TestNumberGenerator_GenerateDataBySchema_MaxEqualToMin_StaticValue (0.00s)
=== RUN TestObjectGenerationDelegatorSuite
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/object_schema
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_true
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_false
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_empty_object
=== RUN TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_filled
--- PASS: TestObjectGenerationDelegatorSuite (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/object_schema (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_true (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_false (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_empty_object (0.00s)
--- PASS: TestObjectGenerationDelegatorSuite/TestGenerateDataBySchema_GivenObjectSchema_ValueGeneratedByExpectedGenerator/additional_properties_filled (0.00s)
=== RUN TestObjectGenerator_GenerateDataBySchema_ObjectWithOneProperty_PropertyGeneratedBySchemaGenerator
objectGenerator_test.go:31: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestObjectGenerator_GenerateDataBySchema_ObjectWithOneProperty_PropertyGeneratedBySchemaGenerator (0.00s)
=== RUN TestObjectGenerator_GenerateDataBySchema_ObjectWithOneWriteOnlyProperty_EmptyObject
--- PASS: TestObjectGenerator_GenerateDataBySchema_ObjectWithOneWriteOnlyProperty_EmptyObject (0.00s)
=== RUN TestObjectGenerator_GenerateDataBySchema_SchemaGeneratorError_ErrorReturned
objectGenerator_test.go:77: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestObjectGenerator_GenerateDataBySchema_SchemaGeneratorError_ErrorReturned (0.00s)
=== RUN TestOneOfGeneratorSuite
=== RUN TestOneOfGeneratorSuite/TestGenerateDataBySchema_EmptySchemas_EmptyObject
=== RUN TestOneOfGeneratorSuite/TestGenerateDataBySchema_TwoSchemasAndRandomIndexIsFirst_DataGeneratedForFirstSchema
--- PASS: TestOneOfGeneratorSuite (0.00s)
--- PASS: TestOneOfGeneratorSuite/TestGenerateDataBySchema_EmptySchemas_EmptyObject (0.00s)
--- PASS: TestOneOfGeneratorSuite/TestGenerateDataBySchema_TwoSchemasAndRandomIndexIsFirst_DataGeneratedForFirstSchema (0.00s)
=== RUN TestRecursionBreaker_GenerateDataBySchema_NoLevel_FirstLevelAdded
recursionBreaker_test.go:24: PASS: GenerateDataBySchema(mock.argumentMatcher,*openapi3.Schema)
--- PASS: TestRecursionBreaker_GenerateDataBySchema_NoLevel_FirstLevelAdded (0.00s)
=== RUN TestRecursionBreaker_GenerateDataBySchema_GivenLevel_LevelIncremented
recursionBreaker_test.go:42: PASS: GenerateDataBySchema(mock.argumentMatcher,*openapi3.Schema)
--- PASS: TestRecursionBreaker_GenerateDataBySchema_GivenLevel_LevelIncremented (0.00s)
=== RUN TestRecursionBreaker_GenerateDataBySchema_MaxLevelReached_Error
--- PASS: TestRecursionBreaker_GenerateDataBySchema_MaxLevelReached_Error (0.00s)
=== RUN TestRegularArrayGeneratorSuite
=== RUN TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_GivenItemsLength_ArrayOfLengthGenerated
regularArrayGenerator_test.go:86: PASS: GenerateLength(uint64,uint64)
regularArrayGenerator_test.go:87: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_RandomLength_ArrayOfLengthGenerated
regularArrayGenerator_test.go:86: PASS: GenerateLength(uint64,uint64)
regularArrayGenerator_test.go:87: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_SecondValuesLeadsToError_ReducedArrayAndError
regularArrayGenerator_test.go:86: PASS: GenerateLength(uint64,uint64)
regularArrayGenerator_test.go:87: PASS: GenerateDataBySchema(string,*openapi3.Schema)
regularArrayGenerator_test.go:87: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestRegularArrayGeneratorSuite (0.00s)
--- PASS: TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_GivenItemsLength_ArrayOfLengthGenerated (0.00s)
--- PASS: TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_RandomLength_ArrayOfLengthGenerated (0.00s)
--- PASS: TestRegularArrayGeneratorSuite/TestGenerateDataBySchema_SecondValuesLeadsToError_ReducedArrayAndError (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_TwoAllOfSchemas_MergedSchema
--- PASS: TestCombinedSchemaMerger_MergeSchemas_TwoAllOfSchemas_MergedSchema (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_ThreeAllOfSchemasAndLastOneIsEmpty_MergedSchemaShouldBeEqualTo1And2
--- PASS: TestCombinedSchemaMerger_MergeSchemas_ThreeAllOfSchemasAndLastOneIsEmpty_MergedSchemaShouldBeEqualTo1And2 (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_HierarchicalAllOfSchemas_RecursivelyMergedSchema
--- PASS: TestCombinedSchemaMerger_MergeSchemas_HierarchicalAllOfSchemas_RecursivelyMergedSchema (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_TwoAnyOfSchemasAndFirstSchemaRandomlyChosen_FirstSchema
schemaMerger_test.go:83: PASS: Intn(int)
schemaMerger_test.go:83: PASS: Float64()
--- PASS: TestCombinedSchemaMerger_MergeSchemas_TwoAnyOfSchemasAndFirstSchemaRandomlyChosen_FirstSchema (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_TwoAnyOfSchemasAndAllSchemasRandomlyChosen_MergedSchema
schemaMerger_test.go:102: PASS: Intn(int)
schemaMerger_test.go:102: PASS: Float64()
--- PASS: TestCombinedSchemaMerger_MergeSchemas_TwoAnyOfSchemasAndAllSchemasRandomlyChosen_MergedSchema (0.00s)
=== RUN TestCombinedSchemaMerger_MergeSchemas_TwoOneOfSchemasAndFirstSchemaRandomlyChosen_FirstSchema
schemaMerger_test.go:120: PASS: Intn(int)
--- PASS: TestCombinedSchemaMerger_MergeSchemas_TwoOneOfSchemasAndFirstSchemaRandomlyChosen_FirstSchema (0.00s)
=== RUN TestIsEmpty
=== RUN TestIsEmpty/nil
=== RUN TestIsEmpty/empty_string
=== RUN TestIsEmpty/non_empty_string
=== RUN TestIsEmpty/empty_int
=== RUN TestIsEmpty/non_empty_int
--- PASS: TestIsEmpty (0.00s)
--- PASS: TestIsEmpty/nil (0.00s)
--- PASS: TestIsEmpty/empty_string (0.00s)
--- PASS: TestIsEmpty/non_empty_string (0.00s)
--- PASS: TestIsEmpty/empty_int (0.00s)
--- PASS: TestIsEmpty/non_empty_int (0.00s)
=== RUN TestStringGenerator_GenerateDataBySchema_SchemaWithOneEnum_EnumValueReturned
stringGenerator_test.go:25: PASS: Intn(int)
--- PASS: TestStringGenerator_GenerateDataBySchema_SchemaWithOneEnum_EnumValueReturned (0.00s)
=== RUN TestStringGenerator_GenerateDataBySchema_SchemaWithEmptyEnum_RandomTextReturned
stringGenerator_test.go:45: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestStringGenerator_GenerateDataBySchema_SchemaWithEmptyEnum_RandomTextReturned (0.00s)
=== RUN TestStringGenerator_GenerateDataBySchema_SchemaWithPattern_RegExpGeneratedValueReturned
--- PASS: TestStringGenerator_GenerateDataBySchema_SchemaWithPattern_RegExpGeneratedValueReturned (0.00s)
=== RUN TestStringGenerator_GenerateDataBySchema_SchemaWithSupportedFormat_FormattedValueReturned
--- PASS: TestStringGenerator_GenerateDataBySchema_SchemaWithSupportedFormat_FormattedValueReturned (0.00s)
=== RUN TestStringGenerator_GenerateDataBySchema_SchemaWithoutOptions_GeneratedTextReturned
stringGenerator_test.go:92: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestStringGenerator_GenerateDataBySchema_SchemaWithoutOptions_GeneratedTextReturned (0.00s)
=== RUN TestTextGenerator_GenerateDataBySchema_MaxLengthLessThanMinLength_Error
--- PASS: TestTextGenerator_GenerateDataBySchema_MaxLengthLessThanMinLength_Error (0.00s)
=== RUN TestTextGenerator_GenerateDataBySchema_MaxLengthLessThan5_RandomStringOfGivenLength
--- PASS: TestTextGenerator_GenerateDataBySchema_MaxLengthLessThan5_RandomStringOfGivenLength (0.00s)
=== RUN TestTextGenerator_GenerateDataBySchema_MinAndMaxLength_LengthOfStringInRange
--- PASS: TestTextGenerator_GenerateDataBySchema_MinAndMaxLength_LengthOfStringInRange (0.10s)
=== RUN TestTextGenerator_GenerateDataBySchema_NoOptions_LengthOfStringInDefaultRange
--- PASS: TestTextGenerator_GenerateDataBySchema_NoOptions_LengthOfStringInDefaultRange (0.02s)
=== RUN TestTextGenerator_GenerateDataBySchema_MinLengthGreaterThanDefaultMaxLength_LengthOfStringInExpectedRange
--- PASS: TestTextGenerator_GenerateDataBySchema_MinLengthGreaterThanDefaultMaxLength_LengthOfStringInExpectedRange (0.05s)
=== RUN TestTextGenerator_GenerateDataBySchema_StrictLength_LengthOfStringHasExpectedLength
--- PASS: TestTextGenerator_GenerateDataBySchema_StrictLength_LengthOfStringHasExpectedLength (0.04s)
=== RUN TestUniqueArrayGeneratorSuite
=== RUN TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_GenerationError_Error
uniqueArrayGenerator_test.go:108: PASS: GenerateLength(uint64,uint64)
uniqueArrayGenerator_test.go:109: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_SliceWithOneValue
uniqueArrayGenerator_test.go:108: PASS: GenerateLength(uint64,uint64)
uniqueArrayGenerator_test.go:109: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error
uniqueArrayGenerator_test.go:108: PASS: GenerateLength(uint64,uint64)
uniqueArrayGenerator_test.go:109: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_OneElementLengthAndGeneratedValue_SliceWithOneValue
uniqueArrayGenerator_test.go:108: PASS: GenerateLength(uint64,uint64)
uniqueArrayGenerator_test.go:109: PASS: GenerateDataBySchema(string,*openapi3.Schema)
=== RUN TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_ZeroLength_EmptySlice
uniqueArrayGenerator_test.go:108: PASS: GenerateLength(uint64,uint64)
--- PASS: TestUniqueArrayGeneratorSuite (0.08s)
--- PASS: TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_GenerationError_Error (0.00s)
--- PASS: TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs1AndCannotGenerateSecondUniqueValue_SliceWithOneValue (0.04s)
--- PASS: TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_LengthIs2AndMinLengthIs2AndCannotGenerateSecondUniqueValue_Error (0.04s)
--- PASS: TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_OneElementLengthAndGeneratedValue_SliceWithOneValue (0.00s)
--- PASS: TestUniqueArrayGeneratorSuite/TestGenerateDataBySchema_ZeroLength_EmptySlice (0.00s)
=== RUN TestUniqueValueGenerator_GenerateDataBySchema_EmptyUniqueValues_FirstValueReturned
uniqueValueGenerator_test.go:21: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestUniqueValueGenerator_GenerateDataBySchema_EmptyUniqueValues_FirstValueReturned (0.00s)
=== RUN TestUniqueValueGenerator_GenerateDataBySchema_SecondValueIsNotUnique_ThirdValueReturned
uniqueValueGenerator_test.go:38: PASS: GenerateDataBySchema(string,*openapi3.Schema)
uniqueValueGenerator_test.go:38: PASS: GenerateDataBySchema(string,*openapi3.Schema)
uniqueValueGenerator_test.go:38: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestUniqueValueGenerator_GenerateDataBySchema_SecondValueIsNotUnique_ThirdValueReturned (0.00s)
=== RUN TestUniqueValueGenerator_GenerateDataBySchema_FailedToGenerateUniqueValue_ErrorReturned
uniqueValueGenerator_test.go:52: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestUniqueValueGenerator_GenerateDataBySchema_FailedToGenerateUniqueValue_ErrorReturned (0.04s)
=== RUN TestUniqueValueGenerator_GenerateDataBySchema_GenerationError_ErrorReturned
uniqueValueGenerator_test.go:66: PASS: GenerateDataBySchema(string,*openapi3.Schema)
--- PASS: TestUniqueValueGenerator_GenerateDataBySchema_GenerationError_ErrorReturned (0.00s)
PASS
coverage: 89.5% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/generator/data 2.260s coverage: 89.5% of statements
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/json_accept_header,_json_+_xml_contents
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_accept_header,_json_+_xml_contents
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_accept_header,_json_+_xml_contents#01
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_+_json_accept_header,_text_+_json_content
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/empty_accept_header,_json_content
=== RUN TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/empty_accept_header,_empty_content
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/json_accept_header,_json_+_xml_contents (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_accept_header,_json_+_xml_contents (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_accept_header,_json_+_xml_contents#01 (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/xml_+_json_accept_header,_text_+_json_content (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/empty_accept_header,_json_content (0.00s)
--- PASS: TestContentTypeNegotiator_NegotiateContentType_GivenContentTypesAndRequest_ExpectedContentType/empty_accept_header,_empty_content (0.00s)
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_OnlySuccessfulResponses_ResponseWithMinCodeReturned
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_OnlySuccessfulResponses_ResponseWithMinCodeReturned (0.00s)
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_OnlyErrorResponses_ResponseWithMinErrorCodeReturned
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_OnlyErrorResponses_ResponseWithMinErrorCodeReturned (0.00s)
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_EmptyResponses_Error
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_EmptyResponses_Error (0.00s)
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_InvalidResponseKey_ResponseWithMinCodeReturnedAndErrorLogged
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_InvalidResponseKey_ResponseWithMinCodeReturnedAndErrorLogged (0.00s)
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/default
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/Default
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/1xx
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/2xx
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/3xx
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/4xx
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/5xx
=== RUN TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/5XX
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/default (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/Default (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/1xx (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/2xx (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/3xx (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/4xx (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/5xx (0.00s)
--- PASS: TestStatusCodeNegotiator_NegotiateStatusCode_NonNumericResponse_ExpectedKeyAndStatusCode/5XX (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/generator/negotiator 0.808s coverage: 100.0% of statements
? github.com/muonsoft/openapi-mock/internal/openapi/handler [no test files]
=== RUN TestAutoLoader_LoadFromURI_FileName_SpecificationLoadedFromFile
autoLoader_test.go:22: PASS: LoadFromFile(string)
--- PASS: TestAutoLoader_LoadFromURI_FileName_SpecificationLoadedFromFile (0.00s)
=== RUN TestAutoLoader_LoadFromURI_URL_SpecificationLoadedFromURL
autoLoader_test.go:35: PASS: LoadFromURI(string)
--- PASS: TestAutoLoader_LoadFromURI_URL_SpecificationLoadedFromURL (0.00s)
=== RUN TestProcessingLoader_LoadFromURI_ServerUrlHasSchemeAndHost_OnlyPathInServerUrl
processingLoader_test.go:35: PASS: LoadFromURI(string)
--- PASS: TestProcessingLoader_LoadFromURI_ServerUrlHasSchemeAndHost_OnlyPathInServerUrl (0.00s)
PASS
coverage: 88.2% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/loader 0.980s coverage: 88.2% of statements
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/json_response
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/json_ld_response
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/xml_response
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/xml_response#01
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/soap_xml_response
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
=== RUN TestWriteResponse_GivenResponse_SerializedDataWritten/text_html_response
coordinatingResponder_test.go:71: PASS: Serialize(string,string)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/json_response (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/json_ld_response (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/xml_response (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/xml_response#01 (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/soap_xml_response (0.00s)
--- PASS: TestWriteResponse_GivenResponse_SerializedDataWritten/text_html_response (0.00s)
=== RUN TestCoordinatingResponder_WriteResponse_NoContentResponse_EmptyBodyWritten
coordinatingResponder_test.go:93: PASS: Serialize(string,string)
--- PASS: TestCoordinatingResponder_WriteResponse_NoContentResponse_EmptyBodyWritten (0.00s)
=== RUN TestCoordinatingResponder_WriteResponse_SerializationError_UnexpectedErrorWritten
coordinatingResponder_test.go:116: PASS: Serialize(string,string)
--- PASS: TestCoordinatingResponder_WriteResponse_SerializationError_UnexpectedErrorWritten (0.00s)
=== RUN TestCoordinatingResponder_WriteError_UnsupportedFeatureError_UnsupportedPage
--- PASS: TestCoordinatingResponder_WriteError_UnsupportedFeatureError_UnsupportedPage (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/responder 1.237s coverage: 100.0% of statements
=== RUN TestNew
--- PASS: TestNew (0.00s)
=== RUN TestCoordinatingSerializer_Serialize_SupportedFormat_DataSerializedByFormatSerializer
coordinatingSerializer_test.go:21: PASS: Serialize(string,string)
--- PASS: TestCoordinatingSerializer_Serialize_SupportedFormat_DataSerializedByFormatSerializer (0.00s)
=== RUN TestCoordinatingSerializer_Serialize_UnsupportedFormat_Error
--- PASS: TestCoordinatingSerializer_Serialize_UnsupportedFormat_Error (0.00s)
=== RUN TestJsonSerializer_Serialize_SerializableData_SerializedData
--- PASS: TestJsonSerializer_Serialize_SerializableData_SerializedData (0.00s)
=== RUN TestJsonSerializer_Serialize_UnserializableData_Error
--- PASS: TestJsonSerializer_Serialize_UnserializableData_Error (0.00s)
=== RUN TestRawSerializer_Serialize_SerializableData_BytesReturned
=== RUN TestRawSerializer_Serialize_SerializableData_BytesReturned/bytes
=== RUN TestRawSerializer_Serialize_SerializableData_BytesReturned/string
=== RUN TestRawSerializer_Serialize_SerializableData_BytesReturned/stringable
--- PASS: TestRawSerializer_Serialize_SerializableData_BytesReturned (0.00s)
--- PASS: TestRawSerializer_Serialize_SerializableData_BytesReturned/bytes (0.00s)
--- PASS: TestRawSerializer_Serialize_SerializableData_BytesReturned/string (0.00s)
--- PASS: TestRawSerializer_Serialize_SerializableData_BytesReturned/stringable (0.00s)
=== RUN TestRawSerializer_Serialize_UnserializableData_Error
--- PASS: TestRawSerializer_Serialize_UnserializableData_Error (0.00s)
=== RUN TestXmlSerializer_Serialize_SerializableData_SerializedData
=== RUN TestXmlSerializer_Serialize_SerializableData_SerializedData/map_data
=== RUN TestXmlSerializer_Serialize_SerializableData_SerializedData/array_of_objects
=== RUN TestXmlSerializer_Serialize_SerializableData_SerializedData/string
--- PASS: TestXmlSerializer_Serialize_SerializableData_SerializedData (0.00s)
--- PASS: TestXmlSerializer_Serialize_SerializableData_SerializedData/map_data (0.00s)
--- PASS: TestXmlSerializer_Serialize_SerializableData_SerializedData/array_of_objects (0.00s)
--- PASS: TestXmlSerializer_Serialize_SerializableData_SerializedData/string (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/muonsoft/openapi-mock/internal/openapi/responder/serializer 0.698s coverage: 100.0% of statements
? github.com/muonsoft/openapi-mock/internal/server [no test files]
=== RUN TestCORSHandler_ServeHTTP_RequestWithoutOrigin_RequestPassedToNextHandler
CORSHandler_test.go:21: PASS: ServeHTTP(*httptest.ResponseRecorder,*http.Request)
--- PASS: TestCORSHandler_ServeHTTP_RequestWithoutOrigin_RequestPassedToNextHandler (0.00s)
=== RUN TestCORSHandler_ServeHTTP_RequestWithAllCORSHeaders_CORSHeadersAddedToResponseAndRequestPassedToNextHandler
CORSHandler_test.go:39: PASS: ServeHTTP(*httptest.ResponseRecorder,*http.Request)
--- PASS: TestCORSHandler_ServeHTTP_RequestWithAllCORSHeaders_CORSHeadersAddedToResponseAndRequestPassedToNextHandler (0.00s)
=== RUN TestCORSHandler_ServeHTTP_RequestWithOnlyOrigin_DefaultCORSHeadersAddedToResponseAndRequestPassedToNextHandler
CORSHandler_test.go:55: PASS: ServeHTTP(*httptest.ResponseRecorder,*http.Request)
--- PASS: TestCORSHandler_ServeHTTP_RequestWithOnlyOrigin_DefaultCORSHeadersAddedToResponseAndRequestPassedToNextHandler (0.00s)
=== RUN TestContextualLoggerHandler_ServeHTTP_RequestIdInContext_LoggerSetToContext
ContextLogger_test.go:29: PASS: ServeHTTP(string,string)
--- PASS: TestContextualLoggerHandler_ServeHTTP_RequestIdInContext_LoggerSetToContext (0.00s)
=== RUN TestTracingHandler_ServeHTTP_RequestWithId_IdSetToContext
TracingHandler_test.go:30: PASS: ServeHTTP(string,mock.argumentMatcher)
--- PASS: TestTracingHandler_ServeHTTP_RequestWithId_IdSetToContext (0.00s)
=== RUN TestTracingHandler_ServeHTTP_RequestWithoutId_AutogeneratedIdSetToContext
TracingHandler_test.go:46: PASS: ServeHTTP(string,mock.argumentMatcher)
--- PASS: TestTracingHandler_ServeHTTP_RequestWithoutId_AutogeneratedIdSetToContext (0.00s)
PASS
coverage: 97.1% of statements
ok github.com/muonsoft/openapi-mock/internal/server/middleware 0.374s coverage: 97.1% of statements
=== RUN TestWithLogger_Logger_LoggerSetToContext
--- PASS: TestWithLogger_Logger_LoggerSetToContext (0.00s)
=== RUN TestLoggerFromContext_EmptyContext_NullLoggerReturned
--- PASS: TestLoggerFromContext_EmptyContext_NullLoggerReturned (0.00s)
=== RUN TestLoggerFromContext_ContextWithLogger_LoggerReturned
--- PASS: TestLoggerFromContext_ContextWithLogger_LoggerReturned (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/muonsoft/openapi-mock/pkg/logcontext 0.538s coverage: 100.0% of statements
=== RUN TestApi
=== RUN TestApi/TestCORS_CORSDisabledAndRequestHasAllCORSHeaders_NoCORSHeadersInResponse
=== RUN TestApi/TestCORS_CORSEnabledAndRequestHasAllCORSHeaders_CORSHeadersInResponse
=== RUN TestApi/TestCombinedTypes_SpecificationWithCombinedTypeSchemas_ExpectedValuesGenerated
=== RUN TestApi/TestCommonPathParameters_CommonPathParametersAndGETRequest_RouteResolved
=== RUN TestApi/TestCommonPathParameters_CommonPathParametersAndPUTRequest_RouteResolved
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/json
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/json;_application/xml;_text/html
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/ld+json;_text/html
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/xml
=== RUN TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/soap+xml;_application/xml
=== RUN TestApi/TestDefaultOptions_ConfigurationWithDefaultOptions_ExpectedValuesGenerated
=== RUN TestApi/TestDefaultResponse_OnlyDefaultResponse_500StatusAndDefaultContent
=== RUN TestApi/TestExampleUsage_MultipleExamplesInMediaAndUseExamplesIfPresent_ExampleInResponse
=== RUN TestApi/TestExampleUsage_SingleExampleInMediaAndUseExamplesDisabled_GeneratedValueInResponse
=== RUN TestApi/TestExampleUsage_SingleExampleInMediaAndUseExamplesIfPresent_ExampleInResponse
=== RUN TestApi/TestExampleUsage_ValueExamplesAndUseExamplesIfPresent_ExamplesInResponse
=== RUN TestApi/TestHTMLResponse_TextHTMLResponseSchema_HTMLGenerated
=== RUN TestApi/TestLocalCrossReference_LocalPathReference_ReferenceResolved
=== RUN TestApi/TestLocalReferenceResolving_LocalReferences_AllReferencesResolved
=== RUN TestApi/TestNullValueGeneration_NullableTypeAndMaxProbability_NullGenerated
=== RUN TestApi/TestOptionsRequest_PathWithSomeHTTPMethods_AllowHeaderWithExpectedHTTPMethods
=== RUN TestApi/TestPlainTextResponse_TextPlainResponseSchema_PlainTextGenerated
=== RUN TestApi/TestRespondingNoContent_NoContentResponse_204StatusAndEmptyResponseBody
=== RUN TestApi/TestRouting_InvalidRoute_404Status
=== RUN TestApi/TestRouting_InvalidRoute_404Status//integer-route/
=== RUN TestApi/TestRouting_InvalidRoute_404Status//integer-route/nonIntegerId
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId/subresources
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId/subresources/subresourceId
=== RUN TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//integer-route/123
=== RUN TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent
=== RUN TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//global/base/path/endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//another-global/base/path/endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status//global/base/path/third-endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status//another-global/base/path/third-endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status//endpoint/base/path/third-endpoint
=== RUN TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status//another-endpoint/base/path/third-endpoint
=== RUN TestApi/TestUnexpectedErrorPage_InvalidSchemaAndErrorsAreSuppressed_200StatusAndDefaultValue
=== RUN TestApi/TestUnexpectedErrorPage_InvalidSchema_500StatusAndErrorPage
=== RUN TestApi/TestUnsupportedFeaturePage_InvalidSchema_500StatusAndErrorPage
=== RUN TestApi/TestValueGeneration_SpecificationWithAllPossibleSchemas_ExpectedValuesGenerated
--- PASS: TestApi (0.04s)
--- PASS: TestApi/TestCORS_CORSDisabledAndRequestHasAllCORSHeaders_NoCORSHeadersInResponse (0.00s)
--- PASS: TestApi/TestCORS_CORSEnabledAndRequestHasAllCORSHeaders_CORSHeadersInResponse (0.00s)
--- PASS: TestApi/TestCombinedTypes_SpecificationWithCombinedTypeSchemas_ExpectedValuesGenerated (0.00s)
--- PASS: TestApi/TestCommonPathParameters_CommonPathParametersAndGETRequest_RouteResolved (0.00s)
--- PASS: TestApi/TestCommonPathParameters_CommonPathParametersAndPUTRequest_RouteResolved (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/json (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/json;_application/xml;_text/html (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/ld+json;_text/html (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/xml (0.00s)
--- PASS: TestApi/TestContentNegotiation_OperationWithMultipleContentTypesAndJSONAcceptHeader_ExpectedContent/application/soap+xml;_application/xml (0.00s)
--- PASS: TestApi/TestDefaultOptions_ConfigurationWithDefaultOptions_ExpectedValuesGenerated (0.00s)
--- PASS: TestApi/TestDefaultResponse_OnlyDefaultResponse_500StatusAndDefaultContent (0.00s)
--- PASS: TestApi/TestExampleUsage_MultipleExamplesInMediaAndUseExamplesIfPresent_ExampleInResponse (0.00s)
--- PASS: TestApi/TestExampleUsage_SingleExampleInMediaAndUseExamplesDisabled_GeneratedValueInResponse (0.00s)
--- PASS: TestApi/TestExampleUsage_SingleExampleInMediaAndUseExamplesIfPresent_ExampleInResponse (0.00s)
--- PASS: TestApi/TestExampleUsage_ValueExamplesAndUseExamplesIfPresent_ExamplesInResponse (0.00s)
--- PASS: TestApi/TestHTMLResponse_TextHTMLResponseSchema_HTMLGenerated (0.00s)
--- PASS: TestApi/TestLocalCrossReference_LocalPathReference_ReferenceResolved (0.00s)
--- PASS: TestApi/TestLocalReferenceResolving_LocalReferences_AllReferencesResolved (0.00s)
--- PASS: TestApi/TestNullValueGeneration_NullableTypeAndMaxProbability_NullGenerated (0.00s)
--- PASS: TestApi/TestOptionsRequest_PathWithSomeHTTPMethods_AllowHeaderWithExpectedHTTPMethods (0.00s)
--- PASS: TestApi/TestPlainTextResponse_TextPlainResponseSchema_PlainTextGenerated (0.00s)
--- PASS: TestApi/TestRespondingNoContent_NoContentResponse_204StatusAndEmptyResponseBody (0.00s)
--- PASS: TestApi/TestRouting_InvalidRoute_404Status (0.00s)
--- PASS: TestApi/TestRouting_InvalidRoute_404Status//integer-route/ (0.00s)
--- PASS: TestApi/TestRouting_InvalidRoute_404Status//integer-route/nonIntegerId (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/ (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId/subresources (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//resources/resourceId/subresources/subresourceId (0.00s)
--- PASS: TestApi/TestRouting_ValidRoute_200StatusAndExpectedContent//integer-route/123 (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//global/base/path/endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//another-global/base/path/endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingGETToEndpointsWithGlobalAndPathAndEndpointServers_200StatusAndExpectedContent//endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status//global/base/path/third-endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToExistentNotOverriddenEndpoints_200Status//another-global/base/path/third-endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status//endpoint/base/path/third-endpoint (0.00s)
--- PASS: TestApi/TestServerURLsInRouting_SendingPOSTToNonExistentNotOverriddenEndpoints_404Status//another-endpoint/base/path/third-endpoint (0.00s)
--- PASS: TestApi/TestUnexpectedErrorPage_InvalidSchemaAndErrorsAreSuppressed_200StatusAndDefaultValue (0.00s)
--- PASS: TestApi/TestUnexpectedErrorPage_InvalidSchema_500StatusAndErrorPage (0.00s)
--- PASS: TestApi/TestUnsupportedFeaturePage_InvalidSchema_500StatusAndErrorPage (0.00s)
--- PASS: TestApi/TestValueGeneration_SpecificationWithAllPossibleSchemas_ExpectedValuesGenerated (0.00s)
PASS
coverage: [no statements]
ok github.com/muonsoft/openapi-mock/test/functional/apitest 2.087s coverage: [no statements]
? github.com/muonsoft/openapi-mock/test/mocks/http [no test files]
? github.com/muonsoft/openapi-mock/test/mocks/mock/generator [no test files]
? github.com/muonsoft/openapi-mock/test/mocks/openapi/generator/content [no test files]
? github.com/muonsoft/openapi-mock/test/mocks/openapi/generator/negotiator [no test files]
? github.com/muonsoft/openapi-mock/test/mocks/openapi/responder/serializer [no test files]
Will this also support local references to a relative path?
Will this also support local references to a relative path?
@crjones I will be sure to test this and update the docs accordingly
@strider2038 Any idea when you will release this?
@kylehodgetts released in v0.3.3
Given an API whose response schema is hosted externally, i want to be able to mock this API without having to edit the openapi file to move the schema definitions inline.
Before the change, openapi-mock would throw an error about encountering a disallowed external reference. Now mock responses work as expected, returning mock responses that conform to the schema hosted at the given url.