Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue KN-000 fix: OCI cloud URL issue fix #1010

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
59e42ec
feat : Updated scala version to 2.12
aimansharief Mar 20, 2023
9c7c619
Merge branch 'Sunbird-Knowlg:master' into KN-848
aimansharief Apr 25, 2023
9966f93
Revert "Merge branch 'Sunbird-Knowlg:master' into KN-848"
aimansharief Apr 25, 2023
6986d02
Delete schema.json
aimansharief Apr 26, 2023
35fde5c
Issue KN-848 fix: Removed the deprecated import and added the alterna…
aimansharief Apr 26, 2023
25d66bd
Issue #KN-10 feat: Added create framework API
aimansharief May 9, 2023
3d9900c
Issue #KN-10 fix: Updated youtubeurl
aimansharief May 9, 2023
f633e69
Delete StorageService.scala
aimansharief May 9, 2023
e875590
Revert "Delete StorageService.scala"
aimansharief May 9, 2023
1d04d26
Updated Cloud-store-sdk version
aimansharief May 9, 2023
8a7a3bc
Update YouTubeUrlUtilTest.java
aimansharief May 9, 2023
c35989f
Update YouTubeURLManagerImplTest.java
aimansharief May 9, 2023
0be27f9
Updated YoutubeUrls
aimansharief May 9, 2023
7bdb8ce
Issue #KN-10 feat: Added framework cache for read framework
aimansharief May 12, 2023
54b409a
Issue #KN-10 feat: Updated create framework API
aimansharief May 15, 2023
d8b309d
Undo logger changes
aimansharief May 15, 2023
e831571
Update DataNode.scala
aimansharief May 15, 2023
cbb117e
Update DataNode , DefinitionNode
aimansharief May 15, 2023
e89650e
Issue #KN-10 feat: Added update framework API
aimansharief May 16, 2023
11466c3
Issue #KN-10 feat: retire framework API added
pallakartheekreddy May 16, 2023
95e7fe3
Issue #KN-10 feat: Added copy framework API
aimansharief May 17, 2023
756b166
Issue #KN-10 fix: create framework API fixes
aimansharief May 18, 2023
4865058
Issue #KN-10 feat: Added update and retire framework APIs
aimansharief May 18, 2023
09de05c
Issue #KN-10 feat: Added update and retire framework APIsIssue #KN-10…
aimansharief May 31, 2023
3a95608
Issue #KN-10 feat: framework publish and read API changes
pallakartheekreddy Jun 5, 2023
521bdf3
feat: refactoring jacoco version update
maheshkumargangula Jun 5, 2023
dfc8e63
Issue #KN-10 feat: category, categoryInstance and term APIs Added
pallakartheekreddy Jun 5, 2023
d63d522
Issue #KN-848 fix: updated scala version and test dependencies
shourya-solanki Jun 5, 2023
81b2230
Issue #KN-848 fix: updated jsonschemavalidator
shourya-solanki Jun 6, 2023
77a9a51
Issue #KN-848 fix: updated schema path
shourya-solanki Jun 6, 2023
d33dbc2
Issue #KN-848 fix: updated schema path
shourya-solanki Jun 6, 2023
766c157
Issue #KN-848 fix: updated schema path
shourya-solanki Jun 6, 2023
2718f59
Merge branch 'release-5.5.0' into KN-848
maheshkumargangula Jun 6, 2023
0aae932
Issue #KN-10 feat:Added TestCases for Master Category
aimansharief Jun 7, 2023
f3bb9ca
feat: handle in-relationship metadata to set the index
maheshkumargangula Jun 8, 2023
1c9988b
Issue #KN-10 feat:Bug fix in Create Category API
aimansharief Jun 8, 2023
109d98c
Issue #KN-10 feat:Added TestCases for CategoryInstance ,Framework Term
aimansharief Jun 8, 2023
10c3125
Issue KN-10 fix: get node inRelations data issue fix
pallakartheekreddy Jun 8, 2023
2f6f412
KN-10 fix: index value populating in relation metadata
pallakartheekreddy Jun 9, 2023
9bed968
Issue IQ-436 feat: code changes for question & questionset v2 api's
krgauraw Jun 12, 2023
f5c3c46
Issue #IQ-436 fix: fixed HttpUrlUtilTest tests
krgauraw Jun 12, 2023
0ffe91d
KN-10 fix: index value populating in relation metadata for term api
pallakartheekreddy Jun 12, 2023
86677ce
Issue KN-10 fix: Validate translations and bug fix in category
aimansharief Jun 12, 2023
fcc48c0
Merge branch 'KN-10' of https://github.com/aimansharief/knowledge-pla…
aimansharief Jun 12, 2023
e881e5d
Issue #IQ-436 fix: updated code to handle NullPointerException
krgauraw Jun 12, 2023
bedc0fe
Issue #IQ-436 fix: fixed build issue
krgauraw Jun 12, 2023
1f4c5b6
Issue #IQ-436 fix: fixed build issue
krgauraw Jun 12, 2023
5c7f38e
Issue #KN-848 fix: updated test cases
shourya-solanki Jun 12, 2023
e03a10f
Issue #IQ-436 feat: added test cases
krgauraw Jun 12, 2023
8aaee5a
Issue #IQ-436 fix: updated test cases
krgauraw Jun 12, 2023
ced263a
Issue #IQ-436 fix: updated test case
krgauraw Jun 12, 2023
a430751
Merge branch 'KN-848' of https://github.com/ShouraySolanki/knowledge-…
pallakartheekreddy Jun 12, 2023
e61c94c
Issue KN-848 feat: taxonomy service migration to SBT.
pallakartheekreddy Jun 12, 2023
4a2f7db
Issue #IQ436 feat: updated code for test
krgauraw Jun 12, 2023
83b4c2b
Merge pull request #946 from krgauraw/release-5.6.0
pallakartheekreddy Jun 12, 2023
8329560
Issue #KN-848 fix: updated test cases
shourya-solanki Jun 14, 2023
ece48e8
Merge branch 'KN-848' of https://github.com/ShouraySolanki/knowledge-…
shourya-solanki Jun 14, 2023
2af5e32
Issue KN-10 fix: Added Master Category Validation in Category Instanc…
aimansharief Jun 15, 2023
b82480b
Issue KN-10 fix: Added Test Cases
aimansharief Jun 15, 2023
b7d51d5
Issue KN-10 fix: framework read initial commit
pallakartheekreddy Jun 16, 2023
033ce41
Issue KN-10 fix: read and publish API changes
pallakartheekreddy Jun 18, 2023
95ede14
Issue KN-10 fix: read framework hierarchy fix
pallakartheekreddy Jun 19, 2023
7051165
Issue KN-10 fix: Test Cases for Framework
aimansharief Jun 20, 2023
1d723cd
Issue KN-10 feat: category terms set in redis on publish
pallakartheekreddy Jun 20, 2023
29bc07d
Issue KN-10 fix: framework copy API changes
pallakartheekreddy Jun 20, 2023
13fdb15
Issue KN-10 fix: master category required schema properties added
pallakartheekreddy Jun 20, 2023
45ee12c
Issue KN-10 fix: Test Cases for Framework
aimansharief Jun 21, 2023
7be8d4d
Issue KN-10 fix: category instance validation issue fix
pallakartheekreddy Jun 21, 2023
c0ca354
Merge branch 'framework' of https://github.com/aimansharief/knowledge…
pallakartheekreddy Jun 21, 2023
adc38af
Merge pull request #1 from aimansharief/framework
aimansharief Jun 21, 2023
05673c1
Issue #KN-848 fix: updated test cases
shourya-solanki Jun 21, 2023
8c17bdf
Issue #KN-848 fix: updated base branch
shourya-solanki Jun 21, 2023
57d9f21
Issue KN-10 fix: framework copy API validation issue fix
pallakartheekreddy Jun 21, 2023
6c6b239
Issue #KN-848 fix: updated application.conf
shourya-solanki Jun 21, 2023
0e3c671
Issue #KN-848 fix: updated application.conf and error message
shourya-solanki Jun 21, 2023
9abeac3
Issue KN-10 fix: removed commented code
pallakartheekreddy Jun 21, 2023
422b672
Merge pull request #2 from aimansharief/framework
pallakartheekreddy Jun 21, 2023
0950f4d
Issue #KN-848 fix: removed imports
shourya-solanki Jun 21, 2023
e57f53a
Issue KN-10 fix: removed println statements
pallakartheekreddy Jun 21, 2023
8856b23
Issue #KN-848 fix: removed imports
shourya-solanki Jun 21, 2023
087e48c
Issue #KN-848 fix: dummy commit
shourya-solanki Jun 21, 2023
5c70818
Issue #KN-848 fix: test commit
shourya-solanki Jun 22, 2023
a2f0a2a
Issue #KN-848 fix: updated test
shourya-solanki Jun 22, 2023
7a5a30f
fix: added connection exception scenario.
maheshkumargangula Jun 22, 2023
52164a6
fix: remove Matchers trait from BaseSpec
maheshkumargangula Jun 22, 2023
e4a66f8
Merge branch 'KN-848' of https://github.com/ShouraySolanki/knowledge-…
aimansharief Jun 22, 2023
ccab406
fix: upgrade plowermock
maheshkumargangula Jun 22, 2023
151d072
Merge pull request #949 from ShouraySolanki/KN-848
maheshkumargangula Jun 23, 2023
785f02f
Merge pull request #4 from ShouraySolanki/KN-848
aimansharief Jun 23, 2023
1bf9894
Issue KN-10 fix: DataSubGraph moved to correct folder
pallakartheekreddy Jun 23, 2023
c0829eb
Issue KN-10 fix: test cases issue fixed
pallakartheekreddy Jun 23, 2023
cb2bcaf
Issue KN-10 test: unit testes added for read & publish apis
pallakartheekreddy Jun 23, 2023
bae1355
Merge pull request #951 from aimansharief/KN-10-848
maheshkumargangula Jun 26, 2023
fcd421e
Issue KN-10 fix: Jackson dependency exclusion
pallakartheekreddy Jun 27, 2023
0a928ff
Merge pull request #952 from aimansharief/KN-10-848
maheshkumargangula Jun 27, 2023
acd7239
Merge pull request #7 from Sunbird-Knowlg/release-5.6.0
aimansharief Jun 27, 2023
dd28d87
Merge pull request #5 from aimansharief/framework
pallakartheekreddy Jun 27, 2023
9701ca7
Issue #KN-10 fix: relation index issue fix
pallakartheekreddy Jun 27, 2023
9a7c809
Merge branch 'KN-10-848' of https://github.com/aimansharief/knowledge…
pallakartheekreddy Jun 27, 2023
6568f0b
Merge pull request #954 from aimansharief/KN-10-848
maheshkumargangula Jun 27, 2023
81f67e4
Issue #KN-10 fix: logs added
pallakartheekreddy Jun 28, 2023
95bfcd2
Merge pull request #955 from aimansharief/KN-10-848
pallakartheekreddy Jun 28, 2023
45bc0ad
Issue #KN-10 fix: index issue fix for categoryInstance
pallakartheekreddy Jun 28, 2023
fb723f3
Issue #KN-10 fix: disable Cache true & false conditions handled
pallakartheekreddy Jun 28, 2023
23c061f
Merge pull request #956 from aimansharief/KN-10-848
maheshkumargangula Jun 28, 2023
9d1a418
Issue #KN-10 fix: framework response sort issue fixed
pallakartheekreddy Jun 29, 2023
c01e766
Merge pull request #957 from aimansharief/KN-10-848
maheshkumargangula Jun 30, 2023
6c683e8
Issue KN-10 fix: copy framework cache issue fix
pallakartheekreddy Jul 4, 2023
20bca31
Issue KN-10 fix: framework name issue fix
pallakartheekreddy Jul 5, 2023
c8cba45
Merge pull request #959 from aimansharief/KN-10-848
maheshkumargangula Jul 5, 2023
199c807
Merge pull request #960 from aimansharief/KN-10-848
pallakartheekreddy Jul 5, 2023
166c295
Issue KN-10 fix: DIAL code reserve issue fix
pallakartheekreddy Jul 12, 2023
27f4142
Issue KN-10 fix: DIAL code reserve issue fix
pallakartheekreddy Jul 12, 2023
4df413a
Issue KN-10 fix: DIAL code reserve issue fix
pallakartheekreddy Jul 12, 2023
aee2303
Merge pull request #963 from pallakartheekreddy/release-5.6.0
maheshkumargangula Jul 12, 2023
32633bf
Issue KN-10 fix: category cache issue fix
pallakartheekreddy Jul 19, 2023
3f92f64
Issue KN-10 fix: kafka version updated
pallakartheekreddy Jul 19, 2023
85af1ee
Merge pull request #968 from pallakartheekreddy/release-5.6.0
pallakartheekreddy Jul 19, 2023
58c3c02
Merge branch 'release-5.6.0' into release-5.5.0
pallakartheekreddy Sep 7, 2023
7af128a
Update StorageServiceTest.scala
pallakartheekreddy Sep 7, 2023
3139305
Issue KN-000 fix: OCI URL issue fix
pallakartheekreddy Nov 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please describe the tests that you ran to verify your changes in the below check
- [ ] Ran Test B

