Skip to content

Test Fix: test for default TTL instead of date timestamp#10070

Merged
Monkeychip merged 5 commits into
masterfrom
ui/enterprise-replication-test-fix
Oct 5, 2020
Merged

Test Fix: test for default TTL instead of date timestamp#10070
Monkeychip merged 5 commits into
masterfrom
ui/enterprise-replication-test-fix

Conversation

@Monkeychip
Copy link
Copy Markdown
Contributor

Originally we were testing for the date timestamp on the replication modal. The problem is there is an off chance that the timestamp could be off by 1 second. To fix this we are instead checking for the default TTL of 1800. We no longer check date formatting but are still checking for the correct default TTL, which was the core of this test in the first place.

image

@Monkeychip Monkeychip added the ui label Oct 1, 2020
@Monkeychip Monkeychip added this to the 1.6 milestone Oct 1, 2020
Copy link
Copy Markdown
Contributor

@chelshaw chelshaw left a comment

Choose a reason for hiding this comment

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

Other than another test possibly, this change looks great!

modalDate.slice(0, 18),
'shows the correct expiration date and in the correct format'
);
const modalDefaultTtl = document.querySelector('[data-test-row-value="TTL"]').innerText;
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.

Should we do one more test scenario where we don't use the default (set it to something specific) and make sure the TTL reflects that?

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.

Good call. Just pushed a commit that checks for when it's set at 3 minutes as well.

@Monkeychip Monkeychip merged commit a2230ba into master Oct 5, 2020
@Monkeychip Monkeychip deleted the ui/enterprise-replication-test-fix branch October 5, 2020 16:55
pull Bot pushed a commit to mayocream/vault that referenced this pull request Oct 10, 2025
…ashicorp#9944) (hashicorp#10070)

* normalize token type for ns_token auth mounts

* add changelog

* also check type is supported in route and add test coverage

* Apply suggestion from @hellobontempo

* update test coverage to expect array

* update tests

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants