-
Notifications
You must be signed in to change notification settings - Fork 12
Other/CodeMigration-bugfixes(AST-131175) #234
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
Merged
Merged
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
de78e0e
Updated dependency slf4j and jackson
cx-aniket-shinde e0fbcce
Code migration changes (exclude java wrapper)
cx-aniket-shinde 023f8e5
Changed the test classes as per the junit5
cx-aniket-shinde a207c58
Track large jar using Git LFS
cx-aniket-shinde d75f000
Updated ci.yml for java 17 migration.
cx-aniket-shinde 28b6a9b
Updated release.yml for java 17
cx-aniket-shinde da5a162
Update ci.yml, workflow dispatch action added for manual check
cx-aniket-shinde e57bfcf
Added testing comment
cx-aniket-shinde f6bff60
Added the dependency declaration inside the pom
cx-aniket-shinde fcd6eca
Merge branch 'main' into codeMigration
cx-aniket-shinde 988dc11
Resolved slf4j issue
cx-aniket-shinde 51f6bdb
Updated pom.xml
cx-aniket-shinde c7d445b
align changes
cx-aniket-shinde 2138205
align changes
cx-aniket-shinde 5ccdc6a
resolved tests failing
cx-aniket-shinde f88da76
Mockito annotation import resolved
cx-aniket-shinde 44ca4aa
resolved integration test cases
cx-aniket-shinde ecb46dd
resolved integration test cases
cx-aniket-shinde 1f722f2
resolved integration test cases
cx-aniket-shinde a83d0c6
resolved integration test cases
cx-aniket-shinde e1213b8
reverted chnages
cx-aniket-shinde e114015
pom changed for integration failing
cx-aniket-shinde 9ce1db7
reverted chnages
cx-aniket-shinde 57883a9
UI test cases
cx-aniket-shinde 39c2fca
Recommit small jars as normal binaries, keep wrappers in LFS
cx-aniket-shinde f350990
Track plugin lib jars as normal binaries
cx-aniket-shinde cec4e27
Update ci.yml
cx-anand-nandeshwar 59b3062
Update ci.yml
cx-anand-nandeshwar 76a9247
Update ci.yml
cx-aniket-shinde eab7cd9
Update ci.yml
cx-aniket-shinde 8fb86a3
vulnerability resolved
cx-aniket-shinde bb535f0
Merge branch 'codeMigration' of https://github.com/Checkmarx/ast-ecli…
cx-aniket-shinde a92aebd
Removed dependency
cx-aniket-shinde cbd5102
Chagned icons
cx-aniket-shinde 8a89fbf
fixed UI test cases
cx-aniket-shinde 48fa018
Resolved UI test cases and preferences page enhancements
cx-aniket-shinde 2c96e66
Resolved UI test cases
cx-aniket-shinde ffedf0c
changes in branch for SCAResult
cx-aniket-shinde c49315a
TestFilterState changes
cx-aniket-shinde 186a966
BaseUITest changes
cx-aniket-shinde 7c595c8
BaseUITest changes
cx-aniket-shinde f58f334
BaseUITest changes
cx-aniket-shinde fd3cd54
SCAResults changes
cx-aniket-shinde a0bb805
resolving approval comment
cx-aniket-shinde 22196ee
resolving approval comment
cx-aniket-shinde 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
| <classpathentry kind="output" path="bin"/> | ||
| </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 |
|---|---|---|
|
|
@@ -4,4 +4,5 @@ | |
| /.metadata/ | ||
| .idea/ | ||
| .vs/ | ||
| .vscode/ | ||
| *.jar | ||
| !checkmarx-ast-eclipse-plugin/lib/*.jar | ||
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 @@ | ||
| {} |
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,11 @@ | ||
| Manifest-Version: 1.0 | ||
| Bundle-ManifestVersion: 2 | ||
| Bundle-Name: checkmarx-eclipse-plugin | ||
| Bundle-SymbolicName: checkmarx-eclipse-plugin | ||
| Bundle-Version: 1.0.0.qualifier | ||
| Require-Bundle: | ||
| org.slf4j.api, | ||
| org.apache.commons.lang3, | ||
| org.eclipse.mylyn.commons.ui | ||
| Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
| Automatic-Module-Name: checkmarx.eclipse.plugin |
|
cx-aniket-shinde marked this conversation as resolved.
Outdated
|
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 @@ | ||
| bin.includes = META-INF/ |
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 |
|---|---|---|
| @@ -1,15 +1,33 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
| <attributes> | ||
| <attribute name="module" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="src" path="src/test/java"> | ||
| <classpathentry kind="src" output="target/classes" path="src/test/java"> | ||
| <attributes> | ||
| <attribute name="test" value="true"/> | ||
| <attribute name="optional" value="true"/> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry exported="true" kind="lib" path="lib/jmockit-1.19.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/mockito-core-1.10.19.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/mockito-core-5.14.2.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/objenesis-2.2.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/junit-4.13.2.jar"/> | ||
| <classpathentry exported="true" kind="lib" path="lib/junit-jupiter-5.11.4.jar"/> | ||
| <classpathentry kind="lib" path="lib/objenesis-3.3.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-api-mockito2-2.0.7.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-core-2.0.9.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-api-support-1.4.9.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-module-junit4-2.0.9.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-module-junit4-common-2.0.9.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-module-junit4-rule-2.0.9.jar"/> | ||
| <classpathentry kind="lib" path="lib/powermock-reflect-2.0.9.jar"/> | ||
| <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| <attributes> | ||
| <attribute name="maven.pomderived" value="true"/> | ||
| </attributes> | ||
| </classpathentry> | ||
| <classpathentry kind="output" path="target/classes"/> | ||
| </classpath> |
10 changes: 6 additions & 4 deletions
10
checkmarx-ast-eclipse-plugin-tests/.settings/org.eclipse.jdt.core.prefs
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 |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
| org.eclipse.jdt.core.compiler.compliance=1.8 | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
| org.eclipse.jdt.core.compiler.compliance=17 | ||
| org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
| org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
| org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
| org.eclipse.jdt.core.compiler.release=disabled | ||
| org.eclipse.jdt.core.compiler.source=1.8 | ||
| org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
| org.eclipse.jdt.core.compiler.release=enabled | ||
| org.eclipse.jdt.core.compiler.source=17 |
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 |
|---|---|---|
| @@ -1,10 +1,16 @@ | ||
| Manifest-Version: 1.0 | ||
| Bundle-ManifestVersion: 2 | ||
| Bundle-Name: checkmarx-ast-eclipse-plugin-tests | ||
| Bundle-Name: Checkmarx AST Eclipse Tests | ||
| Bundle-SymbolicName: com.checkmarx.ast.eclipse.tests | ||
| Bundle-Version: 1.0.0.qualifier | ||
| Require-Bundle: org.eclipse.swtbot.go | ||
| Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
| Bundle-ClassPath: ., lib/jmockit-1.19.jar, lib/mockito-core-1.10.19.jar, lib/objenesis-2.2.jar, lib/junit-4.13.2.jar | ||
| Fragment-Host: com.checkmarx.eclipse.plugin;bundle-version=0.0.0 | ||
|
|
||
| Fragment-Host: com.checkmarx.eclipse.plugin;bundle-version="1.0.0" | ||
| Require-Bundle: | ||
| org.eclipse.swtbot.swt.finder, | ||
| org.eclipse.swtbot.eclipse.finder, | ||
| org.eclipse.swtbot.junit5_x, | ||
| org.eclipse.swt, | ||
| org.eclipse.jdt.junit5.runtime, | ||
| junit-jupiter-api | ||
| Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
| Bundle-ClassPath: .,lib/mockito-core-5.14.2.jar,lib/powermock-core-*.jar | ||
| Automatic-Module-Name: com.checkmarx.ast.eclipse.tests |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-86.3 KB
checkmarx-ast-eclipse-plugin-tests/lib/powermock-api-mockito2-2.0.7.jar
Binary file not shown.
Binary file removed
BIN
-18 KB
checkmarx-ast-eclipse-plugin-tests/lib/powermock-api-support-1.4.9.jar
Binary file not shown.
Binary file removed
BIN
-46.6 KB
checkmarx-ast-eclipse-plugin-tests/lib/powermock-module-junit4-2.0.9.jar
Binary file not shown.
Binary file removed
BIN
-17.3 KB
checkmarx-ast-eclipse-plugin-tests/lib/powermock-module-junit4-common-2.0.9.jar
Binary file not shown.
Binary file removed
BIN
-8.68 KB
checkmarx-ast-eclipse-plugin-tests/lib/powermock-module-junit4-rule-2.0.9.jar
Binary file not shown.
Binary file not shown.
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 |
|---|---|---|
| @@ -1,44 +1,36 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>com.checkmarx.ast.eclipse.tests</groupId> | ||
| <artifactId>com.checkmarx.ast.eclipse.tests</artifactId> | ||
| <description>Checkmarx Eclipse Plugin Integration Tests Project</description> | ||
| <packaging>eclipse-test-plugin</packaging> | ||
| <parent> | ||
| <groupId>com.checkmarx.ast.eclipse</groupId> | ||
| <artifactId>checkmarx-eclipse-plugin</artifactId> | ||
| <version>1.0.0-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| <version>4.13.2</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>5.6.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.eclipse.tycho</groupId> | ||
| <artifactId>tycho-surefire-plugin</artifactId> | ||
| <version>${tycho.version}</version> | ||
| <configuration> | ||
| <includes> | ||
| <include>${test.includes}</include> | ||
| </includes> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <properties> | ||
| <test.includes>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</test.includes> | ||
| </properties> | ||
| <groupId>com.checkmarx.ast.eclipse.tests</groupId> | ||
| <artifactId>com.checkmarx.ast.eclipse.tests</artifactId> | ||
| <description>Checkmarx Eclipse Plugin Integration Tests Project</description> | ||
| <packaging>eclipse-test-plugin</packaging> | ||
| <parent> | ||
| <groupId>com.checkmarx.ast.eclipse</groupId> | ||
| <artifactId>checkmarx-eclipse-plugin</artifactId> | ||
| <version>1.0.0-SNAPSHOT</version> | ||
| </parent> | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.eclipse.tycho</groupId> | ||
| <artifactId>tycho-surefire-plugin</artifactId> | ||
| <version>${tycho.version}</version> | ||
| <configuration> | ||
| <useUIHarness>true</useUIHarness> | ||
| <useUIThread>false</useUIThread> | ||
| <providerHint>junit5</providerHint> | ||
| <failIfNoTests>true</failIfNoTests> | ||
| <includes> | ||
| <include>${test.includes}</include> | ||
| </includes> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
Binary file added
BIN
+266 KB
...tSelectionFlow(checkmarx.ast.eclipse.plugin.tests.ui.ProjectSelectionTest).jpeg
|
cx-aniket-shinde marked this conversation as resolved.
Outdated
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+390 KB
...hots/testSCAResultsExist(checkmarx.ast.eclipse.plugin.tests.ui.SCAResults).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 27 additions & 16 deletions
43
...est/java/checkmarx/ast/eclipse/plugin/tests/integration/AuthenticatorIntegrationTest.java
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 |
|---|---|---|
| @@ -1,36 +1,47 @@ | ||
| package checkmarx.ast.eclipse.plugin.tests.integration; | ||
|
|
||
| import static org.junit.Assert.*; | ||
| import org.junit.Test; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
| import org.mockito.Mock; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import com.checkmarx.eclipse.runner.Authenticator; | ||
|
|
||
| import static org.junit.jupiter.api.Assertions.assertFalse; | ||
| import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
|
||
| import java.io.File; | ||
|
|
||
| public class AuthenticatorIntegrationTest extends BaseIntegrationTest { | ||
|
|
||
| private static final Logger logger = LoggerFactory.getLogger(AuthenticatorIntegrationTest.class); | ||
|
|
||
| @Mock | ||
| private Authenticator authenticator; | ||
|
|
||
| @Test | ||
| public void testSuccessfulAuthentication() { | ||
| authenticator = new Authenticator(LoggerFactory.getLogger(Authenticator.class)); | ||
| System.out.println("\n=== Starting Authentication Test ==="); | ||
| System.out.println("Current directory: " + new File(".").getAbsolutePath()); | ||
| System.out.println("API Key available: " + (VALID_API_KEY != null)); | ||
| String result = authenticator.doAuthentication(VALID_API_KEY, ""); | ||
| System.out.println("Authentication result: " + result); | ||
| assertNotNull("Authentication result should not be null", result); | ||
| assertFalse("Authentication result should not contain error", result.toLowerCase().contains("error")); | ||
| System.out.println("=== Authentication Test Completed ===\n"); | ||
| } | ||
| String result = authenticator.doAuthentication(VALID_API_KEY, ""); | ||
| System.out.println("Authentication result: " + result); | ||
| assertNotNull("Authentication result should not be null", result); | ||
| assertFalse(result.toLowerCase().contains("error"), "Authentication result should not contain error"); | ||
| System.out.println("=== Authentication Test Completed ===\n"); | ||
| } | ||
|
|
||
| @Test | ||
| public void testInvalidApiKeyAuthentication() { | ||
| System.out.println("\n=== Starting Invalid API Key Test ==="); | ||
| String invalidApiKey = "invalid-api-key"; | ||
| String result = authenticator.doAuthentication(invalidApiKey, ""); | ||
| System.out.println("Authentication result with invalid API key: " + result); | ||
| assertNotNull("Result should not be null for invalid API key", result); | ||
| assertTrue("Result should contain error for invalid API key", result.toLowerCase().contains("error")); | ||
| System.out.println("=== Invalid API Key Test Completed ===\n"); | ||
| public void testInvalidApiKeyAuthentication() { | ||
| authenticator = new Authenticator(LoggerFactory.getLogger(Authenticator.class)); | ||
| System.out.println("\n=== Starting Invalid API Key Test ==="); | ||
| String invalidApiKey = "invalid-api-key"; | ||
| String result = authenticator.doAuthentication(invalidApiKey, ""); | ||
| System.out.println("Authentication result with invalid API key: " + result); | ||
| assertNotNull("Result should not be null for invalid API key", result); | ||
| assertTrue(result.toLowerCase().contains("error"), "Result should contain error for invalid API key"); | ||
| System.out.println("=== Invalid API Key Test Completed ===\n"); | ||
| } | ||
| } |
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
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.