**Test Configuration**:
* Software versions: Java 11, scala-2.11, play-2.7.2
* Software versions: Java 11, scala-2.12, play-2.7.2
* Hardware versions: 2 CPU/ 4GB RAM

### Checklist:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please describe the tests that you ran to verify your changes in the below check
- [ ] Ran Test B

**Test Configuration**:
* Software versions: Java 11, scala-2.11, play-2.7.2
* Software versions: Java 11, scala-2.12, play-2.7.2
* Hardware versions:

### Checklist:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ services:
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:2181

kafka:
image: 'wurstmeister/kafka:2.11-1.0.1'
image: 'wurstmeister/kafka:2.12-1.0.1'
container_name: kafka
ports:
- "9092:9092"
Expand Down
2 changes: 1 addition & 1 deletion assessment-api/assessment-actors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>graph-engine_2.11</artifactId>
<artifactId>graph-engine_2.12</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.sunbird.graph.nodes.DataNode
import org.sunbird.graph.utils.NodeUtil
import org.sunbird.parseq.Task

import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters.seqAsJavaListConverter
import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import org.sunbird.telemetry.util.LogTelemetryEventUtil
import org.sunbird.utils.RequestUtil

import scala.concurrent.{ExecutionContext, Future}
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters
import scala.collection.JavaConverters._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.sunbird.graph.OntologyEngineContext
import org.sunbird.graph.schema.DefinitionNode

