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

cliTest for userLastSeen #33244

Merged
merged 1 commit into from
Oct 23, 2018
Merged

cliTest for userLastSeen #33244

merged 1 commit into from
Oct 23, 2018

Conversation

paurakhsharma
Copy link
Member

Description

This PR adds more tests for cliProvisioning userLastSeen using occ commands.

Related issue: #33052

How Has This Been Tested?

Locally

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Acceptance test

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Oct 23, 2018

Codecov Report

Merging #33244 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #33244   +/-   ##
=========================================
  Coverage     64.02%   64.02%           
  Complexity    18187    18187           
=========================================
  Files          1179     1179           
  Lines         68698    68698           
  Branches       1271     1271           
=========================================
  Hits          43987    43987           
  Misses        24341    24341           
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.88% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.32% <ø> (ø) 18187 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bb3727...3d854b1. Read the comment docs.

public function theCommandOutputOfUserLastSeenShouldBeRecently() {
$currentTime = \gmdate('d.m.Y H:i');
$lastOutput = $this->featureContext->getStdOutOfOccCommand();
PHPUnit_Framework_Assert::assertContains($currentTime, $lastOutput);
Copy link
Member

Choose a reason for hiding this comment

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

this might fail if SUT is different from testing server and also if the user is created on sec. 59 and check is done in the next minute.
I fear we would have random failures that will confuse

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I should modify this

@@ -243,6 +243,19 @@ public function theAdministratorGetsTheGroupsOfUserInJsonUsingTheOccCommand($use
);
}

/**
* @When the administrator retrieves the last seen of user :username using the occ command
Copy link
Member

Choose a reason for hiding this comment

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

somehow that sounds strange
maybe:

Suggested change
* @When the administrator retrieves the last seen of user :username using the occ command
* @When the administrator retrieves the time when user :username was last seen using the occ command

@phil-davis what does English native suggest?

@paurakhsharma
Copy link
Member Author

@individual-it, I have made the changes, can you please review it again.

@paurakhsharma paurakhsharma merged commit 7544b04 into master Oct 23, 2018
@paurakhsharma paurakhsharma deleted the cliTest-userLastSeen branch October 23, 2018 07:51
@paurakhsharma
Copy link
Member Author

Backport on: #33260

@phil-davis phil-davis mentioned this pull request Oct 23, 2018
10 tasks
@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants