diff --git a/Dockerfile b/Dockerfile index 5645c5f..97a1c21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,13 @@ RUN dotnet restore COPY . ./ +RUN apt-get update && apt-get install -y libcap2-bin libsnappy1v5 && \ + ln -s /lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so && \ + ln -s /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc.so && \ + rm -rf /var/lib/apt/lists/* + +RUN dotnet test Hexastore.Test + # Copy everything else and build RUN dotnet publish -c Release ./Hexastore.Web -o /app/out diff --git a/Hexastore.Test/Hexastore.Test.csproj b/Hexastore.Test/Hexastore.Test.csproj index 09d1963..02d030a 100644 --- a/Hexastore.Test/Hexastore.Test.csproj +++ b/Hexastore.Test/Hexastore.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + netcoreapp2.2 false diff --git a/Hexastore.Test/StoreProcessorTest.cs b/Hexastore.Test/StoreProcessorTest.cs index 754e666..1688984 100644 --- a/Hexastore.Test/StoreProcessorTest.cs +++ b/Hexastore.Test/StoreProcessorTest.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Text.Json.Serialization; using Hexastore.Parser; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; @@ -133,7 +132,7 @@ public void Json_Read_Write_Relationship_Returns() } [TestMethod] - public void Patch_Returns_With_Relationship() + public void Patch_With_Relationship_Returns() { var patch = new { @@ -173,7 +172,7 @@ public void Patch_Returns_With_Relationship() } [TestMethod] - public void Patch_Returns_With_Values() + public void Patch_With_Values_Returns() { var doc = new { diff --git a/Hexastore/Query/ObjectQueryModel.cs b/Hexastore/Query/ObjectQueryModel.cs index 034a150..fefba64 100644 --- a/Hexastore/Query/ObjectQueryModel.cs +++ b/Hexastore/Query/ObjectQueryModel.cs @@ -56,6 +56,11 @@ public override bool Equals(object obj) } return t.S.Equals(S) && t.P.Equals(P) && t.O.CompareTo(O) == 0 && t.IsId == IsId; } + + public override int GetHashCode() + { + return (S + P + O + IsId.ToString()).GetHashCode(); + } } public class QueryUnit