Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start in container test enable in linux #469

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 35 additions & 46 deletions src/test/GradleTestDevModeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,37 @@ it('Start gradle project from liberty dashboard', async () => {
expect (serverStartStatus).to.be.true;


}).timeout(350000);

it('start gradle with docker from liberty dashboard', async () => {

if((process.platform === 'darwin' ) || (process.platform === 'win32'))
{
//skip running for platforms , enable them for linux after resolving docker setup in GHA
return true;
}


await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITHDOCKER, constants.START_DASHBOARD_MAC_ACTION_WITHDOCKER);
await utils.delay(60000);
const serverStartStatus = await utils.checkTerminalforServerState(constants.SERVER_START_STRING);
if(!serverStartStatus)
console.log("Server started message not found in the terminal");
else
{
console.log("Server succuessfully started");
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus= await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
if(!serverStopStatus){
console.error("Server stopped message not found in the terminal");
}
else
console.log("Server stopped successfully");
expect (serverStopStatus).to.be.true;
}
expect (serverStartStatus).to.be.true;


}).timeout(350000);

it('Run tests for gradle project', async () => {
Expand Down Expand Up @@ -153,21 +184,10 @@ it('start gradle with history from liberty dashboard', async () => {

}).timeout(350000);
















/**
* All future test cases should be written before the test that attaches the debugger, as this will switch the UI to the debugger view.
* If, for any reason, a test case needs to be written after the debugger test, ensure that the UI is switched back to the explorer view before executing the subsequent tests.
*/
it('attach debugger for gradle with custom parameter event', async () => {
console.log("start attach debugger");
let isServerRunning: Boolean = true;
Expand Down Expand Up @@ -217,37 +237,6 @@ it('attach debugger for gradle with custom parameter event', async () => {
expect(attachStatus).to.be.true;
}).timeout(550000);

it('start gradle with docker from liberty dashboard', async () => {

if((process.platform === 'darwin' ) || (process.platform === 'win32') || (process.platform == 'linux'))
{
//skip running for platforms , enable them for linux after resolving docker setup in GHA
return true;
}


await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITHDOCKER, constants.START_DASHBOARD_MAC_ACTION_WITHDOCKER);
await utils.delay(60000);
const serverStartStatus = await utils.checkTerminalforServerState(constants.SERVER_START_STRING);
if(!serverStartStatus)
console.log("Server started message not found in the terminal");
else
{
console.log("Server succuessfully started");
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus= await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
if(!serverStopStatus){
console.error("Server stopped message not found in the terminal");
}
else
console.log("Server stopped successfully");
expect (serverStopStatus).to.be.true;
}
expect (serverStartStatus).to.be.true;


}).timeout(350000);

it('View test report for gradle project', async () => {

if((process.platform === 'darwin' ) || (process.platform === 'win32') || (process.platform == 'linux'))
Expand Down
66 changes: 35 additions & 31 deletions src/test/MavenTestDevModeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,37 @@ it('Start maven project from liberty dashboard', async () => {

}).timeout(550000);

it('start maven with docker from liberty dashboard', async () => {

if((process.platform === 'darwin' ) || (process.platform === 'win32'))
{
//skip running for platforms , enable them for linux after resolving docker setup in GHA
return true;
}


await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITHDOCKER, constants.START_DASHBOARD_MAC_ACTION_WITHDOCKER);
await utils.delay(60000);
const serverStartStatus = await utils.checkTerminalforServerState(constants.SERVER_START_STRING);
if(!serverStartStatus)
console.log("Server started message not found in the terminal");
else
{
console.log("Server succuessfully started");
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus= await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
if(!serverStopStatus){
console.error("Server stopped message not found in the terminal");
}
else
console.log("Server stopped successfully");
expect (serverStopStatus).to.be.true;
}
expect (serverStartStatus).to.be.true;


}).timeout(350000);

it('Run tests for sample maven project', async () => {

await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION, constants.START_DASHBOARD_MAC_ACTION);
Expand Down Expand Up @@ -188,6 +219,10 @@ it('View Integration test report for maven project', async () => {

}).timeout(10000);

/**
* All future test cases should be written before the test that attaches the debugger, as this will switch the UI to the debugger view.
* If, for any reason, a test case needs to be written after the debugger test, ensure that the UI is switched back to the explorer view before executing the subsequent tests.
*/
it('attach debugger for start with custom parameter event', async () => {
console.log("start attach debugger");
let isServerRunning: Boolean = true;
Expand Down Expand Up @@ -236,37 +271,6 @@ it('attach debugger for start with custom parameter event', async () => {
console.log("good to close test - Attach Debugger for start with custom parameter(-DdebugPort=7777) event");
}
expect(attachStatus).to.be.true;
}).timeout(350000);

it('start maven with docker from liberty dashboard', async () => {

if((process.platform === 'darwin' ) || (process.platform === 'win32') || (process.platform == 'linux'))
{
//skip running for platforms , enable them for linux after resolving docker setup in GHA
return true;
}


await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITHDOCKER, constants.START_DASHBOARD_MAC_ACTION_WITHDOCKER);
await utils.delay(60000);
const serverStartStatus = await utils.checkTerminalforServerState(constants.SERVER_START_STRING);
if(!serverStartStatus)
console.log("Server started message not found in the terminal");
else
{
console.log("Server succuessfully started");
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus= await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
if(!serverStopStatus){
console.error("Server stopped message not found in the terminal");
}
else
console.log("Server stopped successfully");
expect (serverStopStatus).to.be.true;
}
expect (serverStartStatus).to.be.true;


}).timeout(350000);


Expand Down
Loading