Skip to content

test(describe): fix flaky "app status" tests due to passing time#918

Merged
mergify[bot] merged 1 commit intoaws:rename-commandsfrom
efekarakus:cherry-pick-fix
May 13, 2020
Merged

test(describe): fix flaky "app status" tests due to passing time#918
mergify[bot] merged 1 commit intoaws:rename-commandsfrom
efekarakus:cherry-pick-fix

Conversation

@efekarakus
Copy link
Copy Markdown
Contributor

Cherry-picks the fix #917 to the rename-commands branch.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@efekarakus efekarakus changed the title test(describe): fix flaky "app status" tests due to passing time (#917) test(describe): fix flaky "app status" tests due to passing time May 13, 2020
The humanize.Time function outputs time in human friendly ways
(ex: "1 day ago"). Our test cases were expecting the string "1 month ago",
but a few hours ago the output from humanize.Time changed to "2 months ago".

This change hard-codes time.Now for the test, so that humanize.Time
always returns the same value.
We also moved the test from "cli/app_status_test.go" to "describe/status_test.go".
@mergify mergify bot merged commit 4c815c6 into aws:rename-commands May 13, 2020
@efekarakus efekarakus deleted the cherry-pick-fix branch June 9, 2020 15:53
SoManyHs added a commit to SoManyHs/copilot-cli that referenced this pull request Jun 24, 2020
SoManyHs added a commit to SoManyHs/copilot-cli that referenced this pull request Jun 24, 2020
SoManyHs added a commit to SoManyHs/copilot-cli that referenced this pull request Jun 24, 2020
mergify bot pushed a commit that referenced this pull request Jun 24, 2020
Related: #918

<!-- Provide summary of changes -->

<!-- Issue number, if available. E.g. "Fixes #31", "Addresses #42, 77" -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
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.

4 participants