Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel0024 committed Jul 8, 2024
1 parent 63c1837 commit e1534d5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: dotnet build -c Release

- name: Test
run: dotnet test -p:ParallelizeTestCollections=false
run: dotnet test --no-build

- name: Pack
run: dotnet pack CocoCrawler/CocoCrawler.csproj -o nuget-release -c Release --no-build
Expand Down
4 changes: 1 addition & 3 deletions CocoCrawler/Builders/PageCrawlJobBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using AngleSharp.Css;
using AngleSharp.Css.Parser;
using CocoCrawler.CrawlOutputs;
using CocoCrawler.CrawlOutputs;
using CocoCrawler.Exceptions;
using CocoCrawler.Job;
using CocoCrawler.Job.PageBrowserActions;
Expand Down
6 changes: 6 additions & 0 deletions Tests/CocoCrawler.IntegrationTests/BrowserCollection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace CocoCrawler.IntegrationTests;

[CollectionDefinition(nameof(BrowserCollection))]
public class BrowserCollection
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace CocoCrawler.IntegrationTests.Engine;

[Collection(nameof(BrowserCollection))]
public class CookiesTest
{
private readonly WireMockServer _wireMockServer = WireMockServer.Start();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using CocoCrawler.Builders;
using CocoCrawler.Exceptions;
using CocoCrawler.Scheduler;
using FluentAssertions;
using WireMock.Server;

namespace CocoCrawler.IntegrationTests.Engine;

[Collection(nameof(BrowserCollection))]
public class ThrowOnBuilderExceptions
{
private readonly WireMockServer _wireMockServer = WireMockServer.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace CocoCrawler.IntegrationTests.Engine;

[Collection(nameof(BrowserCollection))]
public class UserAgentTests
{
private readonly WireMockServer _wireMockServer = WireMockServer.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace CocoCrawler.IntegrationTests.ExtractListAndPaginate;

[Collection(nameof(BrowserCollection))]
public class ExtractObjectAndPaginateTests
{
private readonly WireMockServer _wireMockServer = WireMockServer.Start(port: 9090);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace CocoCrawler.IntegrationTests.ExtractListAndPaginate;

[Collection(nameof(BrowserCollection))]
public class OpenLinksExtractObjectAndPaginate
{
private readonly WireMockServer _wireMockServer = WireMockServer.Start(port: 9010);
Expand Down

0 comments on commit e1534d5

Please sign in to comment.