-
Notifications
You must be signed in to change notification settings - Fork 39
Fixes #282 - project detection in dashboard #284
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
Open
aparnamichael
wants to merge
24
commits into
OpenLiberty:main
Choose a base branch
from
aparnamichael:issue282_projectDetection_integrationTest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0ba1870
Added liberty dashboard test
aparnamichael d5c063f
Test case for detect project with src/main/liberty/config/server.xml …
aparnamichael cb966ab
Merge remote-tracking branch 'upstream/main' into issue282_projectDet…
aparnamichael 611b128
Changed the variable names
aparnamichael abbbc18
changed the variable names in the method
aparnamichael 6230fce
Formatting changes in libertydashboardinitproject file
aparnamichael 68b838b
Formatted the import statement in liberty dashboard test file
aparnamichael 901b551
Removed the extra spacing after import
aparnamichael 911f107
Formatted the spacing in testutils file.
aparnamichael 44c9214
Formatted the test case files & added a check for timeout error
aparnamichael 1c5e1bb
Added LGP and LMP with no server xml test
aparnamichael f8a1b71
Added test case for plugins block method
aparnamichael 468c3d0
Merge remote-tracking branch 'upstream/main' into issue282_projectDet…
aparnamichael f48f443
Merge remote-tracking branch 'upstream/main' into issue282_projectDet…
aparnamichael 332319d
Adding header to the new test file - DashboardLGPInitProjects.ts file
aparnamichael 7f24c5c
Added header in new test file - DashboardLGPTest
aparnamichael 116f4fb
Added licence header for DashboardLMPInitProject
aparnamichael f8167d8
Added licence header for DashboardLMPTest
aparnamichael 09fbd97
Added licence header for LibertyDashboardInitProject
aparnamichael 3ce8616
Added licence header for DashboardTest
aparnamichael 08af3e7
Merge pull request #1 from aparnamichael/issue282_add_headerfiles
aparnamichael 8cb3949
Merge remote-tracking branch 'upstream/main' into issue282_projectDet…
aparnamichael f484d82
Moved the newly added methods to the bottom of the file.
aparnamichael d7f7a93
Merge remote-tracking branch 'upstream/main' into issue282_projectDet…
aparnamichael File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
|
|
||
| import { WebDriver, VSBrowser } from 'vscode-extension-tester'; | ||
| import * as utils from './utils/testUtils'; | ||
|
|
||
|
|
||
|
|
||
| describe('Open Maven Server xml Project', () => { | ||
|
|
||
| let driver: WebDriver; | ||
|
|
||
|
|
||
| before(() => { | ||
| driver = VSBrowser.instance.driver; | ||
|
|
||
| }); | ||
|
|
||
| it('Open Sample Maven Project with no server.xml', async () => { | ||
| await VSBrowser.instance.openResources(utils.getMvnServerXmlProjectPath()); | ||
|
|
||
| }).timeout(15000); | ||
|
|
||
|
|
||
| }); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
|
|
||
| import { expect } from 'chai'; | ||
| import {SideBarView, ViewItem, ViewSection, DefaultTreeItem, DebugView } from 'vscode-extension-tester'; | ||
|
aparnamichael marked this conversation as resolved.
Outdated
|
||
| import * as utils from './utils/testUtils'; | ||
| import * as constants from './definitions/constants'; | ||
| import path = require('path'); | ||
|
|
||
|
|
||
| describe('Liberty dashboard project detection tests', () => { | ||
| let sidebar: SideBarView; | ||
| let debugView: DebugView; | ||
| let section: ViewSection; | ||
| let menu: ViewItem[]; | ||
| let item: DefaultTreeItem; | ||
| let tabs: string[]; | ||
|
|
||
| before(() => { | ||
| sidebar = new SideBarView(); | ||
| debugView = new DebugView(); | ||
| }); | ||
|
|
||
| it('getViewControl works with the correct label', async () => { | ||
|
|
||
| const contentPart = sidebar.getContent(); | ||
| section = await contentPart.getSection('Liberty Dashboard'); | ||
| console.log("Found Liberty Dashboard test...."); | ||
| expect(section).not.undefined; | ||
|
|
||
| }).timeout(10000); | ||
|
|
||
| it('Liberty dashboard is empty', async () => { | ||
|
|
||
| await utils.delay(30000); | ||
| const isEmpty = await utils.isViewSectionEmpty(section); | ||
| expect(isEmpty).true; | ||
|
|
||
| }).timeout(70000); | ||
|
|
||
| it('Copy server.xml to config folder', async () => { | ||
|
|
||
| await utils.delay(50000); | ||
| const serverxmlPath = path.join(utils.getMvnServerXmlProjectPath(), "src", "main", "liberty", "config", "serverxml", "server.xml"); | ||
| const dest = path.join(utils.getMvnServerXmlProjectPath(), "src", "main", "liberty", "config", "server.xml"); | ||
| await utils.copyFile(serverxmlPath, dest); | ||
| console.log("Finished copying file...."); | ||
|
|
||
| }).timeout(90000); | ||
|
|
||
| it('Open dasboard shows items - Maven', async () => { | ||
|
|
||
| await utils.delay(50000); | ||
| const menu = await section.getVisibleItems(); | ||
| expect(menu).not.empty; | ||
| item = await section.findItem(constants.MAVEN_SERVERXML_PROJECT) as DefaultTreeItem; | ||
| expect(item).not.undefined; | ||
|
|
||
|
|
||
| }).timeout(80000); | ||
|
|
||
| it('Delete server.xml from config.', async () => { | ||
| const dest = path.join(utils.getMvnServerXmlProjectPath(), "src", "main", "liberty", "config", "server.xml"); | ||
| const deleteServerxml = await utils.deleteReports(dest); | ||
| expect(deleteServerxml).to.be.true; | ||
| }).timeout(80000); | ||
|
|
||
|
|
||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/test/resources/maven-serverxml/liberty.maven.serverxml.test.wrapper.app/.classpath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| <attribute name="test" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="src" path="target/generated-sources/annotations"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| <attribute name="ignore_optional_problems" value="true"/> | ||
| <attribute name="m2e-apt" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| <attribute name="optional" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| <attribute name="test" value="true"/> | ||
| <attribute name="optional" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> | ||
| <attributes> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| <attribute name="ignore_optional_problems" value="true"/> | ||
| <attribute name="m2e-apt" value="true"/> | ||
| <attribute name="test" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="output" path="target/classes"/> | ||
| </classpath> |
Binary file added
BIN
+58.5 KB
...s/maven-serverxml/liberty.maven.serverxml.test.wrapper.app/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
...-serverxml/liberty.maven.serverxml.test.wrapper.app/.mvn/wrapper/maven-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip | ||
| wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar |
3 changes: 3 additions & 0 deletions
3
.../resources/maven-serverxml/liberty.maven.serverxml.test.wrapper.app/.vscode/settings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "java.configuration.updateBuildConfiguration": "interactive" | ||
| } |
9 changes: 9 additions & 0 deletions
9
src/test/resources/maven-serverxml/liberty.maven.serverxml.test.wrapper.app/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM icr.io/appcafe/open-liberty:kernel-slim-java17-openj9-ubi | ||
|
|
||
| COPY --chown=1001:0 /src/main/liberty/config /config | ||
|
|
||
| RUN features.sh | ||
|
|
||
| COPY --chown=1001:0 target/*.war /config/apps | ||
|
|
||
| RUN configure.sh |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.