Skip to content
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

feat(apply): load template file #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wafuwafu13
Copy link
Contributor

Issue #, if available:

#155 (comment)

[apply] Load template file

  • Load cfn.yaml or cfn.yml or cfn.json in the same hierarchy where the dy command is executed

  • If not exist, exit(1)

command:

~/path/to/foo
$ ls
cfn.yaml

~/path/to/foo
(for now, just checking existence of file)
$ dy admin apply --dev

Description of changes:

  • implement apply function and check_template function
  • mock Path::new(path).exists() for testing

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

let mock_checker = MockPathExistenceChecker::new("cfn.yaml");
apply(&mock_checker)
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test_apply_without_acceptable_file is covered in test/apply.rs#test_apply_with_dev

@StoneDot StoneDot added the enhancement New feature or request label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants