Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Improve reliability of integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shaynevanasperen committed Nov 5, 2018
1 parent 2be3c6c commit a1d065e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 47 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -41,3 +41,9 @@ These objects also handle matching - i.e. reconciling the state described by fil

Kong's plugin model is more complex, as each plugin has its own set of properties used to configure it. We model this as a `Dictionary<string, object>` and the equality comparison checks the value of this object graph.
Beware that in order to prevent a plugin from being seen as different when it is actually the same, all optional values need to be supplied in the input files.

## Testing

Integration tests exist to test Kongverge against a real instance of Kong running in Docker. In order to build the integration tests project, you will need to have Docker installed locally. For development and CI-build purposes, the following steps are required:
* Before running the integration tests, start the docker services by running `docker-compose start` from within the integration tests project folder.
* After running the integration tests (or when required), stop the docker services by running `docker-compose stop` from within the integration tests project folder.
36 changes: 0 additions & 36 deletions test/Kongverge.IntegrationTests/DockerServicesLifeCycle.cs

This file was deleted.

Expand Up @@ -4,7 +4,7 @@

namespace Kongverge.IntegrationTests
{
[Story(Title = nameof(Program) + nameof(Program.Main))]
[Story(Title = nameof(Program) + nameof(Program.Main) + "InvalidArguments")]
public class ProgramInvalidArgumentsScenarios : ProgramSteps
{
[BddfyFact(DisplayName = nameof(NoArguments))]
Expand Down
Expand Up @@ -2,11 +2,9 @@
using Kongverge.Workflow;
using TestStack.BDDfy;
using TestStack.BDDfy.Xunit;
using Xunit;

namespace Kongverge.IntegrationTests
{
[Collection(Host)]
[Story(Title = nameof(Program) + nameof(Program.Main) + nameof(KongvergeWorkflow) + "Failure")]
public class ProgramWorkflowFailureScenarios : ProgramSteps
{
Expand Down
@@ -1,16 +1,16 @@
using Kongverge.Helpers;
using Kongverge.Workflow;
using NCrunch.Framework;
using TestStack.BDDfy;
using TestStack.BDDfy.Xunit;
using Xunit;

namespace Kongverge.IntegrationTests
{
[Collection(Host)]
[ExclusivelyUses(Host)]
[Story(Title = nameof(Program) + nameof(Program.Main) + nameof(KongvergeWorkflow) + "Success")]
public class ProgramWorkflowSuccessScenarios : ProgramSteps
{
[BddfyFact(DisplayName = nameof(KongIsBlank) + And + nameof(AValidHost) + And + nameof(AValidPort) + And + nameof(InputFolderIs) + A)]
[BddfyFact(DisplayName = nameof(KongIsBlank) + And + nameof(AValidHost) + And + nameof(AValidPort) + And + nameof(InputFolderIs) + A)]
public void Scenario1() =>
this.Given(x => x.KongIsBlank())
.And(x => x.AValidHost())
Expand All @@ -23,7 +23,7 @@ public class ProgramWorkflowSuccessScenarios : ProgramSteps
.TearDownWith(s => KongIsBlank())
.BDDfy();

[BddfyFact(DisplayName = nameof(KongIsBlank) + And + nameof(AValidHost) + And + nameof(AValidPort) + And + nameof(InputFolderIs) + B)]
[BddfyFact(DisplayName = nameof(KongIsBlank) + And + nameof(AValidHost) + And + nameof(AValidPort) + And + nameof(InputFolderIs) + B)]
public void Scenario2() =>
this.Given(x => x.KongIsBlank())
.And(x => x.AValidHost())
Expand Down
4 changes: 0 additions & 4 deletions test/Kongverge.IntegrationTests/Properties/AssemblyInfo.cs

This file was deleted.

0 comments on commit a1d065e

Please sign in to comment.