Skip to content

Commit

Permalink
Merge pull request #203 from OndrejKotek/HAL-1926
Browse files Browse the repository at this point in the history
HAL-1926 Fix/migrate domain mode in the testsuite.next
  • Loading branch information
hpehl committed Dec 6, 2023
2 parents 1089cf3 + 4738327 commit 9e7f330
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.Batch;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.Values;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;


Expand All @@ -44,10 +43,10 @@ public class UrlConnectionTestCase {
private static final ServerEnvironmentUtils serverEnvironmentUtils = new ServerEnvironmentUtils(client);
private static final Operations operations = new Operations(client);

private static final Address hostMaster = Address.of("host","primary");
private static final Address hostPrimary = Address.of("host","primary");
private static final Address serverGroupMain = Address.of(SERVER_GROUP,"main-server-group");

private static final BackupAndRestoreAttributes backupHost = new BackupAndRestoreAttributes.Builder(hostMaster).build();
private static final BackupAndRestoreAttributes backupHost = new BackupAndRestoreAttributes.Builder(hostPrimary).build();
private static final BackupAndRestoreAttributes backupOtherServerGroup = new BackupAndRestoreAttributes.Builder(Address.of(SERVER_GROUP,"other-server-group")).build();
private static final BackupAndRestoreAttributes backupMainServerGroup = new BackupAndRestoreAttributes.Builder(Address.of(SERVER_GROUP,"main-server-group")).build();
private static final BackupAndRestoreAttributes backupProfile = new BackupAndRestoreAttributes.Builder(Address.of(PROFILE, DEFAULT)).build();
Expand All @@ -60,18 +59,13 @@ public static void setUp() throws IOException, TimeoutException, InterruptedExce
backupMainServerGroup.backup();
backupProfile.backup();

operations.batch(new Batch().remove(hostMaster.and("server-config","server-three"))); // /host=master/server-config=server-three:remove()
operations.batch(new Batch().remove(Address.of(SERVER_GROUP,"other-server-group"))); // /server-group=other-server-group:remove()

operations.batch(new Batch().add(serverGroupMain, Values.of(PROFILE, DEFAULT)));
operations.batch(new Batch().writeAttribute(serverGroupMain,PROFILE, DEFAULT));

operations.batch(new Batch().writeAttribute(serverGroupMain,"socket-binding-group","standard-sockets"));

operations.batch(new Batch().remove(Address.of(PROFILE,DEFAULT).and("subsystem","undertow").and("server","default-server").and("http-listener","default")));
operations.batch(new Batch().writeAttribute(serverGroupMain.and("jvm",DEFAULT),"heap-size", "256m"));
operations.batch(new Batch().writeAttribute(serverGroupMain.and("jvm",DEFAULT),"max-heap-size", "256m"));
operations.batch(new Batch().writeAttribute(serverGroupMain,PROFILE, DEFAULT)).assertSuccess();
operations.batch(new Batch().writeAttribute(serverGroupMain,"socket-binding-group","standard-sockets")).assertSuccess();
administration.reloadIfRequired();

operations.batch(new Batch().remove(Address.of(PROFILE,DEFAULT).and("subsystem","undertow").and("server","default-server").and("http-listener","default"))).assertSuccess();
operations.batch(new Batch().writeAttribute(serverGroupMain.and("jvm",DEFAULT),"heap-size", "256m")).assertSuccess();
operations.batch(new Batch().writeAttribute(serverGroupMain.and("jvm",DEFAULT),"max-heap-size", "256m")).assertSuccess();
administration.reloadIfRequired();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public void standaloneWizardNavigation() throws Exception {
.verifyNext(ACCESS_CONTROL_TITLE, "By default, EAP uses simple access controls",
finderPlace(NameTokens.ACCESS_CONTROL, null))
.verifyNext(ACCESS_CONTROL_TITLE, "Add and assign roles to users and groups.",
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-" + "users")))
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-users")))
.verifyNext(ACCESS_CONTROL_TITLE, "Manage the list of roles",
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-" + "roles")))
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-roles")))
.verifyFinish();
}
}
Expand Down Expand Up @@ -128,9 +128,9 @@ public void domainWizardNavigation() throws Exception {
.verifyNext(ACCESS_CONTROL_TITLE, "By default, EAP uses simple access controls",
finderPlace(NameTokens.ACCESS_CONTROL, null))
.verifyNext(ACCESS_CONTROL_TITLE, "Add and assign roles to users and groups.",
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, "users")))
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-users")))
.verifyNext(ACCESS_CONTROL_TITLE, "Manage the list of roles",
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, "roles")))
finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY + "-roles")))
.verifyFinish();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class MissingOperationsTestCase {

private static final OnlineManagementClient client = ManagementClientProvider.createOnlineManagementClient();
private static final Operations operations = new Operations(client);
private static final String[] baseItems = {"View", "Destroy", "Kill", "Copy"};
private static final String[] baseItems = {"Destroy", "Kill", "Copy"};
private static final String[] startedItems = {"Reload", "Restart", "Suspend", "Stop"};
private static final String[] suspendedItems = {"Resume"};
private static final String[] stoppedItems = {"Start", "Remove"};
Expand Down

0 comments on commit 9e7f330

Please sign in to comment.