1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Integration tests running in azure pipelines (#516)

This commit is contained in:
Craig Peterson
2019-07-02 12:32:54 -04:00
committed by GitHub
parent ffc0a10c64
commit 08deda6746
3 changed files with 78 additions and 0 deletions

View File

@@ -42,6 +42,12 @@ type gcloud struct {
// New creates a new gcloud provider
func New(cfg map[string]string, metadata json.RawMessage) (providers.DNSServiceProvider, error) {
// the key as downloaded is json encoded with literal "\n" instead of newlines.
// in some cases (round-tripping through env vars) this tends to get messed up.
// fix it if we find that.
if key, ok := cfg["private_key"]; ok {
cfg["private_key"] = strings.Replace(key, "\\n", "\n", -1)
}
raw, err := json.Marshal(cfg)
if err != nil {
return nil, err