diff --git a/pkg/commands/compute/testdata/init/fastly-viceroy-update.toml b/pkg/commands/compute/testdata/init/fastly-viceroy-update.toml index 9cb3214cf..4da39d820 100644 --- a/pkg/commands/compute/testdata/init/fastly-viceroy-update.toml +++ b/pkg/commands/compute/testdata/init/fastly-viceroy-update.toml @@ -45,3 +45,14 @@ qux""" [[local_server.object_store.store_two]] key = "second" path = "strings.json" + + [local_server.secret_store] + store_one = [{key = "first", data = "This is some secret data"}, {key = "second", path = "/path/to/secret.json"}] + + [[local_server.secret_store.store_two]] + key = "first" + data = "This is also some secret data" + + [[local_server.secret_store.store_two]] + key = "second" + path = "/path/to/other/secret.json" diff --git a/pkg/manifest/manifest.go b/pkg/manifest/manifest.go index 06df46be2..f8ddcc3db 100644 --- a/pkg/manifest/manifest.go +++ b/pkg/manifest/manifest.go @@ -252,6 +252,7 @@ type LocalServer struct { Backends map[string]LocalBackend `toml:"backends"` Dictionaries map[string]LocalDictionary `toml:"dictionaries,omitempty"` ObjectStore map[string][]LocalObjectStore `toml:"object_store,omitempty"` + SecretStore map[string][]LocalSecretStore `toml:"secret_store,omitempty"` } // LocalBackend represents a backend to be mocked by the local testing server. @@ -276,6 +277,13 @@ type LocalObjectStore struct { Data string `toml:"data,omitempty"` } +// LocalSecretStore represents a secret_store to be mocked by the local testing server. +type LocalSecretStore struct { + Key string `toml:"key"` + Path string `toml:"path,omitempty"` + Data string `toml:"data,omitempty"` +} + // Exists yields whether the manifest exists. // // Specifically, it indicates that a toml.Unmarshal() of the toml disk content diff --git a/pkg/manifest/testdata/fastly-viceroy-update.toml b/pkg/manifest/testdata/fastly-viceroy-update.toml index 9cb3214cf..4da39d820 100644 --- a/pkg/manifest/testdata/fastly-viceroy-update.toml +++ b/pkg/manifest/testdata/fastly-viceroy-update.toml @@ -45,3 +45,14 @@ qux""" [[local_server.object_store.store_two]] key = "second" path = "strings.json" + + [local_server.secret_store] + store_one = [{key = "first", data = "This is some secret data"}, {key = "second", path = "/path/to/secret.json"}] + + [[local_server.secret_store.store_two]] + key = "first" + data = "This is also some secret data" + + [[local_server.secret_store.store_two]] + key = "second" + path = "/path/to/other/secret.json"