-
Notifications
You must be signed in to change notification settings - Fork 272
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
Pass in strong password to OSD integ test if version >= 2.12.0 #4334
Merged
Merged
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e1ad15a
Change password based on version in integtest health check
derek-ho 46cd35b
Remove hard coded 3
derek-ho a7ba5e4
Add version check same as benchmark
derek-ho 3097bbc
Fix to minimize changes
derek-ho f493f24
Revert logging line
derek-ho 5d7f060
Remove non-existent args param
derek-ho 9ae642e
try adding a test to increase codecov
derek-ho 574e40a
Add test
derek-ho 034f0cb
Fix test
derek-ho 4aac0c2
fix capital
derek-ho d6fa3d5
remove extra line
derek-ho 3185ebe
Fix test
derek-ho 2d77952
Fix test
derek-ho 42fccb2
Fix test
derek-ho d76d9b2
Fix test
derek-ho c2b1374
Fix version to hit more lines
derek-ho 48fbe24
Update password based on version for OSD
derek-ho 8c86ce6
Merge branch 'main' of github.com:opensearch-project/opensearch-build…
derek-ho e450957
change to semver impl
derek-ho 0dcfd3d
Reorg into utils and test and change export to env
derek-ho 207be45
hello
derek-ho ec6a0a0
Fix import
derek-ho 20be6ff
fix test assertion
derek-ho 5d8d699
Fix assertion
derek-ho 6bd68e9
revert changes to export after checking logs to see that admin passwo…
derek-ho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright OpenSearch Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# The OpenSearch Contributors require contributions made to | ||
# this file be licensed under the Apache-2.0 license or a | ||
# compatible open source license. | ||
|
||
import semver | ||
|
||
|
||
def get_password(version: str) -> str: | ||
# Starting in 2.12.0, demo configuration setup script requires a strong password | ||
if semver.compare(version, '2.12.0') != -1: | ||
derek-ho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return "myStrongPassword123!" | ||
else: | ||
return "admin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/tests_test_workflow/test_integ_workflow/integ_test/test_utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright OpenSearch Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# The OpenSearch Contributors require contributions made to | ||
# this file be licensed under the Apache-2.0 license or a | ||
# compatible open source license. | ||
|
||
import unittest | ||
|
||
from test_workflow.integ_test.utils import get_password | ||
|
||
|
||
class TestUtils(unittest.TestCase): | ||
def test_strong_password(self) -> None: | ||
self.assertEqual("admin", get_password("2.11.1")) | ||
self.assertEqual("myStrongPassword123!", get_password("3.0.0")) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this to env from suggestion from @peterzhuamazon. Can somebody with insight explain why this might work better? From the jenkins failures it looks like either the cluster is not being spun up successfully with strong password, or the health check is not using the correct credential, even though I have made changes that I think should solve both of these. It seems like this command is run with python subprocess, might that have something to do with it?