-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing aggregation queries as well, quality-of-life fix for skipping …
…GH only unit tests
- Loading branch information
1 parent
ec86ff5
commit 2ee3743
Showing
5 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
namespace Redis.OM.Unit.Tests; | ||
|
||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] | ||
public class SkipIfMissingEnvVarAttribute : FactAttribute | ||
{ | ||
private readonly string[] _envVars; | ||
|
||
public SkipIfMissingEnvVarAttribute(params string[] envVars) | ||
{ | ||
_envVars = envVars; | ||
} | ||
|
||
public override string Skip | ||
{ | ||
get | ||
{ | ||
var missingEnvVars = _envVars.Where(x => Environment.GetEnvironmentVariable(x) == null); | ||
return $"Skipping because the following environment variables were missing: {string.Join(",", _envVars)}"; | ||
} | ||
} | ||
} |