Migrate target host sets -> host sources (#1424)

This follows the same model as https://github.com/hashicorp/boundary/pull/1413

See there and CHANGELOG for more details.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-07-30 08:48:03 -04:00
1 parent 6b78108ecf
commit f8a51b987c
39 files changed
+3385 -964

No files matched your search

+3 -3
View File
@@ -169,10 +169,10 @@ func TestTargetHostSet_ImmutableFields(t *testing.T) {
updateTarget := TestTcpTarget(t, conn, proj.PublicId, testId(t))
updateHset := hsets[1]
_, gotHostSets, _, err := repo.AddTargetHostSets(context.Background(), projTarget.PublicId, 1, []string{hsets[0].PublicId})
_, gotHostSources, _, err := repo.AddTargetHostSources(context.Background(), projTarget.PublicId, 1, []string{hsets[0].PublicId})
require.NoError(t, err)
require.Equal(t, 1, len(gotHostSets))
new, err := NewTargetHostSet(projTarget.PublicId, gotHostSets[0].PublicId)
require.Equal(t, 1, len(gotHostSources))
new, err := NewTargetHostSet(projTarget.PublicId, gotHostSources[0].Id())
require.NoError(t, err)
tests := []struct {