Skip to content

Commit

Permalink
formatted files
Browse files Browse the repository at this point in the history
Signed-off-by: Smyja <akposlive59@gmail.com>
  • Loading branch information
smyja committed Jun 29, 2023
1 parent a695a2e commit 8bb7913
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions plugins/render/api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func APIKey() schema.CredentialType {
},
},
DefaultProvisioner: provision.TempFile(renderConfig, provision.AtFixedPath("~/.render/config.yaml")),
Importer: TryRenderConfigFile(),
Importer: TryRenderConfigFile(),
}
}

Expand All @@ -53,7 +53,7 @@ func renderConfig(in sdk.ProvisionInput) ([]byte, error) {
},
},
}

contents, err := yaml.Marshal(&config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -83,4 +83,3 @@ func TryRenderConfigFile() sdk.Importer {
}
})
}

4 changes: 1 addition & 3 deletions plugins/render/api_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ func TestAPIKeyProvisioner(t *testing.T) {
},
ExpectedOutput: sdk.ProvisionOutput{
Files: map[string]sdk.OutputFile{
"~/.render/config.yaml":{
"~/.render/config.yaml": {
Contents: []byte(plugintest.LoadFixture(t, "config.yaml")),
},
},
},
},

})
}


func TestAPIKeyImporter(t *testing.T) {
plugintest.TestImporter(t, APIKey().Importer, map[string]plugintest.ImportCase{
"config file": {
Expand Down
4 changes: 3 additions & 1 deletion plugins/render/test-fixtures/config.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
apiKey: rnd_Z7xMKp4NX1FoQNRyBpZs9yxDbu3i
profiles:
default:
apiKey: rnd_Z7xMKp4NX1FoQNRyBpZs9yxDbu3i

0 comments on commit 8bb7913

Please sign in to comment.