-
Notifications
You must be signed in to change notification settings - Fork 7
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
Generate newer version of test-info.yml #96
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
84b3bba
test-info: move creation of test-info.yml to test.sit-test-cases
spuiuk 6c7e6d6
client.prep: remove private interfaces from test-info.yml
spuiuk 1f5f3ad
client.prep: use new format for test-info.yml
spuiuk 38cb7bd
client-prep: add path to backend to test-info.yml
spuiuk 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ | |
become_method: sudo | ||
vars_files: | ||
- config.yml | ||
- cluster-{{ config.be.name }}.yml | ||
roles: | ||
- tests |
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
23 changes: 0 additions & 23 deletions
23
playbooks/ansible/roles/client.prep/templates/test-info.yml.j2
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
playbooks/ansible/roles/test.sit-test-cases/templates/test-info.yml.j2
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,20 @@ | ||
server: {{ public_interfaces[0] }} | ||
|
||
users: | ||
{%- for name in config.accounts +%} | ||
{%- for user_name in config.accounts[name].users +%} | ||
{%- set user = config.accounts[name].users[user_name] +%} | ||
{%- if user.samba +%} | ||
{{ user_name }}: {{ user.password }} | ||
{%- endif +%} | ||
{%- endfor +%} | ||
{%- endfor +%} | ||
|
||
backend: {{ test_backend }} | ||
|
||
shares: | ||
{%- for share in sharenames +%} | ||
{{ share }}-{{ config.be.name }}-{{ config.be.variant }}: | ||
backend: | ||
path: {{ config.paths.mount }}/backends/{{ share }} | ||
{%- endfor +%} |
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.
You could put it directly in
/root/sit-test-cases/test-info.yml
and avoid the symlink creation.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.
I am trying to remember why I did it like this. I think I did it for re-use. ie. in case other testing projects wanted to make use of the information in that config file.
Another advantage is in a devel environment where we want to delete the whole sit-test-cases repo and redo the folder, it is easier if the configuration is outside the directory.
If it isn't too much of an issue, can we leave it as it is?
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.
Maybe it was a simple case of the repo being pulled after the test-info.yml file was created and hence the conf file wasn't created inside the repo . :) but the points above still hold.
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.
The contents of the file are very sit-test-cases specific (that's why I suggested moving it inside the test.sit-test-cases role), so it's unlikely that it will be reused by other tests. Each test can create it's own custom configuration if required.
You still need to re-run the playbook to recreate the symlink. It's true that you can do it manually, though.
Yes, it's not a big problem, and it's contained all inside the
test.sit-test-cases
role, so if you prefer to keep it this way, I'm ok with that.