MCPcopy
hub / github.com/getsops/sops / TestEncrypt

Function TestEncrypt

sops_test.go:649–737  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

647}
648
649func TestEncrypt(t *testing.T) {
650 branches := TreeBranches{
651 TreeBranch{
652 TreeItem{
653 Key: "foo",
654 Value: "bar",
655 },
656 TreeItem{
657 Key: "baz",
658 Value: TreeBranch{
659 TreeItem{
660 Key: "bar",
661 Value: 5,
662 },
663 },
664 },
665 TreeItem{
666 Key: "bar",
667 Value: false,
668 },
669 TreeItem{
670 Key: "foobar",
671 Value: 2.12,
672 },
673 TreeItem{
674 Key: "barfoo",
675 Value: nil,
676 },
677 },
678 TreeBranch{
679 TreeItem{
680 Key: "foo2",
681 Value: "bar",
682 },
683 },
684 TreeBranch{
685 TreeItem{
686 Key: "foo3",
687 Value: "bar",
688 },
689 },
690 }
691 expected := TreeBranches{
692 TreeBranch{
693 TreeItem{
694 Key: "foo",
695 Value: "a",
696 },
697 TreeItem{
698 Key: "baz",
699 Value: TreeBranch{
700 TreeItem{
701 Key: "bar",
702 Value: "a",
703 },
704 },
705 },
706 TreeItem{

Callers

nothing calls this directly

Calls 1

EncryptMethod · 0.95

Tested by

no test coverage detected