From 560bc80a6cb24e12010297faf7ae34ce0c7a3e9f Mon Sep 17 00:00:00 2001 From: Neha Verma Date: Tue, 7 Jan 2020 17:22:55 +0530 Subject: [PATCH] FT for content create/update with license --- .../kp/test/content/v3/ContentV3Scenario.java | 21 +++++++- .../kp/test/content/v3/CreateContentTest.java | 9 ++++ .../kp/test/content/v3/UpdateContentTest.java | 12 ++++- .../request.json | 3 +- .../response.json | 10 ++-- .../request.json | 12 +++++ .../response.json | 16 +++++++ .../request.json | 12 +++++ .../response.json | 18 +++++++ .../validate.json | 47 ++++++++++++++++++ .../request.json | 11 +++++ .../response.json | 18 +++++++ .../validate.json | 47 ++++++++++++++++++ .../request.json | 9 ++++ .../response.json | 18 +++++++ .../request.json | 9 ++++ .../response.json | 16 +++++++ .../request.json | 9 ++++ .../response.json | 18 +++++++ .../validate.json | 48 +++++++++++++++++++ 20 files changed, 354 insertions(+), 9 deletions(-) create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/validate.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/validate.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/request.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/response.json create mode 100644 kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/validate.json diff --git a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/ContentV3Scenario.java b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/ContentV3Scenario.java index bad600d5..6ce9bcfe 100644 --- a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/ContentV3Scenario.java +++ b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/ContentV3Scenario.java @@ -37,8 +37,6 @@ public class ContentV3Scenario { "testCreateResourceWithInvalidConceptId"; public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_ECML_BODY = "testCreateResourceWithEcmlBody"; - public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_TYPE = - "testCreateResourceWithInvalidLicenseType"; public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_SUBJECT = "testCreateResourceWithValidFrameworkInvalidSubject"; public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_CATEGORY = @@ -47,6 +45,17 @@ public class ContentV3Scenario { "testCreateResourceWithInvalidFramework"; public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_RESOURCE_TYPE = "testCreateResourceWithInvalidResourceType"; + + //Content with license + public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_LICENSE = + "testCreateResourceWithValidLicense"; + public static final String TEST_CREATE_RESOURCE_CONTENT_WITHOUT_LICENSE = + "testCreateResourceWithoutLicense"; + public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_VALUE = + "testCreateResourceWithInvalidLicenseValue"; + public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_TYPE = + "testCreateResourceWithInvalidLicenseType"; + //Plugin public static final String TEST_CREATE_PLUGIN_CONTENT_WITH_VALID_REQUEST = "testCreatePluginContentWithValidRequest"; @@ -283,6 +292,14 @@ public class ContentV3Scenario { "testUpdateWithImageId"; //Get Content Should expect lastSubmittedOn if allowUpdate is true + //update content with license + public static final String TEST_UPDATE_CONTENT_WITH_VALID_LICENSE = + "testUpdateContentWithValidLicense"; + public static final String TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_VALUE = + "testUpdateContentWithInvalidLicenseValue"; + public static final String TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_TYPE = + "testUpdateContentWithInvalidLicenseType"; + public static final String TEST_UPDATE_WITH_SYSTEM_PROPERTY = "testUpdateContentWithSystemProperty"; public static final String TEST_UPDATE_WITH_INVALID_FORMAT_RESERVED_DIALCODES = diff --git a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/CreateContentTest.java b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/CreateContentTest.java index f292cfb2..53abfd8d 100644 --- a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/CreateContentTest.java +++ b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/CreateContentTest.java @@ -130,6 +130,12 @@ public Object[][] createResourceContentWithValidRequest() { }, new Object[]{ ContentV3Scenario.TEST_CREATE_RESOURCE_WITH_CONCEPTS + }, + new Object[]{ + ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_LICENSE + }, + new Object[]{ + ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITHOUT_LICENSE } }; } @@ -210,6 +216,9 @@ public Object[][] createResourceContentWithInvalidRequest() { }, new Object[]{ ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_CATEGORY + }, + new Object[]{ + ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_VALUE } }; } diff --git a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/UpdateContentTest.java b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/UpdateContentTest.java index 25f92f43..161a1c5f 100644 --- a/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/UpdateContentTest.java +++ b/kp_service_test/src/test/java/org/sunbird/kp/test/content/v3/UpdateContentTest.java @@ -169,6 +169,9 @@ public Object[][] updateValidResourceContent() { new Object[]{ ContentV3Scenario.TEST_UPDATE_WITH_VALID_ECML_BODY, "application/pdf", "contentInDraft" }, + new Object[]{ + ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_VALID_LICENSE, "application/pdf", "contentInDraft" + } }; } @@ -233,6 +236,12 @@ public Object[][] updateInvalidResourceContent() { // new Object[]{ // ContentV3Scenario.TEST_UPDATE_WITH_INVALID_ECML_BODY, "application/pdf", "contentInDraft" // }, + new Object[]{ + ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_TYPE, "application/pdf", "contentInDraft" + }, + new Object[]{ + ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_VALUE, "application/pdf", "contentInDraft" + } }; } @@ -263,8 +272,7 @@ public Object[][] updateImageResourceContent() { }, new Object[]{ ContentV3Scenario.TEST_UPDATE_CONTENT_IN_LIVE_WITH_IMAGE, "application/pdf", "contentInLiveImageDraft" - }, - + } }; } diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/request.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/request.json index 9e7bea2a..f72e9147 100644 --- a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/request.json +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/request.json @@ -1,11 +1,12 @@ { "request": { "content": { + "identifier":"${contentIdVal}", "name": "Course", "contentType": "Resource", "code": "citrus:Code", "mimeType": "application/pdf", - "license": "InvalidOther" + "license": ["CC BY 4.0"] } } } \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/response.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/response.json index d1c7d3ce..59d3d691 100644 --- a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/response.json +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseType/response.json @@ -1,16 +1,18 @@ { - "id": "api.content.create", + "id": "api.content.update", "ver": "3.0", "ts": "@matchesDatePattern('yyyy-MM-dd')@", "params": { "resmsgid": "@ignore@", "msgid": null, - "err": "ERR_INVALID_EDGE_PROPERTY", + "err": "CLIENT_ERROR", "status": "failed", - "errmsg": "@ignore@" + "errmsg": "Validation Errors" }, "responseCode": "CLIENT_ERROR", "result": { - "messages": null + "messages": [ + "Metadata license should be a/an String value" + ] } } \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/request.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/request.json new file mode 100644 index 00000000..8d6534cf --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/request.json @@ -0,0 +1,12 @@ +{ + "request": { + "content": { + "identifier":"${contentIdVal}", + "name": "Course", + "contentType": "Resource", + "code": "citrus:Code", + "mimeType": "application/pdf", + "license": "InvalidValue" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/response.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/response.json new file mode 100644 index 00000000..b1b475ef --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithInvalidLicenseValue/response.json @@ -0,0 +1,16 @@ +{ + "id": "api.content.create", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": "ERR_INVALID_EDGE_PROPERTY", + "status": "failed", + "errmsg": "@startsWith('license value should be one of List')@" + }, + "responseCode": "CLIENT_ERROR", + "result": { + "messages": null + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/request.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/request.json new file mode 100644 index 00000000..8815d718 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/request.json @@ -0,0 +1,12 @@ +{ + "request": { + "content": { + "identifier":"${contentIdVal}", + "name": "KP Integration Test Content", + "code": "kp.ft.resource.pdf", + "mimeType": "application/pdf", + "contentType":"Resource", + "license": "CC BY 4.0" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/response.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/response.json new file mode 100644 index 00000000..44461e41 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/response.json @@ -0,0 +1,18 @@ +{ + "id": "api.content.create", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": null, + "status": "successful", + "errmsg": null + }, + "responseCode": "OK", + "result": { + "node_id": "${contentIdVal}", + "identifier": "${contentIdVal}", + "versionKey": "@isNumber()@" + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/validate.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/validate.json new file mode 100644 index 00000000..376e14d6 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithValidLicense/validate.json @@ -0,0 +1,47 @@ +{ + "id" : "api.content.read", + "ver" : "3.0", + "ts" : "@matchesDatePattern('yyyy-MM-dd')@", + "params" : { + "resmsgid" : "@ignore@", + "msgid" : null, + "err" : null, + "status" : "successful", + "errmsg" : null + }, + "responseCode" : "OK", + "result" : { + "content" : { + "ownershipType" : [ "createdBy" ], + "code" : "kp.ft.resource.pdf", + "channel" : "channel-01", + "language" : [ "English" ], + "mimeType" : "application/pdf", + "idealScreenSize" : "normal", + "createdOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "appId" : "@ignore@", + "contentDisposition" : "inline", + "lastUpdatedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "contentEncoding" : "identity", + "contentType" : "Resource", + "dialcodeRequired" : "No", + "identifier" : "${contentIdVal}", + "lastStatusChangedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "audience" : [ "Learner" ], + "os" : [ "All" ], + "visibility" : "Default", + "consumerId" : "@ignore@", + "mediaType" : "content", + "osId" : "org.ekstep.quiz.app", + "languageCode" : [ ], + "version" :"@isNumber()@", + "versionKey" : "@ignore@", + "license" : "CC BY 4.0", + "idealScreenDensity" : "hdpi", + "framework" : "NCF", + "compatibilityLevel" :"@isNumber()@", + "name" : "KP Integration Test Content", + "status" : "Draft" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/request.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/request.json new file mode 100644 index 00000000..98e1858d --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/request.json @@ -0,0 +1,11 @@ +{ + "request": { + "content": { + "identifier":"${contentIdVal}", + "name": "KP Integration Test Content", + "code": "kp.ft.resource.pdf", + "mimeType": "application/pdf", + "contentType":"Resource" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/response.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/response.json new file mode 100644 index 00000000..44461e41 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/response.json @@ -0,0 +1,18 @@ +{ + "id": "api.content.create", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": null, + "status": "successful", + "errmsg": null + }, + "responseCode": "OK", + "result": { + "node_id": "${contentIdVal}", + "identifier": "${contentIdVal}", + "versionKey": "@isNumber()@" + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/validate.json b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/validate.json new file mode 100644 index 00000000..376e14d6 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/create/testCreateResourceWithoutLicense/validate.json @@ -0,0 +1,47 @@ +{ + "id" : "api.content.read", + "ver" : "3.0", + "ts" : "@matchesDatePattern('yyyy-MM-dd')@", + "params" : { + "resmsgid" : "@ignore@", + "msgid" : null, + "err" : null, + "status" : "successful", + "errmsg" : null + }, + "responseCode" : "OK", + "result" : { + "content" : { + "ownershipType" : [ "createdBy" ], + "code" : "kp.ft.resource.pdf", + "channel" : "channel-01", + "language" : [ "English" ], + "mimeType" : "application/pdf", + "idealScreenSize" : "normal", + "createdOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "appId" : "@ignore@", + "contentDisposition" : "inline", + "lastUpdatedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "contentEncoding" : "identity", + "contentType" : "Resource", + "dialcodeRequired" : "No", + "identifier" : "${contentIdVal}", + "lastStatusChangedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "audience" : [ "Learner" ], + "os" : [ "All" ], + "visibility" : "Default", + "consumerId" : "@ignore@", + "mediaType" : "content", + "osId" : "org.ekstep.quiz.app", + "languageCode" : [ ], + "version" :"@isNumber()@", + "versionKey" : "@ignore@", + "license" : "CC BY 4.0", + "idealScreenDensity" : "hdpi", + "framework" : "NCF", + "compatibilityLevel" :"@isNumber()@", + "name" : "KP Integration Test Content", + "status" : "Draft" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/request.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/request.json new file mode 100644 index 00000000..9b70c0a6 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/request.json @@ -0,0 +1,9 @@ +{ + "request": { + "content": { + "name": "KP-Updated-pdf", + "versionKey": "${versionKeyVal}", + "license": ["CC BY 4.0"] + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/response.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/response.json new file mode 100644 index 00000000..96492969 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseType/response.json @@ -0,0 +1,18 @@ +{ + "id": "api.content.update", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": "CLIENT_ERROR", + "status": "failed", + "errmsg": "Validation Errors" + }, + "responseCode": "CLIENT_ERROR", + "result": { + "messages": [ + "Metadata license should be a/an String value" + ] + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/request.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/request.json new file mode 100644 index 00000000..8f894738 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/request.json @@ -0,0 +1,9 @@ +{ + "request": { + "content": { + "name": "KP-Updated-pdf", + "versionKey": "${versionKeyVal}", + "license": "Invalid License" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/response.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/response.json new file mode 100644 index 00000000..b21cb523 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithInvalidLicenseValue/response.json @@ -0,0 +1,16 @@ +{ + "id": "api.content.update", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": "ERR_INVALID_EDGE_PROPERTY", + "status": "failed", + "errmsg": "@startsWith('license value should be one of List')@" + }, + "responseCode": "CLIENT_ERROR", + "result": { + "messages": null + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/request.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/request.json new file mode 100644 index 00000000..8e9ea2a5 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/request.json @@ -0,0 +1,9 @@ +{ + "request": { + "content": { + "name": "KP-Updated-pdf", + "versionKey": "${versionKeyVal}", + "license": "CC BY-SA 4.0" + } + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/response.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/response.json new file mode 100644 index 00000000..21035546 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/response.json @@ -0,0 +1,18 @@ +{ + "id": "api.content.update", + "ver": "3.0", + "ts": "@matchesDatePattern('yyyy-MM-dd')@", + "params": { + "resmsgid": "@ignore@", + "msgid": null, + "err": null, + "status": "successful", + "errmsg": null + }, + "responseCode": "OK", + "result": { + "node_id": "${contentIdVal}", + "identifier": "${contentIdVal}", + "versionKey": "@isNumber()@" + } +} \ No newline at end of file diff --git a/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/validate.json b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/validate.json new file mode 100644 index 00000000..31dce240 --- /dev/null +++ b/kp_service_test/src/test/resources/templates/content/v3/update/testUpdateContentWithValidLicense/validate.json @@ -0,0 +1,48 @@ +{ + "id" : "api.content.read", + "ver" : "3.0", + "ts" : "@matchesDatePattern('yyyy-MM-dd')@", + "params" : { + "resmsgid" : "@ignore@", + "msgid" : null, + "err" : null, + "status" : "successful", + "errmsg" : null + }, + "responseCode" : "OK", + "result" : { + "content" : { + "ownershipType" : [ "createdBy" ], + "code" : "kp.ft.resource.pdf", + "channel" : "channel-01", + "description" : "KP Integration Test Content", + "language" : [ "English" ], + "mimeType" : "application/pdf", + "idealScreenSize" : "normal", + "createdOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "appId" : "@ignore@", + "contentDisposition" : "inline", + "lastUpdatedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "contentEncoding" : "identity", + "contentType" : "Resource", + "dialcodeRequired" : "No", + "identifier" : "${contentIdVal}", + "lastStatusChangedOn" : "@matchesDatePattern('yyyy-MM-dd')@", + "audience" : [ "Learner" ], + "os" : [ "All" ], + "visibility" : "Default", + "consumerId" : "@ignore@", + "mediaType" : "content", + "osId" : "org.ekstep.quiz.app", + "languageCode" : [ ], + "version" :"@isNumber()@", + "versionKey" : "@ignore@", + "license" : "CC BY-SA 4.0", + "idealScreenDensity" : "hdpi", + "framework" : "NCF", + "compatibilityLevel" :"@isNumber()@", + "name" : "KP-Updated-pdf", + "status" : "Draft" + } + } +} \ No newline at end of file