Disable push config usage in test plugin

This commit is contained in:
Chris Roberts 2022-06-15 12:49:22 -07:00
parent eb5c970b94
commit 9b355854f0

View File

@ -2,6 +2,7 @@ package push
import (
"encoding/json"
"fmt"
"github.com/hashicorp/vagrant-plugin-sdk/component"
"github.com/hashicorp/vagrant-plugin-sdk/core"
@ -51,16 +52,17 @@ func (e *Encouragement) Push(ui terminal.UI, proj core.Project) error {
// For now, there are no config related helpers, so each push plugin needs to
// walk its way down to its relevant config in the Vagrantfile.
func findPushConfig(proj core.Project, name string) (*vagrant_plugin_sdk.Vagrantfile_PushConfig, error) {
v, err := proj.Config()
if err != nil {
return nil, err
}
for _, p := range v.GetPushConfigs() {
if p.GetName() == name {
return p, nil
}
}
return nil, nil
return nil, fmt.Errorf("unimplemented")
// v, err := proj.Config()
// if err != nil {
// return nil, err
// }
// for _, p := range v.GetPushConfigs() {
// if p.GetName() == name {
// return p, nil
// }
// }
// return nil, nil
}
// unpackConfig takes a PushConfig and unpack the underlying map of config