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

JBIDE-25870 - Add CDK runtime download integration tests #1735

Merged
merged 1 commit into from May 30, 2018

Conversation

odockal
Copy link
Member

@odockal odockal commented May 2, 2018

  • ITests for downloading container runtimes CDK 3.x, CDK 3.2+ and Minishift 1.14
  • Checking passing of credentials in download runtime wizard
  • Tests downloading into default folders

Signed-off-by: Ondrej Dockal odockal@redhat.com

Pull Request Checklist

General

  • Is this a blocking issue or new feature? If yes, QE needs to +1 this PR

Code

  • Are method-/class-/variable-names meaningful?
  • Are methods concise, not too long?
  • Are catch blocks catching precise Exceptions only (no catch all)?

Testing

  • Are there unit-tests?
  • Are there integration tests (or at least a jira to tackle these)?
  • Is the non-happy path working, too?
  • Are other parts that use the same component still working fine?

Function

  • Does it work?

@@ -61,6 +64,10 @@
public static final String SECURE_STORAGE = "Secure Storage";
}

public static class Links {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

@@ -95,6 +102,18 @@
public static final String MINISHIFT_SERVER_NAME = "Minishift 1.7+";
}

public static class Messages {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

LINUX("linux", ""),
WINDOWS("win", ".exe"),
MAC("darwin", ""),
LINUX("linux", "linux", ""),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL Define a constant instead of duplicating this literal "linux" 3 times. rule

public enum CDKVersion {

CDK2X ("CDK", "2.x", CDKLabel.Server.CDK_SERVER_NAME, ""),
CDK300 ("CDK", "3.0.0", CDKLabel.Server.CDK3_SERVER_NAME, "cdk-3.0-minishift-" + CDKRuntimeOS.get().getRuntimeFullName() + "-amd64" + CDKRuntimeOS.get().getSuffix()),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL Define a constant instead of duplicating this literal "-amd64" 10 times. rule

@odockal
Copy link
Member Author

odockal commented May 3, 2018

Waiting for jenkins build to actually run a job with tests. Lot of problems recently.

@odockal odockal force-pushed the runtime-download branch 2 times, most recently from 6c384e1 to 3a01bdc Compare May 8, 2018 21:08
@@ -40,6 +42,7 @@
public static final String NEW_SERVER_WIZARD = "New Server";
public static final String WARNING_FOLDER_EXISTS = "Warning: Folder already exists!";
public static final String WARNING_CDK_NOT_INICIALIZED = "Warning: CDK has not been properly initialized!";
public static final String DOWNLOAD_RUNTIMES = "Download Runtimes";
}

public static class Labels {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

@@ -18,7 +20,7 @@
public class CDKLabel {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

public static final String NOT_COMPATIBLE = "is not compatible with this server adapter";
public static final String SERVER_ADAPTER_REPRESENTING = "server adapter representing";
}

public static class Others {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

@@ -18,7 +20,7 @@
public class CDKLabel {

public static class Job {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

public static class Links {
public static final String DOWNLOAD_AND_INSTALL_RUNTIME = "Download and install runtime...";
}

public static class Sections {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add a private constructor to hide the implicit public one. rule

@odockal odockal force-pushed the runtime-download branch 5 times, most recently from f08a251 to 1e18a7b Compare May 10, 2018 13:12
@odockal
Copy link
Member Author

odockal commented May 15, 2018

@odockal
Copy link
Member Author

odockal commented May 15, 2018

@jkopriva could you take a look, please?

@@ -34,10 +39,17 @@
// UI integration tests

// Wizard tests by server adapter type
CDK3ServerWizardTest.class,
/*CDK3ServerWizardTest.class,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odockal what is the purpose of this have commented?

LINUX("linux", ""),
WINDOWS("win", ".exe"),
MAC("darwin", ""),
LINUX("linux", "linux", ""),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odockal maybe there could comment what these strings means...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in class javadoc.

CDK320 ("CDK", "3.2.0", CDKLabel.Server.CDK32_SERVER_NAME, "cdk-3.2.0-1-minishift-" + CDKRuntimeOS.get().getRuntimeFullName() + "-amd64" + CDKRuntimeOS.get().getSuffix()),
CDK330 ("CDK", "3.3.0", CDKLabel.Server.CDK32_SERVER_NAME, "cdk-3.3.0-1-minishift-" + CDKRuntimeOS.get().getRuntimeFullName() + "-amd64" + CDKRuntimeOS.get().getSuffix()),
CDK340 ("CDK", "3.4.0", CDKLabel.Server.CDK32_SERVER_NAME, "cdk-3.4.0-2-minishift-" + CDKRuntimeOS.get().getRuntimeFullName() + "-amd64" + CDKRuntimeOS.get().getSuffix()),
MINISHIFT1140 ("Minishift", "1.14.0", CDKLabel.Server.MINISHIFT_SERVER_NAME, "minishift-1.14.0-" + CDKRuntimeOS.get().getRuntimeFullName() + "-amd64"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL Define a constant instead of duplicating this literal "Minishift" 4 times. rule

@odockal odockal force-pushed the runtime-download branch 2 times, most recently from 96952ca to a21b26b Compare May 23, 2018 21:59
   - ITests for downloading container runtimes CDK 3.x, CDK 3.2+ and Minishift 1.14, 1.15.1, 1.16.1 and 1.17.0
   - Checking passing of credentials in download runtime wizard
   - Tests downloading into default folders

Signed-off-by: Ondrej Dockal <odockal@redhat.com>
@rhdevelopers-ci
Copy link

SonarQube analysis reported 18 issues

  • BLOCKER 3 blocker
  • CRITICAL 3 critical
  • MAJOR 11 major
  • MINOR 1 minor

Watch the comments in this conversation to review them.

8 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. BLOCKER CDKLabel.java#L49: 'PASSWORD' detected in this expression, review this potentially hardcoded credential. rule
  2. BLOCKER CDKLabel.java#L90: 'PASSWORD' detected in this expression, review this potentially hardcoded credential. rule
  3. BLOCKER CDKLabel.java#L91: 'PASSWORD' detected in this expression, review this potentially hardcoded credential. rule
  4. MAJOR CDKLabel.java#L27: Add a private constructor to hide the implicit public one. rule
  5. MAJOR CDKLabel.java#L35: Add a private constructor to hide the implicit public one. rule
  6. MAJOR CDKLabel.java#L77: Add a private constructor to hide the implicit public one. rule
  7. MAJOR CDKLabel.java#L95: Add a private constructor to hide the implicit public one. rule
  8. MINOR CDKLabel.java#L31: Make this member "protected". rule

@jkopriva
Copy link
Member

testPR

@jkopriva
Copy link
Member

LGTM, merging :)

@jkopriva jkopriva merged commit 61de110 into jbosstools:master May 30, 2018
@odockal odockal deleted the runtime-download branch June 25, 2018 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants