Skip to content

Commit cd43b22

Browse files
committed
added EndToEnd test for free license
1 parent a69afc6 commit cd43b22

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.IO;
3+
using System.Threading.Tasks;
4+
using Seq.Api;
5+
using SeqCli.EndToEnd.Support;
6+
using Serilog;
7+
using Xunit;
8+
9+
namespace SeqCli.EndToEnd.License;
10+
11+
public class LicenseShowTestCase : ICliTestCase
12+
{
13+
readonly TestDataFolder _testDataFolder;
14+
15+
public LicenseShowTestCase(TestDataFolder testDataFolder)
16+
{
17+
_testDataFolder = testDataFolder;
18+
}
19+
20+
public Task ExecuteAsync(SeqConnection connection, ILogger logger, CliCommandRunner runner)
21+
{
22+
23+
// test empty text output if no license is applied
24+
runner.Exec("license show");
25+
Assert.Equal(
26+
"",
27+
runner.LastRunProcess.Output.Trim());
28+
29+
// test json output if no license is applied
30+
runner.Exec("license show --json");
31+
Assert.Contains(
32+
"You're using the free Individual license.",
33+
runner.LastRunProcess.Output.Trim());
34+
return Task.CompletedTask;
35+
}
36+
}

0 commit comments

Comments
 (0)