toast-cli 4.1.1__tar.gz → 4.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {toast_cli-4.1.1 → toast_cli-4.1.2}/PKG-INFO +1 -1
  2. toast_cli-4.1.2/VERSION +1 -0
  3. {toast_cli-4.1.1 → toast_cli-4.1.2}/tests/test_storage.py +18 -0
  4. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/storage.py +1 -1
  5. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/PKG-INFO +1 -1
  6. toast_cli-4.1.1/VERSION +0 -1
  7. {toast_cli-4.1.1 → toast_cli-4.1.2}/.mergify.yml +0 -0
  8. {toast_cli-4.1.1 → toast_cli-4.1.2}/ARCHITECTURE.md +0 -0
  9. {toast_cli-4.1.1 → toast_cli-4.1.2}/LICENSE +0 -0
  10. {toast_cli-4.1.1 → toast_cli-4.1.2}/MANIFEST.in +0 -0
  11. {toast_cli-4.1.1 → toast_cli-4.1.2}/README.md +0 -0
  12. {toast_cli-4.1.1 → toast_cli-4.1.2}/pyproject.toml +0 -0
  13. {toast_cli-4.1.1 → toast_cli-4.1.2}/setup.cfg +0 -0
  14. {toast_cli-4.1.1 → toast_cli-4.1.2}/setup.py +0 -0
  15. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/__init__.py +0 -0
  16. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/__main__.py +0 -0
  17. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/helpers.py +0 -0
  18. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/__init__.py +0 -0
  19. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/am_plugin.py +0 -0
  20. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/base_plugin.py +0 -0
  21. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/cdw_plugin.py +0 -0
  22. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/ctx_plugin.py +0 -0
  23. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/dot_plugin.py +0 -0
  24. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/env_plugin.py +0 -0
  25. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/git_plugin.py +0 -0
  26. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/prompt_plugin.py +0 -0
  27. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/region_plugin.py +0 -0
  28. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/ssm_plugin.py +0 -0
  29. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast/plugins/utils.py +0 -0
  30. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/SOURCES.txt +0 -0
  31. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/dependency_links.txt +0 -0
  32. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/entry_points.txt +0 -0
  33. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/not-zip-safe +0 -0
  34. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/requires.txt +0 -0
  35. {toast_cli-4.1.1 → toast_cli-4.1.2}/toast_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toast-cli
3
- Version: 4.1.1
3
+ Version: 4.1.2
4
4
  Summary: A Python-based CLI utility with a plugin architecture for AWS, Kubernetes, Git, and more
5
5
  Home-page: https://github.com/opspresso/toast-cli
6
6
  Author: nalbam
@@ -0,0 +1 @@
1
+ v4.1.2
@@ -230,6 +230,24 @@ class AwsCommandTests(unittest.TestCase):
230
230
  cmd = storage._aws(cfg, ["ssm", "get-parameter"])
231
231
  self.assertEqual(cmd[cmd.index("--region") + 1], "us-west-2")
232
232
 
233
+ def test_s3_put_uses_kms_server_side_encryption(self):
234
+ cfg = storage.StoreConfig("b", "p", None, None)
235
+ captured = {}
236
+
237
+ def fake_run(cmd, **kw):
238
+ captured["cmd"] = cmd
239
+ return mock.Mock(returncode=0, stdout="{}", stderr="")
240
+
241
+ with mock.patch.object(storage.subprocess, "run", side_effect=fake_run):
242
+ ok, err = storage.s3_put(cfg, "local/o/p/env-local", "data")
243
+
244
+ self.assertTrue(ok)
245
+ cmd = captured["cmd"]
246
+ self.assertIn("--server-side-encryption", cmd)
247
+ self.assertEqual(cmd[cmd.index("--server-side-encryption") + 1], "aws:kms")
248
+ # '--sse' is not a valid s3api option (it is the high-level `aws s3` shorthand)
249
+ self.assertNotIn("--sse", cmd)
250
+
233
251
  def test_ssm_get_passes_profile_and_region(self):
234
252
  cfg = storage.StoreConfig("b", "myprofile", None, "eu-west-1")
235
253
  with mock.patch.object(
@@ -353,7 +353,7 @@ def s3_put(config, key, content):
353
353
  key,
354
354
  "--body",
355
355
  tmp,
356
- "--sse",
356
+ "--server-side-encryption",
357
357
  "aws:kms",
358
358
  "--output",
359
359
  "json",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toast-cli
3
- Version: 4.1.1
3
+ Version: 4.1.2
4
4
  Summary: A Python-based CLI utility with a plugin architecture for AWS, Kubernetes, Git, and more
5
5
  Home-page: https://github.com/opspresso/toast-cli
6
6
  Author: nalbam
toast_cli-4.1.1/VERSION DELETED
@@ -1 +0,0 @@
1
- v4.1.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes