-
Notifications
You must be signed in to change notification settings - Fork 19
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
filter yaml elements #174
filter yaml elements #174
Changes from all commits
2f317dc
4025d3c
61e17b5
5e28ce3
d7c10c9
0aa3834
652254a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
from gitopscli.commands.sync_apps import SyncAppsCommand | ||
from gitopscli.io_api.yaml_util import merge_yaml_element, yaml_file_load | ||
from gitopscli.gitops_exception import GitOpsException | ||
|
||
from .mock_mixin import MockMixin | ||
|
||
ARGS = SyncAppsCommand.Args( | ||
|
@@ -78,6 +79,9 @@ def setUp(self): | |
"repository": "https://other-team.config.repo.git", | ||
"applications": {"some-other-app-2": None}, | ||
}, | ||
"/tmp/team-config-repo/my-app/values.yaml": { | ||
"config": {"repository": "https://team.config.repo.git", "applications": {"some-other-app-1": None}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there a app/team config yaml in a app/team config repo? We are using app/team config yamls in the root config repo to find app/team config repos: https://baloise.github.io/gitopscli/commands/sync-apps/#root-config-repository There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this implementation answer COP-1705 to have app specific configuration. |
||
}, | ||
}[file_path] | ||
|
||
self.merge_yaml_element_mock = self.monkey_patch(merge_yaml_element) | ||
|
@@ -115,8 +119,19 @@ def test_sync_apps_happy_flow(self): | |
call.GitRepo_root.get_full_file_path("apps/other-team-non-prod.yaml"), | ||
call.yaml_file_load("/tmp/root-config-repo/apps/other-team-non-prod.yaml"), | ||
call.logging.info("Sync applications in root repository's %s.", "apps/team-non-prod.yaml"), | ||
call.GitRepo_team.get_full_file_path("my-app/values.yaml"), | ||
call.yaml_file_load("/tmp/team-config-repo/my-app/values.yaml"), | ||
call.merge_yaml_element( | ||
"/tmp/root-config-repo/apps/team-non-prod.yaml", "config.applications", {"my-app": {}} | ||
"/tmp/root-config-repo/apps/team-non-prod.yaml", | ||
"config.applications", | ||
{ | ||
"my-app": { | ||
"config": { | ||
"repository": "https://team.config.repo.git", | ||
"applications": {"some-other-app-1": None}, | ||
} | ||
} | ||
}, | ||
), | ||
call.GitRepo_team.get_author_from_last_commit(), | ||
call.GitRepo_root.commit("GIT_USER", "GIT_EMAIL", "author updated apps/team-non-prod.yaml"), | ||
|
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.
This list is always empty
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 list is set in case of keywords that would need to be removed. by default it's empty and allow all keywords.