builtins addNode

Testing Failure Condition: Attempting to Add a Controller to an Existing HA Cluster

Scénario de test & Cas d'usage

Business Context

An administrator, unaware that the CAS cluster is already configured for high availability (with a primary and a backup controller), attempts to add another controller. This test validates the system's ability to prevent an invalid topology.
About the Set : builtins

Fundamental CAS server system commands.

Discover all actions of builtins
Data Preparation

Simulate a CAS environment that is already in a high-availability state, with one primary and one backup controller.

Copied!
1/* Initial state: 1 primary controller, 1 backup controller. */

Étapes de réalisation

1
Confirm the existing HA configuration by checking the server status.
Copied!
1PROC CAS;
2 BUILTINS.serverStatus;
3RUN;
2
Attempt to add a third controller, which is an invalid operation.
Copied!
1PROC CAS;
2 BUILTINS.addNode /
3 node={"cascontroller03.example.com"},
4 role="CONTROLLER";
5RUN;

Expected Result


The `addNode` action must fail. The CAS log should produce a clear and specific error message indicating that a backup controller already exists and a third controller cannot be added. A subsequent check of the server status should show that the cluster topology remains unchanged (still one primary and one backup controller).