KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.NodeManager.Tests.NodeManagerActorTests Class Reference

Testing node manager actor More...

Inheritance diagram for KlusterKite.NodeManager.Tests.NodeManagerActorTests:
KlusterKite.Core.TestKit.BaseActorTest< NodeManagerActorTests.Configurator >

Classes

class  Configurator
 Configures current test system More...
 

Public Member Functions

 NodeManagerActorTests (ITestOutputHelper output)
 Initializes a new instance of the NodeManagerActorTests class. More...
 
async Task ActorStartTest ()
 Tests actor start More...
 
async Task NodeDescriptionCollection ()
 Node description collection test More...
 
async Task NodeIsObsoleteOnStartTest ()
 Tests node is obsolete on start More...
 
async Task NodeWithCompatibleTemplateTest ()
 Tests node is obsolete on start More...
 
async Task MigrationStateTest (string[] resources, int configurationPosition, int nodesPosition, string expectedStartBitState, EnMigrationSteps expectedStartStep, string expectedSteps, int[] expectedMigratableResources)
 The migration state test. More...
 
async Task ResourceMigrationStateDowngradeCancel ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateDowngradeFinish ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateDowngradeNodesRollback ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateDowngradeNodesUpdate ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateDowngradeResourceRollBack ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateDowngradeResourceUpdate ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateStayCancel ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateStayFinish ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateStayNodesRollback ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateStayNodesUpdate ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeCancel ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeFinish ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeNodesRollback ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeNodesUpdate ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeResourceRollBack ()
 The actor is in migration state, updating resources More...
 
async Task ResourceMigrationStateUpgradeResourceUpdate ()
 The actor is in migration state, updating resources More...
 
async Task ResourceConfigurationStateBrokenResourceTest ()
 Checking the resource states, resource is broken and should be updated manually More...
 
async Task ResourceConfigurationStateRecheckTest ()
 Checking the resource states, resource is broken and should be updated manually More...
 
async Task ResourceConfigurationStateResourceUpgradeTest ()
 Checking the resource states, resource is not in last migration point and should be updated manually More...
 
async Task ResourceConfigurationStateResourceCreateTest ()
 Checking the resource states, resource is not in last migration point and should be updated manually More...
 
async Task ResourceConfigurationStateInitializationTest ()
 Checking the resource states in initialization state More...
 
async Task ResourceConfigurationStateMigrationCreateDirectionConflictTest ()
 Checking the resource states More...
 
async Task ResourceConfigurationStateMigrationCreateDowngradeTest ()
 Checking the migration downgrade creation More...
 
async Task ResourceConfigurationStateMigrationCreateFailedTest ()
 Checking the resource states More...
 
async Task ResourceConfigurationStateMigrationCreateResourcesUnchangedTest ()
 Checking migration creation with unchanged resources More...
 
async Task ResourceConfigurationStateMigrationCreateUpgradeTest ()
 Checking the migration upgrade creation More...
 
async Task ResourceConfigurationStateOkTest ()
 Checking the resource states in normal state More...
 
async Task ResourceConfigurationStateUnmigratedNodeTest ()
 Checking the resource states, cluster node should be migrated More...
 
async Task ResourceConfigurationStateUnmigratedResourceTest ()
 Checking the resource states, resource should be migrated More...
 
async Task TemplateSelectionTest ()
 Tests template selection More...
 
- Public Member Functions inherited from KlusterKite.Core.TestKit.BaseActorTest< NodeManagerActorTests.Configurator >
new TestActorRef< TActor > ActorOfAsTestActorRef< TActor > (Expression< Func< TActor >> factory, string name=null)
 Create a new actor as child of ActorSystem and returns it as TestActorRef<TActor> to enable access to the underlying actor instance via TestActorRefBase<TActor>.UnderlyingActor. Uses an expression that calls the constructor of TActor . More...
 
