Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi access point credentials no longer stored in git repository #271

Merged
merged 3 commits into from
Oct 7, 2024
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ There is a collection of postman tests `nanoFramework WebServer E2E Tests.postma
- Set the `base_url` variable to match your device IP address
- Choose request you want to test or run whole collection and check tests results.

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.

## Feedback and documentation

For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
Expand Down
1 change: 1 addition & 0 deletions tests/WebServerE2ETests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WiFi.cs
4 changes: 1 addition & 3 deletions tests/WebServerE2ETests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@

namespace WebServerE2ETests
{
public class Program
public partial class Program
{
private const string Ssid = "yourSSID";
private const string Password = "YourPAssword";
private static WebServer _server;

public static void Main()
Expand Down
7 changes: 4 additions & 3 deletions tests/WebServerE2ETests/WebServerE2ETests.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SimpleRouteController.cs" />
<Compile Include="WiFi.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\nanoFramework.WebServer.FileSystem\nanoFramework.WebServer.FileSystem.nfproj" />
Expand Down Expand Up @@ -74,9 +75,9 @@
</ProjectCapabilities>
</ProjectExtensions>
<Target Name="CopyWiFiTemplate" Condition="!Exists('$(MSBuildProjectDirectory)\WiFi.cs')" BeforeTargets="BeforeBuild">
<ItemGroup>
<WIFI_TEMPLATE Include="$(MSBuildProjectDirectory)\Template\WiFi.cs"/>
</ItemGroup>
<ItemGroup>
<WIFI_TEMPLATE Include="$(MSBuildProjectDirectory)\Template\WiFi.cs" />
</ItemGroup>
<Copy SourceFiles="@(WIFI_TEMPLATE)" DestinationFolder="$(MSBuildProjectDirectory)" />
</Target>
</Project>