Skip to content

Commit

Permalink
fixing the e2e tests:
Browse files Browse the repository at this point in the history
  • Loading branch information
soninaren committed Nov 6, 2020
1 parent d0edd98 commit ab075fa
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 96 deletions.
23 changes: 0 additions & 23 deletions FunctionsSdkE2ETests/.github/workflows/dotnetcore.yml

This file was deleted.

14 changes: 4 additions & 10 deletions FunctionsSdkE2ETests/FunctionsSdkE2ETests/E2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace FunctionsSdkE2ETests
{
public class E2ETests
{
private const string _expectedExtensionsJson = "{\"extensions\":[{ \"name\": \"Startup\", \"typeName\":\"SharedStartup.Startup, SharedStartup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\"}]}";
private const string _expectedExtensionsJson = "{\"extensions\":[{ \"name\": \"Startup\", \"typeName\":\"SharedStartup.Startup, SharedStartup, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null\"}]}";
private const string _expectedBinFolder = @"\bin";

private void CleanBinFolders(string rootDir)
Expand Down Expand Up @@ -177,12 +177,6 @@ public void Build_V2()
RunBasicValidation("V2");
}

[Fact]
public void Build_V3()
{
RunBasicValidation("V3");
}

private void RunBasicValidation(string solutionName)
{
string solutionFile = solutionName + ".sln";
Expand All @@ -205,7 +199,7 @@ private void RunBasicValidation(string solutionName)
t =>
{
return t["name"].ToString() == "Startup"
&& t["typeName"].ToString() == $"{solutionName}.Startup, {solutionName}, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
&& t["typeName"].ToString() == $"{solutionName}.Startup, {solutionName}, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null";
});

// The tests include one auto-created and one manually-created function.json file. The build should generate both into the output folder.
Expand Down Expand Up @@ -233,12 +227,12 @@ private void RunTest(string solutionName, int expectedExtensionsJsonCount = 1)

private bool ValidateSharedStartupExtension(JToken extensionToken)
{
return extensionToken["name"].ToString() == "Startup" && extensionToken["typeName"].ToString() == "SharedStartup.Startup, SharedStartup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
return extensionToken["name"].ToString() == "Startup" && extensionToken["typeName"].ToString() == "SharedStartup.Startup, SharedStartup, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null";
}

private bool ValidateDirectRefStartupExtension(JToken extensionToken)
{
return extensionToken["name"].ToString() == "DirectRefStartup" && extensionToken["typeName"].ToString() == "DirectRefEMG.DirectRefStartup, DirectRefEMG, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
return extensionToken["name"].ToString() == "DirectRefStartup" && extensionToken["typeName"].ToString() == "DirectRefEMG.DirectRefStartup, DirectRefEMG, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null";
}

private void ValidateExtensionsJsonRecursive(string startingDir, int expectedCount)
Expand Down
2 changes: 0 additions & 2 deletions FunctionsSdkE2ETests/SdkVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
<PropertyGroup>
<!-- These are the latest SDK versions -->
<MicrosoftNetSdkFunctionsV1Version>1.0.37</MicrosoftNetSdkFunctionsV1Version>
<MicrosoftNetSdkFunctionsV3Version>3.0.9</MicrosoftNetSdkFunctionsV3Version>

<!-- Some tests only roll EMG forward, so keep these one behind the latest -->
<MicrosoftNetSdkFunctionsV1PreviousVersion>1.0.37</MicrosoftNetSdkFunctionsV1PreviousVersion>
<MicrosoftNetSdkFunctionsV3PreviousVersion>3.0.8</MicrosoftNetSdkFunctionsV3PreviousVersion>

<!-- Some tests directly reference EMG; this should be latest -->
<ExtensionsMetadataGeneratorDirectReferenceVersion>1.2.0</ExtensionsMetadataGeneratorDirectReferenceVersion>
Expand Down
16 changes: 0 additions & 16 deletions FunctionsSdkE2ETests/V3/V3/Function1.cs

This file was deleted.

13 changes: 0 additions & 13 deletions FunctionsSdkE2ETests/V3/V3/Function2/function.json

This file was deleted.

14 changes: 0 additions & 14 deletions FunctionsSdkE2ETests/V3/V3/Startup.cs

This file was deleted.

11 changes: 0 additions & 11 deletions FunctionsSdkE2ETests/V3/V3/host.json

This file was deleted.

7 changes: 0 additions & 7 deletions FunctionsSdkE2ETests/V3/V3/local.settings.json

This file was deleted.

Binary file added FunctionsSdkE2ETests/msbuild.binlog
Binary file not shown.

0 comments on commit ab075fa

Please sign in to comment.