new TestActorRef< TActor > ActorOfAsTestActorRef< TActor > (Props props, string name=null)
 Create a new actor as child of ActorSystem and returns it as TestActorRef<TActor> to enable access to the underlying actor instance via TestActorRefBase<TActor>.UnderlyingActor. Uses an expression that calls the constructor of TActor . More...
 
virtual void Cleanup ()
 Cleanup after test run More...
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from KlusterKite.Core.TestKit.BaseActorTest< NodeManagerActorTests.Configurator >
 BaseActorTest (ITestOutputHelper output)
 Initializes a new instance of the BaseActorTest<TConfigurator> class. More...
 
override void Dispose (bool disposing)
 
ExpectMsg< T > (string path)
 Waiting for message

See also
TestActorForwarder

that was sent to the specified address More...

 
ExpectMsg< T > (string path, TimeSpan timeout)
 Waiting for message

See also
TestActorForwarder

that was sent to the specified address on specified time More...

 
void ExpectNoTestMsg ()
 Expecting that there is no new messages More...
 
TestMessage< T > ExpectTestMsg< T > ()
 Expects test message

See also
TestActorForwarder
More...
 
TestMessage< T > ExpectTestMsg< T > (TimeSpan timeout)
 Waiting for message

See also
TestActorForwarder

that was sent on specified time More...

 

Detailed Description

Testing node manager actor

Definition at line 58 of file NodeManagerActorTests.cs.

Constructor & Destructor Documentation

◆ NodeManagerActorTests()

KlusterKite.NodeManager.Tests.NodeManagerActorTests.NodeManagerActorTests ( ITestOutputHelper  output)

Initializes a new instance of the NodeManagerActorTests class.

Parameters
outputThe output.

Definition at line 66 of file NodeManagerActorTests.cs.

Member Function Documentation

◆ ActorStartTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ActorStartTest ( )

Tests actor start

Returns
The Task.

Definition at line 78 of file NodeManagerActorTests.cs.

◆ Dispose()

override void KlusterKite.NodeManager.Tests.NodeManagerActorTests.Dispose ( bool  disposing)
protected

Definition at line 2572 of file NodeManagerActorTests.cs.

◆ MigrationStateTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.MigrationStateTest ( string []  resources,
int  configurationPosition,
int  nodesPosition,
string  expectedStartBitState,
EnMigrationSteps  expectedStartStep,
string  expectedSteps,
int []  expectedMigratableResources 
)

The migration state test.

Parameters
resourcesThe array of string representing resources. Each string contains 3 chars.
  1. Dependency type: B for CodeDependsOnResource, A for ResourceDependsOnCode
  2. The migration direction: U for upgrade, D for downgrade, S for stay and B from Broken (when source and destination migration does not contain one another)
  3. The resource position: S - source, D - destination, M - no source nor destination (but can be migrated), B - broken, C - create, O - obsolete
configurationPositionThe current active configuration (1 or 2)
nodesPositionThe nodes current configuration (1 or 2)
expectedStartBitStateThe expected start bit state. The list of bites to check at start
  1. OperationIsInProgress
  2. CanCancelMigration
  3. CanCreateMigration
  4. CanFinishMigration
  5. CanMigrateResources
  6. CanUpdateNodesToDestination
  7. CanUpdateNodesToSource
expectedStartStepThe expected start step.
expectedStepsThe expected states.
expectedMigratableResourcesThe list of expected migratable resources (the index numbers of resources in the resources list).
Returns
The Task.

Definition at line 354 of file NodeManagerActorTests.cs.

◆ NodeDescriptionCollection()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.NodeDescriptionCollection ( )

Node description collection test

Returns
The Task.

Definition at line 93 of file NodeManagerActorTests.cs.

◆ NodeIsObsoleteOnStartTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.NodeIsObsoleteOnStartTest ( )

Tests node is obsolete on start

Returns
The Task.

Definition at line 160 of file NodeManagerActorTests.cs.

◆ NodeWithCompatibleTemplateTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.NodeWithCompatibleTemplateTest ( )

Tests node is obsolete on start

Returns
The Task.

Definition at line 191 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateBrokenResourceTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateBrokenResourceTest ( )

Checking the resource states, resource is broken and should be updated manually

Returns
The resource states

Definition at line 1820 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateInitializationTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateInitializationTest ( )

Checking the resource states in initialization state

Returns
The resource states

Definition at line 2044 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateMigrationCreateDirectionConflictTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateMigrationCreateDirectionConflictTest ( )

Checking the resource states

Returns
The resource states

Migration that updates one resources and downgrades other are not supported

Definition at line 2067 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateMigrationCreateDowngradeTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateMigrationCreateDowngradeTest ( )

Checking the migration downgrade creation

Returns
The resource states

Definition at line 2142 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateMigrationCreateFailedTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateMigrationCreateFailedTest ( )

Checking the resource states

Returns
The resource states

Migration that updates one resources and downgrades other are not supported

Definition at line 2216 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateMigrationCreateResourcesUnchangedTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateMigrationCreateResourcesUnchangedTest ( )

Checking migration creation with unchanged resources

Returns
The resource states

Definition at line 2281 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateMigrationCreateUpgradeTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateMigrationCreateUpgradeTest ( )

Checking the migration upgrade creation

Returns
The resource states

Definition at line 2352 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateOkTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateOkTest ( )

Checking the resource states in normal state

Returns
The resource states

Definition at line 2423 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateRecheckTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateRecheckTest ( )

Checking the resource states, resource is broken and should be updated manually

Returns
The resource states

Definition at line 1845 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateResourceCreateTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateResourceCreateTest ( )

Checking the resource states, resource is not in last migration point and should be updated manually

Returns
The resource states

Definition at line 1973 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateResourceUpgradeTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateResourceUpgradeTest ( )

Checking the resource states, resource is not in last migration point and should be updated manually

Returns
The resource states

Definition at line 1902 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateUnmigratedNodeTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateUnmigratedNodeTest ( )

Checking the resource states, cluster node should be migrated

Returns
The resource states

Definition at line 2450 of file NodeManagerActorTests.cs.

◆ ResourceConfigurationStateUnmigratedResourceTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceConfigurationStateUnmigratedResourceTest ( )

Checking the resource states, resource should be migrated

Returns
The resource states

Definition at line 2483 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeCancel()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeCancel ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 491 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeFinish()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeFinish ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 544 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeNodesRollback()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeNodesRollback ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 601 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeNodesUpdate()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeNodesUpdate ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 701 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeResourceRollBack()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeResourceRollBack ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 800 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateDowngradeResourceUpdate()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateDowngradeResourceUpdate ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 906 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateStayCancel()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateStayCancel ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1012 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateStayFinish()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateStayFinish ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1063 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateStayNodesRollback()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateStayNodesRollback ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1118 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateStayNodesUpdate()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateStayNodesUpdate ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1213 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeCancel()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeCancel ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1306 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeFinish()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeFinish ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1359 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeNodesRollback()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeNodesRollback ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1416 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeNodesUpdate()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeNodesUpdate ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1517 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeResourceRollBack()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeResourceRollBack ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1616 of file NodeManagerActorTests.cs.

◆ ResourceMigrationStateUpgradeResourceUpdate()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.ResourceMigrationStateUpgradeResourceUpdate ( )

The actor is in migration state, updating resources

Returns
The async task

Definition at line 1718 of file NodeManagerActorTests.cs.

◆ TemplateSelectionTest()

async Task KlusterKite.NodeManager.Tests.NodeManagerActorTests.TemplateSelectionTest ( )

Tests template selection

Returns
The Task.

Definition at line 2510 of file NodeManagerActorTests.cs.


The documentation for this class was generated from the following file: