fixed inputs when input target is overriden

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-04-02 16:29:34 -07:00
parent a24dbef0b7
commit d3fc31ab57
5 changed files with 18 additions and 10 deletions

View File

@@ -62,7 +62,7 @@ func TestStoreLookupByPath(t *testing.T) {
st := &DeploymentState{
Name: "test",
}
require.NoError(t, st.AddInput("foo", DirInput("/test/path", []string{})))
require.NoError(t, st.SetInput("foo", DirInput("/test/path", []string{})))
require.NoError(t, store.CreateDeployment(ctx, st))
// Lookup by path
@@ -72,7 +72,7 @@ func TestStoreLookupByPath(t *testing.T) {
require.Equal(t, st.ID, r.ID)
// Add a new path
require.NoError(t, st.AddInput("bar", DirInput("/test/anotherpath", []string{})))
require.NoError(t, st.SetInput("bar", DirInput("/test/anotherpath", []string{})))
require.NoError(t, store.UpdateDeployment(ctx, st, nil))
// Lookup by the previous path