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

fix(core): exclude content of values from names checks (4.6.2) #1038

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

bobeal
Copy link
Member

@bobeal bobeal commented Nov 5, 2023

No description provided.

@bobeal bobeal self-assigned this Nov 5, 2023
@github-actions github-actions bot added the fix Something isn't working label Nov 5, 2023
@bobeal bobeal added core Relates to core API fix Something isn't working and removed fix Something isn't working labels Nov 5, 2023
Copy link
Contributor

github-actions bot commented Nov 5, 2023

Test Results

  54 files  ±0    54 suites  ±0   2m 8s ⏱️ +6s
857 tests +1  857 ✔️ +1  0 💤 ±0  0 ±0 
896 runs  +1  896 ✔️ +1  0 💤 ±0  0 ±0 

Results for commit 66b3332. ± Comparison against base commit 0c1248b.

This pull request removes 92 and adds 16 tests. Note that renamed tests count towards both.

               "2020-03-25T08:33:17.965206Z"
               "urn:ngsi-ld:Beekeeper:1234",
               20,
               25,
            "instanceId":"urn:ngsi-ld:Instance:45678",
            "instanceId":"urn:ngsi-ld:In…
            "observedAt":"2020-03-25T08:33:17.965206Z",
            "sub": "sub"
            "type":"Property",
…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [10] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=71d44682-d5be-4455-bd7e-8b0e997693a2, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=null, createdAt=2023-11-05T10:00:22.679244797Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=d776918d-763a-4787-bae5-f41b42a53512, value=Beehive_incoming_123, time=2020-03-25T08:29:17.965206Z), SimplifiedAttributeInstanceRe…, withTemporalValues=true, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : {
    "type" : "Property",
    "values" : [ ["Beehive_incoming_123","2020-03-25T08:29:17.965206Z"], ["Beehive_incoming_124","2020-03-25T08:33:17.965206Z"] ]
  }
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [11] scopeHistory=[SimplifiedScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/A/B, /C/D], time=2020-03-25T08:29:17.965206Z), SimplifiedScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/C/D], time=2020-03-25T09:29:17.965206Z)], attributeAndResultsMap={}, withTemporalValues=true, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "scope" : {
    "type" : "Property",
    "values" : [ [["/A/B", "/C/D"],"2020-03-25T08:29:17.965206Z"], [["/C/D"],"2020-03-25T09:29:17.965206Z"] ]
  }
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [12] scopeHistory=[FullScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/A/B, /C/D], time=2020-03-25T08:29:17.965206Z, timeproperty=modifiedAt, sub=null), FullScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/C/D], time=2020-03-25T09:29:17.965206Z, timeproperty=modifiedAt, sub=null)], attributeAndResultsMap={}, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "scope" : [{
    "type": "Property",
    "value": ["/A/B", "/C/D"],
    "modifiedAt": "2020-03-25T08:29:17.965206Z"
  }, {
    "type": "Property",
    "value": ["/C/D"],
    "modifiedAt": "2020-03-25T09:29:17.965206Z"
  }]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [1] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2023-11-05T10:00:22.605792623Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=b5d0ccc4-a354-4ab3-ba82-985765f1ced2,…, withTemporalValues=false, withAudit=true, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming":[
         {
            "type":"Property",
            "value":20,
            "instanceId":"urn:ngsi-ld:Instance:45678",
            "observedAt":"2020-03-25T08:33:17.965206Z",
            "sub": "sub"
         }
      ]
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TESTD",
      "type":"BeeHive",
      "outgoing":[
         {
            "type":"Property",
            "value":25,
            "instanceId":"urn:ngsi-ld:In…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [1] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=b93a2c61-5e99-4956-89ae-194a8a146b90, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=NUMBER, datasetId=null, createdAt=2023-11-05T10:00:22.679244797Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=af747b9d-ea6d-4627-bcd2-88e318706892, payload={"type":"Property","instanceId":"urn:ngsi-ld:Instance:45678","observedAt":"2020-03-25T08:2…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "value" : 550.0,
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "value" : 650.0,
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [2] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2023-11-05T10:00:22.605792623Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=f003eced-dc2b-4727-8573-210abaa8445e,…, withTemporalValues=true, withAudit=false, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming": {
         "type":"Property",
         "values":[
            [
               20,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TESTD",
      "type":"BeeHive",
      "outgoing": {
         "type":"Property",
         "values":[
            [
               25,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   }
]

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [2] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=907a2d1a-2968-4b60-ad36-848c95b8a983, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Relationship, attributeValueType=STRING, datasetId=null, createdAt=2023-11-05T10:00:22.679244797Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=aec40ea4-8a2a-40fa-bf98-0a2deb4c9ba0, payload={"type":"Relationship","instanceId":"urn:ngsi-ld:Instance:45678","observedAt":"2020-03…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Relationship",
    "object" : "urn:ngsi-ld:Entity:1234",
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Relationship",
    "object" : "urn:ngsi-ld:Entity:5678",
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [3] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2023-11-05T10:00:22.605792623Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=78ca3a43-46c2-4856-b861-c7eb65b72c67,…, withTemporalValues=true, withAudit=false, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming": {
         "type":"Property",
         "values":[
            [
               20,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      },
      "managedBy": {
         "type": "Relationship",
         "objects": [
            [
               "urn:ngsi-ld:Beekeeper:1234",
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TEST…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [3] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=56320943-98e5-4bb9-8935-62bd11163462, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=NUMBER, datasetId=urn:ngsi-ld:Dataset:01234, createdAt=2023-11-05T10:00:22.679244797Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=c6479f9c-b462-496a-b240-230729b36ade, payload={"type":"Property","datasetId":"urn:ngsi-ld:Dataset:01234","instanceI…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:01234",
    "value" : 550.0,
    "instanceId" : "urn:ngsi-ld:Instance:01234",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:01234",
    "value" : 650.0,
    "instanceId" : "urn:ngsi-ld:Instance:01235",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  }, {
    "type" : "Property",
    "data…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [4] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=470c2df0-a694-451b-8d54-8d7c59349ecf, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=urn:ngsi-ld:Dataset:45678, createdAt=2023-11-05T10:00:22.679244797Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=5e896b54-3d22-47c2-83ae-9f5e6fd51705, payload={"type":"Property","datasetId":"urn:ngsi-ld:Dataset:45678","instanceI…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_123",
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_124",
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

…

♻️ This comment has been updated with latest results.

Copy link

sonarqubecloud bot commented Nov 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@bobeal bobeal merged commit d43c28e into develop Nov 5, 2023
10 checks passed
@bobeal bobeal deleted the fix/1027-exclude-value-content-from-name-checks branch November 5, 2023 16:23
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core Relates to core API fix Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Issue with @ character in DateTime data types (@type and @value are refused)
1 participant