Skip to content

Commit

Permalink
SVR-241: Add org to datacatalog datasetId key (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
katrogan committed Feb 20, 2024
1 parent 8ee9ae0 commit 2d7282d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func DatasetIDToIdentifier(id *datacatalog.DatasetID) *core.Identifier {
if id == nil {
return nil
}
return &core.Identifier{ResourceType: core.ResourceType_DATASET, Name: id.Name, Project: id.Project, Domain: id.Domain, Version: id.Version}
return &core.Identifier{ResourceType: core.ResourceType_DATASET, Name: id.Name, Project: id.Project, Domain: id.Domain, Version: id.Version, Org: id.Org}
}

// With Node-Node relationship this is bound to change. So lets keep it extensible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ func TestEventCatalogMetadata(t *testing.T) {
}

func TestDatasetIDToIdentifier(t *testing.T) {
id := DatasetIDToIdentifier(&datacatalog.DatasetID{Project: "p", Domain: "d", Name: "n", Version: "v"})
id := DatasetIDToIdentifier(&datacatalog.DatasetID{Project: "p", Domain: "d", Name: "n", Version: "v", Org: "o"})
assert.Equal(t, core.ResourceType_DATASET, id.ResourceType)
assert.Equal(t, "n", id.Name)
assert.Equal(t, "p", id.Project)
assert.Equal(t, "d", id.Domain)
assert.Equal(t, "v", id.Version)
assert.Equal(t, "o", id.Org)
}

0 comments on commit 2d7282d

Please sign in to comment.