diff --git a/pkg/dao/repository_configs.go b/pkg/dao/repository_configs.go index 9881ab7dc..e15c1f5f3 100644 --- a/pkg/dao/repository_configs.go +++ b/pkg/dao/repository_configs.go @@ -1115,6 +1115,8 @@ func ModelToApiFields(repoConfig models.RepositoryConfiguration, apiRepo *api.Re AddedCounts: repoConfig.LastSnapshot.AddedCounts, RemovedCounts: repoConfig.LastSnapshot.RemovedCounts, RepositoryPath: repoConfig.LastSnapshot.RepositoryPath, + RepositoryUUID: repoConfig.UUID, + RepositoryName: repoConfig.Name, } } diff --git a/pkg/dao/repository_configs_test.go b/pkg/dao/repository_configs_test.go index d507f2ea0..ae444a8f5 100644 --- a/pkg/dao/repository_configs_test.go +++ b/pkg/dao/repository_configs_test.go @@ -1102,6 +1102,8 @@ func (suite *RepositoryConfigSuite) TestFetch() { assert.Equal(t, found.Name, fetched.Name) assert.Equal(t, found.Repository.URL, fetched.URL) assert.Equal(t, found.LastSnapshot.UUID, fetched.LastSnapshot.UUID) + assert.Equal(t, found.UUID, fetched.LastSnapshot.RepositoryUUID) + assert.Equal(t, found.Name, fetched.LastSnapshot.RepositoryName) if config.Get().Features.Snapshots.Enabled { assert.Equal(t, testContentPath+"/", fetched.LastSnapshot.URL) @@ -1269,6 +1271,8 @@ func (suite *RepositoryConfigSuite) TestList() { assert.Equal(t, repoConfig.Repository.URL, response.Data[0].URL) assert.Equal(t, repoConfig.LastSnapshot.UUID, response.Data[0].LastSnapshot.UUID) assert.Equal(t, repoConfig.LastSnapshot.RepositoryPath, response.Data[0].LastSnapshot.RepositoryPath) + assert.Equal(t, repoConfig.UUID, response.Data[0].LastSnapshot.RepositoryUUID) + assert.Equal(t, repoConfig.Name, response.Data[0].LastSnapshot.RepositoryName) if config.Get().Features.Snapshots.Enabled { assert.Equal(t, testContentPath+"/", response.Data[0].LastSnapshot.URL) }