Skip to content

Add functional test for checking factory with skipFirstLevel parameter#11104

Merged
musienko-maxim merged 14 commits intomasterfrom
CHE#11081
Sep 11, 2018
Merged

Add functional test for checking factory with skipFirstLevel parameter#11104
musienko-maxim merged 14 commits intomasterfrom
CHE#11081

Conversation

@musienko-maxim
Copy link
Copy Markdown
Contributor

@musienko-maxim musienko-maxim commented Sep 6, 2018

What does this PR do?

Add checking the skipFirstLevel parameter in the factory by next scenario:

  • Add test repo to GitHub side. Create factory with source form test repo and skipFirstLevel parameter.
  • Consumes the factory and checks that project has been imported as well.

What issues does this PR fix or reference?

#11081

@SkorikSergey, @dmytro-ndp, @Ohrimenko1988

@musienko-maxim musienko-maxim changed the title Add functional test for checking factorie with skipFirstLevel parameter Add functional test for checking factory with skipFirstLevel parameter Sep 6, 2018
@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Sep 6, 2018
Signed-off-by: musienko maksym <mmusiien@redhat.com>

@BeforeClass
public void setUp() throws Exception {
testUserPreferencesServiceClient.addGitCommitter(gitHubUsername, productUser.getEmail());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's quite hard to understand what this method is doing without comments and indents. Could you, please, add some explanation into the code?

public void setUp() throws Exception {
testUserPreferencesServiceClient.addGitCommitter(gitHubUsername, productUser.getEmail());
Path entryPath =
Paths.get(getClass().getResource("/projects/default-spring-project").getPath());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we really need to add "default-spring-project" project into the test repository if we then adding into the factory template link to github project archive?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually we need.
After adding the test repo - we have URLs like:

  1. SSH: git@github.com:gthub_user_name/name_repo
  2. HTTPS: https://github.com/com:gthub_user_name/name_repo
  3. ZIP: https://gthub_user_name/name_repo/archive/branch_name.zip
    So we use # 3 for the test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In that case, IMHO, testRepo.addContent(entryPath) looks redundant.

@dmytro-ndp
Copy link
Copy Markdown
Contributor

dmytro-ndp commented Sep 10, 2018

pathToGithubArchive variable is more like a urlToDownloadZippedRepoFromGitHub

@musienko-maxim
Copy link
Copy Markdown
Contributor Author

ci-build

@musienko-maxim musienko-maxim merged commit 37a7e2c into master Sep 11, 2018
@benoitf benoitf added this to the 6.11.0 milestone Sep 11, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Sep 11, 2018
@musienko-maxim musienko-maxim deleted the CHE#11081 branch September 11, 2018 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/task Internal things, technical debt, and to-do tasks to be performed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants