MCPcopy Index your code
hub / github.com/getsops/sops / TestLoadConfigFile

Function TestLoadConfigFile

config/config_test.go:432–458  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

430}
431
432func TestLoadConfigFile(t *testing.T) {
433 expected := configFile{
434 CreationRules: []creationRule{
435 {
436 PathRegex: "foobar*",
437 KMS: "1",
438 PGP: "2",
439 GCPKMS: "3",
440 HCKms: []string{"tr-west-1:test-key-1"},
441 VaultURI: "http://4:8200/v1/4/keys/4",
442 },
443 {
444 PathRegex: "",
445 KMS: "foo",
446 PGP: "bar",
447 GCPKMS: "baz",
448 HCKms: []string{"tr-west-1:test-key-2"},
449 VaultURI: "http://127.0.1.1/v1/baz/keys/baz",
450 },
451 },
452 }
453
454 conf := configFile{}
455 err := conf.load(sampleConfig)
456 assert.Nil(t, err)
457 assert.Equal(t, expected, conf)
458}
459
460func TestLoadConfigFileWithGroups(t *testing.T) {
461 bam := "bam"

Callers

nothing calls this directly

Calls 1

loadMethod · 0.95

Tested by

no test coverage detected