Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Make tests pass when PR submitted by an external contributor #1690

Merged
merged 1 commit into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion src/GitHub.Exports/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
[assembly: AssemblyTitle("GitHub.Exports")]
[assembly: AssemblyDescription("GitHub interfaces for mef exports")]
[assembly: Guid("9aea02db-02b5-409c-b0ca-115d05331a6b")]
[assembly: InternalsVisibleTo("MetricsTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1a49bb6a01873a4e5434cbaa9993f5a75d3ba66fecfff4d85066c7094913d43f6f9bb706d2eb65f4990a7adfe7321e120ba8be5a8367fc5551c0a6eeb4850c5646377d314142abe69a5fb8ec0957a63ba5893901adb5b4cf0eb7f7e5861376e0cb4fd975576094b2fb4843df9c186eb17232365291b93e17f5e2b6cc1cda2c2")]
3 changes: 2 additions & 1 deletion src/GitHub.Exports/Services/MetricsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,15 @@ public Task SendOptIn()
*/
}

internal static StringContent SerializeRequest(UsageModel model)
public static StringContent SerializeRequest(UsageModel model)
{
var serializer = new SimpleJsonSerializer();
var dictionary = new Dictionary<string, object>
{
{ToJsonPropertyName("Dimensions"), ToModelDictionary(model.Dimensions) },
{ToJsonPropertyName("Measures"), ToModelDictionary(model.Measures) }
};

return new StringContent(serializer.Serialize(dictionary), Encoding.UTF8, "application/json");
}

Expand Down
13 changes: 3 additions & 10 deletions test/MetricsTests/MetricsServer/MetricsServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Nancy, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -75,7 +76,6 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="key.snk" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand All @@ -85,13 +85,6 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\packages\StrongNamer.0.0.6\build\StrongNamer.targets" Condition="Exists('..\..\..\packages\StrongNamer.0.0.6\build\StrongNamer.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\StrongNamer.0.0.6\build\StrongNamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\StrongNamer.0.0.6\build\StrongNamer.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Binary file removed test/MetricsTests/MetricsServer/key.snk
Binary file not shown.
1 change: 0 additions & 1 deletion test/MetricsTests/MetricsServer/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
<packages>
<package id="Nancy" version="1.4.1" targetFramework="net461" />
<package id="Nancy.Hosting.Self" version="1.4.1" targetFramework="net461" />
<package id="StrongNamer" version="0.0.6" targetFramework="net461" />
</packages>
6 changes: 3 additions & 3 deletions test/MetricsTests/MetricsTests/MetricsTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
Expand All @@ -69,7 +70,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="key.snk" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down
Binary file removed test/MetricsTests/MetricsTests/key.snk
Binary file not shown.