-
-
Notifications
You must be signed in to change notification settings - Fork 287
/
IgnoreFileFixture.cs
43 lines (42 loc) · 2.32 KB
/
IgnoreFileFixture.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace DotNet.Testcontainers.Tests.Fixtures
{
using DotNet.Testcontainers.Configurations;
using DotNet.Testcontainers.Images;
using Xunit;
public sealed class IgnoreFileFixture : TheoryData<IgnoreFile, string, bool>
{
public IgnoreFileFixture()
{
var logger = TestcontainersSettings.Logger;
var ignoreDirectory = new IgnoreFile(new[] { "bin/", "obj/" }, logger);
var ignoreNonRecursiveFiles = new IgnoreFile(new[] { "*/temp*" }, logger);
var ignoreNonRecursiveNestedFiles = new IgnoreFile(new[] { "*/*/temp*" }, logger);
var ignoreRecursiveFiles = new IgnoreFile(new[] { "**/*.txt" }, logger);
var ignoreSingleCharacterFiles = new IgnoreFile(new[] { "temp?" }, logger);
var ignoreExceptionFiles = new IgnoreFile(new[] { "*.md", "!README*.md", "README-secret.md" }, logger);
this.Add(ignoreDirectory, "Testcontainers.sln", true);
this.Add(ignoreDirectory, "bin/Debug/net6.0", false);
this.Add(ignoreDirectory, "obj/Debug/net6.0", false);
this.Add(ignoreNonRecursiveFiles, "lipsum/temp", false);
this.Add(ignoreNonRecursiveFiles, "lipsum/temp.txt", false);
this.Add(ignoreNonRecursiveFiles, "lipsum/lorem/temp", true);
this.Add(ignoreNonRecursiveNestedFiles, "lipsum/lorem/temp", false);
this.Add(ignoreNonRecursiveNestedFiles, "lipsum/lorem/temp.txt", false);
this.Add(ignoreNonRecursiveNestedFiles, "lipsum/temp", true);
this.Add(ignoreNonRecursiveNestedFiles, "lipsum/lorem/lipsum/temp", true);
this.Add(ignoreRecursiveFiles, "lipsum.txt", false);
this.Add(ignoreRecursiveFiles, "lorem/lipsum/lorem/lipsum.txt", false);
this.Add(ignoreRecursiveFiles, "lorem/lipsum/lorem.txt", false);
this.Add(ignoreRecursiveFiles, "lorem/lipsum.txt", false);
this.Add(ignoreRecursiveFiles, "lorem/lipsum/lipsum.config", true);
this.Add(ignoreRecursiveFiles, "lorem/lipsum.config", true);
this.Add(ignoreSingleCharacterFiles, "temp", false);
this.Add(ignoreSingleCharacterFiles, "temp1", false);
this.Add(ignoreSingleCharacterFiles, "temp12", true);
this.Add(ignoreSingleCharacterFiles, "lipsum/temp", true);
this.Add(ignoreExceptionFiles, "CODE_OF_CONDUCT.md", false);
this.Add(ignoreExceptionFiles, "README-secret.md", false);
this.Add(ignoreExceptionFiles, "README.md", true);
}
}
}