Skip to content
This repository was archived by the owner on Dec 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
78d829f
Moves facade tests against redis in int-tests
spygi Oct 12, 2021
3d369ae
More consistent casing and editorconfig settings
spygi Oct 12, 2021
4750c68
Fixes CI with new integration test project.
spygi Oct 12, 2021
a65105f
Moves ApiVersion to LoRaTools as it's shared.
spygi Oct 13, 2021
5252f5e
Uses agreed way to expose internals to tests.
spygi Oct 13, 2021
6a499d5
Removes whitespace diff.
spygi Oct 13, 2021
0cf77df
Moves integration tests to the newly created proj
spygi Oct 13, 2021
f6a6e86
Moves more integration tests to the int-test-proj.
spygi Oct 13, 2021
7f75847
Fixes yaml syntax.
spygi Oct 13, 2021
8dd2f3f
Fixes path.
spygi Oct 13, 2021
7e340e3
Merge remote-tracking branch 'origin/dev' into feature/506-integratio…
spygi Oct 13, 2021
1793b46
Merge remote-tracking branch 'origin/dev' into feature/506-integratio…
spygi Oct 13, 2021
b2587e3
Corrects casing of project.
spygi Oct 13, 2021
04c02ee
Merge remote-tracking branch 'origin/dev' into feature/506-integratio…
spygi Oct 14, 2021
3e8dab3
Merge remote-tracking branch 'origin/dev' into feature/473-rename-int…
spygi Oct 14, 2021
f3bb6bd
Merge remote-tracking branch 'origin/dev' into feature/506-integratio…
spygi Oct 15, 2021
bfc5662
Uses common versions for package references.
spygi Oct 15, 2021
0f95394
Fixes compliation errors.
spygi Oct 15, 2021
364b116
Renames tests to not include E2E in their names nor underscores. "Int…
spygi Oct 15, 2021
fe5ef81
Reuses variables.
spygi Oct 15, 2021
3c9acc8
Merge remote-tracking branch 'origin/dev' into feature/506-integratio…
spygi Oct 18, 2021
3d46e82
Ensures integration tests are covered in codecov
spygi Oct 18, 2021
f4296b0
Fixes dotnetdocker version.
spygi Oct 18, 2021
aeefde5
Fixes multiple issues with tests:
spygi Oct 18, 2021
6644bcc
Uses variable for package version.
spygi Oct 18, 2021
1af65fd
Bump Microsoft.Azure.EventHubs from 4.2.0 to 4.3.2 in /LoRaEngine (#555)
dependabot[bot] Oct 18, 2021
517ebf2
Fix path to "Directory.Build.props" in solution file (#559)
atifaziz Oct 18, 2021
a676a85
Merge branch 'dev' into feature/506-integration-tests
spygi Oct 18, 2021
6d5adca
Merge fixup.
spygi Oct 18, 2021
e96a72d
Skips test that fails on CI -> will be solved with #562
spygi Oct 18, 2021
13c3324
- more consinstent project guids
spygi Oct 18, 2021
59ec77b
Not required suppression
spygi Oct 19, 2021
df8c424
Adds issue tracking
spygi Oct 19, 2021
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
15 changes: 11 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ jobs:
- name: Build C# Samples/DecoderSample
run: dotnet build --configuration ${{ env.buildConfiguration }} Samples/DecoderSample

# Pull Redis Cache docker image
- name: Pulling Redis Cache image
run: docker pull redis:5.0.4-alpine

# Run unit tests
- name: Run unit tests
run: |
Expand All @@ -102,6 +98,17 @@ jobs:
- name: Upload to Codecov
uses: codecov/codecov-action@v2

# Pull Redis Cache docker image
- name: Pulling Redis Cache image
run: docker pull redis:5.0.4-alpine

# Run integration tests
- name: Run integration tests
Comment thread
bastbu marked this conversation as resolved.
run: |
dotnet test --configuration ${{ env.buildConfiguration }} --logger trx -r Tests/TestResults/Integration \
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura \
tests/Integration/LoRaWan.Tests.Integration.csproj

check_if_deploy:
needs:
- env_var
Expand Down
16 changes: 13 additions & 3 deletions LoRaEngine/LoRaEngine.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29025.244
Expand All @@ -17,9 +16,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Logger", "modules\LoRaWanNe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoRaWan.IntegrationTest", "test\LoRaWan.IntegrationTest\LoRaWan.IntegrationTest.csproj", "{26DF2637-43E0-4FFF-92BD-F4395C88DD50}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A3AF6806-947C-426F-8063-7229B71A4472}"
Comment thread
spygi marked this conversation as resolved.
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A3AF6806-947C-426F-8063-7229B71A4472}"
ProjectSection(SolutionItems) = preProject
test\.editorconfig = test\.editorconfig
..\Tests\.editorconfig = ..\Tests\.editorconfig
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoRaWanNetworkServer.Test", "test\LoRaWanNetworkServer.Test\LoRaWanNetworkServer.Test.csproj", "{D65BF8E2-DB42-4EA9-8A5E-CD7E671C4305}"
Expand All @@ -39,6 +38,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoRaWan.Tests.Shared", "..\Tests\Shared\LoRaWan.Tests.Shared.csproj", "{0A3CCF9E-46E8-4901-8C9A-BCFC0EBD213B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoRaWan.Tests.Integration", "..\Tests\Integration\LoRaWan.Tests.Integration.csproj", "{8F615E91-40E2-4BF4-8573-577CEC7701FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -143,6 +144,14 @@ Global
{0A3CCF9E-46E8-4901-8C9A-BCFC0EBD213B}.Release|Any CPU.Build.0 = Release|Any CPU
{0A3CCF9E-46E8-4901-8C9A-BCFC0EBD213B}.Release|x86.ActiveCfg = Release|Any CPU
{0A3CCF9E-46E8-4901-8C9A-BCFC0EBD213B}.Release|x86.Build.0 = Release|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Debug|x86.ActiveCfg = Debug|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Debug|x86.Build.0 = Debug|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Release|Any CPU.Build.0 = Release|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Release|x86.ActiveCfg = Release|Any CPU
{8F615E91-40E2-4BF4-8573-577CEC7701FF}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -155,6 +164,7 @@ Global
{0A3CCF9E-46E8-4901-8C9A-BCFC0EBD213B} = {A3AF6806-947C-426F-8063-7229B71A4472}
{4FA0718D-15A2-4D4E-9310-7FB17B285757} = {A3AF6806-947C-426F-8063-7229B71A4472}
{25916C24-E17B-4FB3-8E18-A386A18FC9D0} = {A3AF6806-947C-426F-8063-7229B71A4472}
{8F615E91-40E2-4BF4-8573-577CEC7701FF} = {A3AF6806-947C-426F-8063-7229B71A4472}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FD60E938-DB16-4486-8BEF-4F2CE460E71D}
Expand Down
2 changes: 1 addition & 1 deletion LoRaEngine/LoraKeysManagerFacade/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.CompilerServices;

// Lets test assembly access internal methods
[assembly: InternalsVisibleTo("LoraKeysManagerFacade.Test")]
[assembly: InternalsVisibleTo("LoRaWan.Tests.Integration")]
2 changes: 1 addition & 1 deletion LoRaEngine/LoraKeysManagerFacade/HttpUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace LoraKeysManagerFacade
{
using System.Linq;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
Expand All @@ -15,9 +15,6 @@
</ItemGroup>

<!-- Add shared files -->
<ItemGroup>
<Compile Include="../modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/ApiVersion.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
Expand All @@ -33,5 +30,4 @@
<ItemGroup>
<ProjectReference Include="..\modules\LoRaWanNetworkSrvModule\LoraTools\LoRaTools.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion LoRaEngine/LoraKeysManagerFacade/SearchDeviceByDevEUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace LoraKeysManagerFacade
{
using System.Collections.Generic;
using System.Threading.Tasks;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
Expand Down
2 changes: 1 addition & 1 deletion LoRaEngine/LoraKeysManagerFacade/VersionValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace LoraKeysManagerFacade
{
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;

public static class VersionValidator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.CompilerServices;

// Lets test assembly access internal methods
[assembly: InternalsVisibleTo("LoRaWanNetworkServer.Test")]
[assembly: InternalsVisibleTo("LoRaWan.Tests.Shared")]
[assembly: InternalsVisibleTo("LoRaWan.Tests.Integration")]
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace LoRaWan.Shared
{
using LoRaTools.CommonAPI;
using System;
using System.Linq;
using System.Net;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

namespace LoRaWan.NetworkServer
{
using LoRaTools.CommonAPI;
using LoRaWan.Shared;
using System;
using System.Net;
using System.Net.Http;
using LoRaWan.Shared;

/// <summary>
/// Default implementation for <see cref="IServiceFacadeHttpClientProvider"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace LoRaWan.NetworkServer
using System.Threading.Tasks;
using LoRaTools;
using LoRaTools.ADR;
using LoRaTools.CommonAPI;
using LoRaTools.LoRaPhysical;
using LoRaTools.Utils;
using LoRaWan.NetworkServer.ADR;
using LoRaWan.Shared;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Caching.Memory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace LoRaWan.Shared
namespace LoRaTools.CommonAPI
{
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\modules\LoRaWanNetworkSrvModule\LoRaWan.NetworkServer\ApiVersion.cs" Link="ApiVersion.cs" />
<Compile Include="..\..\modules\LoRaWanNetworkSrvModule\LoRaWan.NetworkServer\ServiceFacadeHttpClientHandler.cs" Link="ServiceFacadeHttpClientHandler.cs" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace LoRaWan.NetworkServer.Test
{
using System.Threading.Tasks;
using LoRaWan.Tests.Shared;
using Moq;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace LoRaWan.NetworkServer.Test
using System.Text;
using LoRaTools;
using LoRaWan.NetworkServer;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices.Client;
using Moq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace LoRaWan.NetworkServer.Test
using System.Collections.Generic;
using System.Threading.Tasks;
using LoRaTools.Regions;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Caching.Memory;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace LoRaWan.NetworkServer.Test
using System.Text;
using System.Threading.Tasks;
using LoRaWan.NetworkServer;
using LoRaWan.Tests.Shared;
using Newtonsoft.Json;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace LoRaWan.NetworkServer.Test
{
using System.Threading.Tasks;
using LoRaWan.NetworkServer;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices.Shared;
using Moq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace LoRaWan.NetworkServer.Test
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using LoRaTools.CommonAPI;
using LoRaWan.Shared;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace LoRaWan.NetworkServer.Test
{
using System.Threading.Tasks;
using LoRaWan.NetworkServer;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices.Shared;
using Moq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace LoraKeysManagerFacade.Test
using System.Threading.Tasks;
using LoraKeysManagerFacade.FunctionBundler;
using LoRaTools.ADR;
using LoRaWan.Tests.Shared;
using Moq;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LoraKeysManagerFacade.Test
using System.Collections.Generic;
using System.Threading.Tasks;
using LoraKeysManagerFacade.FunctionBundler;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace LoraKeysManagerFacade.Test
using System.Linq;
using System.Threading.Tasks;
using LoraKeysManagerFacade.FunctionBundler;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace LoraKeysManagerFacade.Test
using System;
using System.Collections.Generic;
using System.Text;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Shared;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace LoraKeysManagerFacade.Test
{
using LoRaWan.Tests.Shared;
using System.Threading.Tasks;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace LoraKeysManagerFacade.Test
using LoraKeysManagerFacade.FunctionBundler;
using LoRaTools.ADR;
using LoRaTools.CommonAPI;
using LoRaWan.Tests.Shared;
using Microsoft.Extensions.Logging.Abstractions;
using Moq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace LoraKeysManagerFacade.Test
{
using System.Collections.Generic;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.Extensions.Primitives;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace LoraKeysManagerFacade.Test
{
using System.Threading.Tasks;
using LoraKeysManagerFacade.FunctionBundler;
using LoRaWan.Tests.Shared;
using Xunit;

public class MessageDeduplicationTests : FunctionTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LoraKeysManagerFacade.Test
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using LoRaWan.Shared;
using LoRaTools.CommonAPI;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace LoRaWan.NetworkServer.Test
namespace LoRaWan.Tests.Integration
{
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using LoRaWan.NetworkServer;
using LoRaWan.Tests.Shared;
using Microsoft.Azure.Devices.Client;
using Moq;
using Xunit;

public class DeduplicationStrategy_End2End_Tests : MessageProcessorMultipleGatewayTest
public class DeduplicationStrategyTests : MessageProcessorMultipleGatewayTest
{
private readonly DeduplicationStrategyFactory factory;
private readonly Mock<ILoRaDeviceClient> loRaDeviceClient;

public DeduplicationStrategy_End2End_Tests()
public DeduplicationStrategyTests()
{
this.factory = new DeduplicationStrategyFactory(this.LoRaDeviceApi.Object);
this.loRaDeviceClient = new Mock<ILoRaDeviceClient>(MockBehavior.Strict);
Expand Down
Loading