import scala.concurrent.ExecutionContext
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._

object RequestUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.sunbird.graph.utils.ScalaJsonUtils
import org.sunbird.graph.{GraphService, OntologyEngineContext}
import org.sunbird.kafka.client.KafkaClient

import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import org.sunbird.managers.CopyManager
import org.sunbird.utils.{AssessmentConstants, BranchingUtil, JavaJsonUtils}

import java.util
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
Expand Down
2 changes: 1 addition & 1 deletion assessment-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<scala.major.version>2.11</scala.major.version>
<scala.major.version>2.12</scala.major.version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion assessment-api/qs-hierarchy-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>graph-engine_2.11</artifactId>
<artifactId>graph-engine_2.12</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.sunbird.graph.dac.model.Node
import org.sunbird.graph.nodes.DataNode
import org.sunbird.graph.utils.{NodeUtil, ScalaJsonUtils}

import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters._
import scala.collection.JavaConverters
import scala.concurrent.{ExecutionContext, Future}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.sunbird.managers

import java.util
import java.util.concurrent.CompletionException

import org.apache.commons.collections4.{CollectionUtils, MapUtils}
import org.apache.commons.lang3.StringUtils
import org.sunbird.common.dto.{Request, Response, ResponseHandler}
Expand All @@ -18,8 +17,8 @@ import org.sunbird.graph.utils.{NodeUtil, ScalaJsonUtils}
import org.sunbird.telemetry.logger.TelemetryManager
import org.sunbird.utils.{HierarchyConstants, HierarchyErrorCodes}

