Skip to content

Commit 8b9ae3d

Browse files
committed
fix tests to include in integration pipeline
1 parent 8735e3f commit 8b9ae3d

26 files changed

+416
-136
lines changed

tests/Doc/Bf_tutorial.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@ namespace Doc;
1313
// REMOVE_END
1414

1515
// HIDE_START
16-
public class Bf_tutorial : AbstractNRedisStackTest, IDisposable
16+
public class Bf_tutorial
17+
// REMOVE_START
18+
: AbstractNRedisStackTest, IDisposable
19+
// REMOVE_END
1720
{
21+
// REMOVE_START
1822
public Bf_tutorial(EndpointsFixture fixture) : base(fixture) { }
1923

20-
[SkippableTheory]
21-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
22-
public void run(string endpointId)
24+
[SkippableFact]
25+
// REMOVE_END
26+
public void run()
2327
{
24-
var db = GetCleanDatabase(endpointId);
28+
//REMOVE_START
29+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
30+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
31+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
32+
//REMOVE_END
33+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
34+
var db = muxer.GetDatabase();
2535
//REMOVE_START
2636
// Clear any keys here before using them in tests.
2737
db.KeyDelete("bikes:models");

tests/Doc/Bitmap_tutorial.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@ namespace Doc;
1212
// REMOVE_END
1313

1414
// HIDE_START
15-
public class Bitmap_tutorial : AbstractNRedisStackTest, IDisposable
15+
public class Bitmap_tutorial
16+
// REMOVE_START
17+
: AbstractNRedisStackTest, IDisposable
18+
// REMOVE_END
1619
{
20+
// REMOVE_START
21+
1722
public Bitmap_tutorial(EndpointsFixture fixture) : base(fixture) { }
1823

19-
[SkippableTheory]
20-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
21-
public void run(string endpointId)
24+
[SkippableFact]
25+
// REMOVE_END
26+
public void run()
2227
{
23-
var db = GetCleanDatabase(endpointId);
28+
//REMOVE_START
29+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
30+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
31+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
32+
//REMOVE_END
33+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
34+
var db = muxer.GetDatabase();
2435
//REMOVE_START
2536
// Clear any keys here before using them in tests.
2637
db.KeyDelete("pings:2024-01-01-00:00");

tests/Doc/CmdsGenericExample.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,29 @@ namespace Doc;
1212
// REMOVE_END
1313

1414
// HIDE_START
15-
public class CmdsGenericExample : AbstractNRedisStackTest, IDisposable
15+
public class CmdsGenericExample
16+
// REMOVE_START
17+
: AbstractNRedisStackTest, IDisposable
18+
// REMOVE_END
1619
{
20+
// REMOVE_START
21+
1722
public CmdsGenericExample(EndpointsFixture fixture) : base(fixture) { }
1823

1924

2025
[SkipIfRedis(Comparison.LessThan, "7.0.0")]
2126
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
2227

23-
public void run(string endpointId)
28+
// REMOVE_END
29+
public void run()
2430
{
25-
var db = GetCleanDatabase(endpointId);
31+
//REMOVE_START
32+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
33+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
34+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
35+
//REMOVE_END
36+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
37+
var db = muxer.GetDatabase();
2638
//REMOVE_START
2739
// Clear any keys here before using them in tests.
2840

tests/Doc/CmdsHashExample.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,26 @@ namespace Doc;
1010
// REMOVE_END
1111

1212
// HIDE_START
13-
public class CmdsHashExample : AbstractNRedisStackTest, IDisposable
13+
public class CmdsHashExample
14+
// REMOVE_START
15+
: AbstractNRedisStackTest, IDisposable
16+
// REMOVE_END
1417
{
18+
// REMOVE_START
19+
1520
public CmdsHashExample(EndpointsFixture fixture) : base(fixture) { }
1621

17-
[SkippableTheory]
18-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
19-
public void run(string endpointId)
22+
[SkippableFact]
23+
// REMOVE_END
24+
public void run()
2025
{
21-
var db = GetCleanDatabase(endpointId);
26+
//REMOVE_START
27+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
28+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
29+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
30+
//REMOVE_END
31+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
32+
var db = muxer.GetDatabase();
2233
//REMOVE_START
2334
// Clear any keys here before using them in tests.
2435
db.KeyDelete("myhash");

tests/Doc/CmdsSortedSetExamples.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@ namespace Doc;
1212
// REMOVE_END
1313

1414
// HIDE_START
15-
public class CmdsSortedSet : AbstractNRedisStackTest, IDisposable
15+
public class CmdsSortedSet
16+
// REMOVE_START
17+
: AbstractNRedisStackTest, IDisposable
18+
// REMOVE_END
1619
{
20+
// REMOVE_START
21+
1722
public CmdsSortedSet(EndpointsFixture fixture) : base(fixture) { }
1823

19-
[SkippableTheory]
20-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
21-
public void run(string endpointId)
24+
[SkippableFact]
25+
// REMOVE_END
26+
public void run()
2227
{
23-
var db = GetCleanDatabase(endpointId);
28+
//REMOVE_START
29+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
30+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
31+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
32+
//REMOVE_END
33+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
34+
var db = muxer.GetDatabase();
2435
//REMOVE_START
2536
// Clear any keys here before using them in tests.
2637

tests/Doc/CmdsStringExample.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@ namespace Doc;
1212
// REMOVE_END
1313

1414
// HIDE_START
15-
public class CmdsStringExample : AbstractNRedisStackTest, IDisposable
15+
public class CmdsStringExample
16+
// REMOVE_START
17+
: AbstractNRedisStackTest, IDisposable
18+
// REMOVE_END
1619
{
20+
// REMOVE_START
21+
1722
public CmdsStringExample(EndpointsFixture fixture) : base(fixture) { }
1823

19-
[SkippableTheory]
20-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
21-
public void run(string endpointId)
24+
[SkippableFact]
25+
// REMOVE_END
26+
public void run()
2227
{
23-
var db = GetCleanDatabase(endpointId);
28+
//REMOVE_START
29+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
30+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
31+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
32+
//REMOVE_END
33+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
34+
var db = muxer.GetDatabase();
2435
//REMOVE_START
2536
// Clear any keys here before using them in tests.
2637

tests/Doc/Cms_tutorial.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,26 @@ namespace Doc;
1414
// REMOVE_END
1515

1616
// HIDE_START
17-
public class Cms_tutorial : AbstractNRedisStackTest, IDisposable
17+
public class Cms_tutorial
18+
// REMOVE_START
19+
: AbstractNRedisStackTest, IDisposable
20+
// REMOVE_END
1821
{
22+
// REMOVE_START
23+
1924
public Cms_tutorial(EndpointsFixture fixture) : base(fixture) { }
2025

21-
[SkippableTheory]
22-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
23-
public void run(string endpointId)
26+
[SkippableFact]
27+
// REMOVE_END
28+
public void run()
2429
{
25-
var db = GetCleanDatabase(endpointId);
30+
//REMOVE_START
31+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
32+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
33+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
34+
//REMOVE_END
35+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
36+
var db = muxer.GetDatabase();
2637
//REMOVE_START
2738
// Clear any keys here before using them in tests.
2839
db.KeyDelete("bikes:profit");

tests/Doc/Cuckoo_tutorial.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,26 @@ namespace Doc;
1313
// REMOVE_END
1414

1515
// HIDE_START
16-
public class Cuckoo_tutorial : AbstractNRedisStackTest, IDisposable
16+
public class Cuckoo_tutorial
17+
// REMOVE_START
18+
: AbstractNRedisStackTest, IDisposable
19+
// REMOVE_END
1720
{
21+
// REMOVE_START
22+
1823
public Cuckoo_tutorial(EndpointsFixture fixture) : base(fixture) { }
1924

20-
[SkippableTheory]
21-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
22-
public void run(string endpointId)
25+
[SkippableFact]
26+
// REMOVE_END
27+
public void run()
2328
{
24-
var db = GetCleanDatabase(endpointId);
29+
//REMOVE_START
30+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
31+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
32+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
33+
//REMOVE_END
34+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
35+
var db = muxer.GetDatabase();
2536
//REMOVE_START
2637
// Clear any keys here before using them in tests.
2738
db.KeyDelete("bikes:models");

tests/Doc/Geo_tutorial.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@ namespace Doc;
1212
// REMOVE_END
1313

1414
// HIDE_START
15-
public class Geo_tutorial : AbstractNRedisStackTest, IDisposable
15+
public class Geo_tutorial
16+
// REMOVE_START
17+
: AbstractNRedisStackTest, IDisposable
18+
// REMOVE_END
1619
{
20+
// REMOVE_START
21+
1722
public Geo_tutorial(EndpointsFixture fixture) : base(fixture) { }
1823

19-
[SkippableTheory]
20-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
21-
public void run(string endpointId)
24+
[SkippableFact]
25+
// REMOVE_END
26+
public void run()
2227
{
23-
var db = GetCleanDatabase(endpointId);
28+
//REMOVE_START
29+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
30+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
31+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
32+
//REMOVE_END
33+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
34+
var db = muxer.GetDatabase();
2435
//REMOVE_START
2536
// Clear any keys here before using them in tests.
2637
db.KeyDelete("bikes:rentable");

tests/Doc/HashExample.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,26 @@
88
namespace Doc;
99
[Collection("DocsTests")]
1010
//REMOVE_END
11-
public class HashExample : AbstractNRedisStackTest, IDisposable
11+
public class HashExample
12+
// REMOVE_START
13+
: AbstractNRedisStackTest, IDisposable
14+
// REMOVE_END
1215
{
16+
// REMOVE_START
17+
1318
public HashExample(EndpointsFixture fixture) : base(fixture) { }
1419

15-
[SkippableTheory]
16-
[MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))]
17-
public void run(string endpointId)
20+
[SkippableFact]
21+
// REMOVE_END
22+
public void run()
1823
{
19-
var db = GetCleanDatabase(endpointId);
24+
//REMOVE_START
25+
// This is needed because we're constructing ConfigurationOptions in the test before calling GetConnection
26+
SkipIfTargetConnectionDoesNotExist(EndpointsFixture.Env.Standalone);
27+
var db_ = GetCleanDatabase(EndpointsFixture.Env.Standalone);
28+
//REMOVE_END
29+
var muxer = ConnectionMultiplexer.Connect("localhost:6379");
30+
var db = muxer.GetDatabase();
2031
db.KeyDelete("bike:1");
2132
//HIDE_END
2233
//STEP_START set_get_all

0 commit comments

Comments
 (0)