Skip to content

Commit 58659be

Browse files
authored
WiFi access point credentials no longer stored in git repository (#271)
***NO_CI***
1 parent d6a9d90 commit 58659be

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ There is a collection of postman tests `nanoFramework WebServer E2E Tests.postma
415415
- Set the `base_url` variable to match your device IP address
416416
- Choose request you want to test or run whole collection and check tests results.
417417

418+
The WebServerE2ETests project requires the name and credentials for the WiFi access point. That is stored in the WiFi.cs file that is not part of the git repository. Build the WebServerE2ETests to create a template for that file, then change the SSID and credentials. Your credentials will not be part of a commit.
419+
418420
## Feedback and documentation
419421

420422
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).

tests/WebServerE2ETests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
WiFi.cs

tests/WebServerE2ETests/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313

1414
namespace WebServerE2ETests
1515
{
16-
public class Program
16+
public partial class Program
1717
{
18-
private const string Ssid = "yourSSID";
19-
private const string Password = "YourPAssword";
2018
private static WebServer _server;
2119

2220
public static void Main()
File renamed without changes.

tests/WebServerE2ETests/WebServerE2ETests.nfproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<Compile Include="Program.cs" />
2323
<Compile Include="Properties\AssemblyInfo.cs" />
2424
<Compile Include="SimpleRouteController.cs" />
25+
<Compile Include="WiFi.cs" />
2526
</ItemGroup>
2627
<ItemGroup>
2728
<ProjectReference Include="..\..\nanoFramework.WebServer.FileSystem\nanoFramework.WebServer.FileSystem.nfproj" />
@@ -74,9 +75,9 @@
7475
</ProjectCapabilities>
7576
</ProjectExtensions>
7677
<Target Name="CopyWiFiTemplate" Condition="!Exists('$(MSBuildProjectDirectory)\WiFi.cs')" BeforeTargets="BeforeBuild">
77-
<ItemGroup>
78-
<WIFI_TEMPLATE Include="$(MSBuildProjectDirectory)\Template\WiFi.cs"/>
79-
</ItemGroup>
78+
<ItemGroup>
79+
<WIFI_TEMPLATE Include="$(MSBuildProjectDirectory)\Template\WiFi.cs" />
80+
</ItemGroup>
8081
<Copy SourceFiles="@(WIFI_TEMPLATE)" DestinationFolder="$(MSBuildProjectDirectory)" />
8182
</Target>
8283
</Project>

0 commit comments

Comments
 (0)