import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._
import scala.collection.mutable
import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.sunbird.common.exception.ClientException
import org.sunbird.graph.OntologyEngineContext
import org.sunbird.utils.HierarchyConstants

import scala.collection.JavaConversions._

import scala.collection.JavaConverters._

class HierarchyManagerTest extends BaseSpec {
Expand Down
2 changes: 1 addition & 1 deletion content-api/collection-csv-actors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>graph-engine_2.11</artifactId>
<artifactId>graph-engine_2.12</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.nio.charset.StandardCharsets
import java.util
import java.util.logging.Logger
import scala.collection.immutable.{ListMap, Map}
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters.{asJavaIterableConverter, mapAsScalaMapConverter}
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.io.{File, FileInputStream, IOException, InputStreamReader}
import java.nio.charset.StandardCharsets
import java.text.MessageFormat
import java.util
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters.{asScalaBufferConverter, mapAsJavaMapConverter, mapAsScalaMapConverter}
import scala.collection.immutable.{HashMap, ListMap, Map}
import scala.concurrent.ExecutionContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
schema.base_path = "../../schemas/"
schema.base_path = "../../schemas"

# Configuration
graph.dir=/data/testingGraphDB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class TestCollectionCSVActor extends FlatSpec with Matchers with MockFactory {
"CollectionCSVActor" should "return failed response for 'unknown' operation" in {
testUnknownOperation( Props(new CollectionCSVActor()), getCollectionRequest())
}

it should "return client error on giving content Id with no children" in {
(oec.graphService _).expects().returns(graphDB).anyNumberOfTimes()

Expand Down
4 changes: 2 additions & 2 deletions content-api/content-actors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>graph-engine_2.11</artifactId>
<artifactId>graph-engine_2.12</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Expand Down Expand Up @@ -81,7 +81,7 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.4.0</version>
<version>3.2.2</version>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<checkMultipleScalaVersions>false</checkMultipleScalaVersions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.apache.commons.lang3.StringUtils
import org.sunbird.common.JsonUtils

import scala.collection.JavaConverters._
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.mutable.ListBuffer

object ChannelManager {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.sunbird.content.dial

import org.apache.commons.lang3.StringUtils
import org.sunbird.common.Platform
import org.sunbird.common.{JsonUtils, Platform}
import org.sunbird.common.dto.{Request, Response, ResponseHandler}
import org.sunbird.common.exception._
import org.sunbird.content.util.ContentConstants
Expand Down Expand Up @@ -476,7 +476,9 @@ object DIALManager {
def getDIALReserveUpdateResponse(response: Response, count: Integer, contentId: String, node: Node): Response = {
response.getResult.put(DIALConstants.COUNT, count)
response.getResult.put(ContentConstants.NODE_ID, contentId)
response.getResult.put(DIALConstants.RESERVED_DIALCODES, node.getMetadata.get(DIALConstants.RESERVED_DIALCODES))
val reservDialCodes: String = node.getMetadata.get(DIALConstants.RESERVED_DIALCODES).asInstanceOf[String]
if(StringUtils.isNotBlank(reservDialCodes))
response.getResult.put(DIALConstants.RESERVED_DIALCODES, JsonUtils.deserialize(reservDialCodes, classOf[util.Map[String, Integer]]))

response
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.sunbird.managers.UpdateHierarchyManager.{fetchHierarchy, shouldImageB
import org.sunbird.telemetry.logger.TelemetryManager
import org.sunbird.utils.{HierarchyConstants, HierarchyErrorCodes}

import scala.collection.JavaConversions._

import scala.concurrent.{ExecutionContext, Future}

object DiscardManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.sunbird.graph.utils.NodeUtil
import org.sunbird.telemetry.logger.TelemetryManager
import org.sunbird.utils.HierarchyConstants
import scala.concurrent.{ExecutionContext, Future}
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
import scala.collection.JavaConverters._

object FlagManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import org.sunbird.parseq.Task
import org.sunbird.telemetry.logger.TelemetryManager
import org.sunbird.utils.HierarchyConstants

import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._
import scala.collection.mutable.ListBuffer
import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ framework.cache.read=false
# Max size(width/height) of thumbnail in pixels
max.thumbnail.size.pixels=150

schema.base_path="../../schemas/"
schema.base_path = "../../schemas"
content.hierarchy.removed_props_for_leafNodes=["collections","children","usedByContent","item_sets","methods","libraries","editorState"]
learning_content_youtube_apikey=""

collection.keyspace = "hierarchy_store"
content.keyspace = "content_store"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ class TestCategoryActor extends BaseSpec with MockFactory{
(graphDB.getNodeByUniqueIds(_: String, _: SearchCriteria)).expects(*, *).returns(Future(nodes)).anyNumberOfTimes()

val request = getCategoryRequest()
request.putAll(mapAsJavaMap(Map("name" -> "do_1234")))
request.getRequest.put("orgIdFieldName", "stateIds")
request.getRequest.put("targetIdFieldName", "targetStateIds")
request.getRequest.put("searchIdFieldName", "se_stateIds")
request.getRequest.put("searchLabelFieldName", "se_states")
request.putAll(mapAsJavaMap(Map("name" -> "do_1234", "code" -> "do_1234")))
request.setOperation("createCategory")
val response = callActor(request, Props(new CategoryActor()))
assert(response.get("identifier") != null)
Expand All @@ -45,6 +49,11 @@ class TestCategoryActor extends BaseSpec with MockFactory{
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val request = getCategoryRequest()
request.setOperation("createCategory")
request.getRequest.put("orgIdFieldName", "stateIds")
request.getRequest.put("targetIdFieldName", "targetStateIds")
request.getRequest.put("searchIdFieldName", "se_stateIds")
request.getRequest.put("searchLabelFieldName", "se_states")
request.putAll(mapAsJavaMap(Map("code" -> "do_1234")))
val response = callActor(request, Props(new CategoryActor()))
assert(response.getResponseCode == ResponseCode.CLIENT_ERROR)
assert(StringUtils.equalsIgnoreCase(response.get("messages").asInstanceOf[util.ArrayList[String]].get(0).asInstanceOf[String], "Required Metadata name not set"))
Expand All @@ -54,7 +63,11 @@ class TestCategoryActor extends BaseSpec with MockFactory{
implicit val ss = mock[StorageService]
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val request = getCategoryRequest()
request.putAll(mapAsJavaMap(Map("identifier" -> "do_1234")))
request.getRequest.put("orgIdFieldName", "stateIds")
request.getRequest.put("targetIdFieldName", "targetStateIds")
request.getRequest.put("searchIdFieldName", "se_stateIds")
request.getRequest.put("searchLabelFieldName", "se_states")
request.putAll(mapAsJavaMap(Map("identifier" -> "do_1234", "code" -> "do_1234")))
request.setOperation("createCategory")
val response = callActor(request, Props(new CategoryActor()))
assert(response.getResponseCode == ResponseCode.CLIENT_ERROR)
Expand All @@ -74,7 +87,7 @@ class TestCategoryActor extends BaseSpec with MockFactory{
implicit val ss = mock[StorageService]
val request = getCategoryRequest()
request.getContext.put("identifier","do_1234")
request.putAll(mapAsJavaMap(Map("description" -> "test desc")))
request.putAll(mapAsJavaMap(Map("description" -> "test desc", "code" -> "do_1234")))
request.setOperation("updateCategory")
val response = callActor(request, Props(new CategoryActor()))
assert("successful".equals(response.getParams.getStatus))
Expand Down Expand Up @@ -109,7 +122,7 @@ class TestCategoryActor extends BaseSpec with MockFactory{
implicit val ss = mock[StorageService]
val request = getCategoryRequest()
request.getContext.put("identifier","do_1234")
request.putAll(mapAsJavaMap(Map("identifier" -> "do_1234")))
request.putAll(mapAsJavaMap(Map("identifier" -> "do_1234", "code" -> "do_1234")))
request.setOperation("retireCategory")
val response = callActor(request, Props(new CategoryActor()))
assert("successful".equals(response.getParams.getStatus))
Expand Down Expand Up @@ -142,6 +155,10 @@ class TestCategoryActor extends BaseSpec with MockFactory{
put("status", "Live")
put("name", "do_1234")
put("versionKey", "1878141")
put("orgIdFieldName", "stateIds")
put("targetIdFieldName", "targetStateIds")
put("searchIdFieldName", "se_stateIds")
put("searchLabelFieldName", "se_states")
}
})
node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.sunbird.common.dto.Request
import org.sunbird.graph.dac.model.{Node, SearchCriteria}
import org.sunbird.graph.{GraphService, OntologyEngineContext}

import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global

Expand Down Expand Up @@ -64,7 +64,7 @@ class TestChannelActor extends BaseSpec with MockFactory {
assert("failed".equals(response.getParams.getStatus))
}

ignore should "return success response for 'readChannel' operation" in {
it should "return success response for 'readChannel' operation" in {
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val graphDB = mock[GraphService]
(oec.graphService _).expects().returns(graphDB)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.sunbird.content.actors

import akka.actor.Props
import com.google.common.io.Resources
import org.scalamock.scalatest.MockFactory
import org.sunbird.cloudstore.StorageService
import org.sunbird.common.dto.{Property, Request, Response, ResponseHandler}
Expand All @@ -12,9 +11,9 @@ import org.sunbird.graph.utils.ScalaJsonUtils
import org.sunbird.graph.{GraphService, OntologyEngineContext}
import org.sunbird.kafka.client.KafkaClient

import java.io.File
import java.util
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

Expand Down Expand Up @@ -439,7 +438,7 @@ class TestContentActor extends BaseSpec with MockFactory {
assert(response.get("processId") != null)
}

it should "return success response for 'uploadContent' with jpeg asset" ignore {
/*it should "return success response for 'uploadContent' with jpeg asset" {
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val graphDB = mock[GraphService]
implicit val ss = mock[StorageService]
Expand All @@ -459,7 +458,7 @@ class TestContentActor extends BaseSpec with MockFactory {
val response = callActor(request, Props(new ContentActor()))
assert("successful".equals(response.getParams.getStatus))
}

*/
it should "return success response for 'systemUpdateContent'" in {
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val graphDB = mock[GraphService]
Expand Down Expand Up @@ -646,12 +645,12 @@ class TestContentActor extends BaseSpec with MockFactory {
assert("successful".equals(response.getParams.getStatus))
}

it should "return success response for 'publishContent' for youtube mimeType" in {
ignore should "return success response for 'publishContent' for youtube mimeType" in {
implicit val oec: OntologyEngineContext = mock[OntologyEngineContext]
val graphDB = mock[GraphService]
implicit val ss = mock[StorageService]
(oec.graphService _).expects().returns(graphDB).anyNumberOfTimes()
val node = getNodeForReview("do_123", "video/x-youtube", "LearningResource", "Content", "https://www.youtube.com/watch?v=EtYU11qNciQ&t=612s")
val node = getNodeForReview("do_123", "video/x-youtube", "LearningResource", "Content", "https://www.youtube.com/watch?v=GHmQ8euNwv8")
node.getMetadata.put("contentType", "Resource")
node.getMetadata.put("organisationBoardIds", new util.ArrayList[String](){{add("ncf_board_cbse")}})
(graphDB.getNodeByUniqueId(_: String, _: String, _: Boolean, _: Request)).expects(*, *, *, *).returns(Future(node)).anyNumberOfTimes()
Expand Down
Loading
Loading