cmd: dagger input edit -> dagger edit

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-06-15 14:20:55 +02:00 committed by Solomon Hykes
parent 325c843924
commit 5f849bb13e
5 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
package input
package cmd
import (
"context"
@ -19,7 +19,7 @@ import (
var editCmd = &cobra.Command{
Use: "edit",
Short: "Interactively edit the inputs of an environment",
Short: "Interactively edit an environment",
Args: cobra.MaximumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
// Fix Viper bug for duplicate flags:

View File

@ -20,7 +20,6 @@ var Cmd = &cobra.Command{
func init() {
Cmd.AddCommand(
editCmd,
dirCmd,
gitCmd,
containerCmd,

View File

@ -40,6 +40,7 @@ func init() {
queryCmd,
upCmd,
downCmd,
editCmd,
historyCmd,
loginCmd,
logoutCmd,

View File

@ -10,7 +10,9 @@ import (
func TestLocalDirs(t *testing.T) {
st := &state.State{
Path: "/tmp/source",
Plan: "/tmp/source/plan",
Plan: state.Plan{
Module: "/tmp/source/plan",
},
}
require.NoError(t, st.SetInput("www.source", state.DirInput("/", []string{}, []string{})))

View File

@ -27,7 +27,7 @@ func TestWorkspace(t *testing.T) {
require.Equal(t, root, workspace.Path)
// Create
st, err := workspace.Create(ctx, "test")
st, err := workspace.Create(ctx, "test", "", "")
require.NoError(t, err)
require.Equal(t, "test", st.Name)
@ -73,7 +73,7 @@ func TestEncryption(t *testing.T) {
workspace, err := Init(ctx, root)
require.NoError(t, err)
_, err = workspace.Create(ctx, "test")
_, err = workspace.Create(ctx, "test", "", "")
require.NoError(t, err)
// Set a plaintext input, make sure it is not encrypted