Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
51ef3ec656 | |||
35a3618a42 | |||
aa59725176 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -47,7 +47,6 @@ dlldata.c
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
|
26
BTCPayServer.Tests/README.md
Normal file
26
BTCPayServer.Tests/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# How to run the tests
|
||||
|
||||
The tests depends on having a proper environment running with Postgres, Bitcoind, NBxplorer configured.
|
||||
You can however use the `docker-compose.yml` of this folder to get it running.
|
||||
|
||||
```
|
||||
docker-compose up nbxplorer
|
||||
```
|
||||
|
||||
You can run the tests while it is running through your favorite IDE, or with
|
||||
|
||||
```
|
||||
dotnet test
|
||||
```
|
||||
|
||||
Once you want to stop
|
||||
|
||||
```
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
You can run the tests inside a container by running
|
||||
|
||||
```
|
||||
docker-compose run --rm tests
|
||||
```
|
@ -45,7 +45,7 @@ namespace BTCPayServer.Tests
|
||||
|
||||
await store.UpdateStore(StoreId, new StoreViewModel()
|
||||
{
|
||||
ExtPubKey = extKey.Neuter().ToString(),
|
||||
ExtPubKey = extKey.Neuter().ToString() + "-[legacy]",
|
||||
SpeedPolicy = SpeedPolicy.MediumSpeed
|
||||
});
|
||||
Assert.IsType<ViewResult>(await store.RequestPairing(pairingCode.ToString()));
|
||||
|
@ -14,7 +14,7 @@ services:
|
||||
- nbxplorer
|
||||
|
||||
nbxplorer:
|
||||
image: nicolasdorier/nbxplorer:1.0.0.12
|
||||
image: nicolasdorier/nbxplorer:1.0.0.14
|
||||
ports:
|
||||
- "32838:32838"
|
||||
expose:
|
||||
|
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<Version>1.0.0.3</Version>
|
||||
<Version>1.0.0.4</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="Build\dockerfiles\**" />
|
||||
@ -24,7 +24,7 @@
|
||||
<PackageReference Include="NBitcoin" Version="4.0.0.38" />
|
||||
<PackageReference Include="NBitpayClient" Version="1.0.0.9" />
|
||||
<PackageReference Include="DBreeze" Version="1.87.0" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.12" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.14" />
|
||||
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.1" />
|
||||
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.2" />
|
||||
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.13" />
|
||||
|
@ -52,10 +52,6 @@ namespace BTCPayServer
|
||||
.Build();
|
||||
host.StartAsync().GetAwaiter().GetResult();
|
||||
var urls = host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
|
||||
if(urls.Count != 0)
|
||||
{
|
||||
OpenBrowser(urls.Select(url => url.Replace("0.0.0.0", "127.0.0.1")).First());
|
||||
}
|
||||
foreach(var url in urls)
|
||||
{
|
||||
logger.LogInformation("Listening on " + url);
|
||||
@ -79,29 +75,5 @@ namespace BTCPayServer
|
||||
loggerProvider.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenBrowser(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
Process.Start(new ProcessStartInfo("cmd", $"/c start {url}")); // Works ok on windows
|
||||
}
|
||||
else if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
Process.Start("xdg-open", url); // Works ok on linux
|
||||
}
|
||||
else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
Process.Start("open", url); // Not tested
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
BTCPayServer/Properties/launchSettings.json
Normal file
23
BTCPayServer/Properties/launchSettings.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:14139/",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"Docker-Regtest": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"BTCPAY_EXPLORERURL": "http://127.0.0.1:32838/",
|
||||
"BTCPAY_NETWORK": "regtest",
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"BTCPAY_POSTGRES": "User ID=postgres;Host=127.0.0.1;Port=39372;Database=btcpayserver"
|
||||
},
|
||||
"applicationUrl": "http://localhost:14142/"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user