Skip to content

Commit bb92ab7

Browse files
authored
Rteco 1539 cargo implementation phase 1 (#399)
1 parent 7c983a1 commit bb92ab7

9 files changed

Lines changed: 1614 additions & 0 deletions

File tree

entities/buildinfo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const (
5050
Uv ModuleType = "uv"
5151
Gem ModuleType = "gem"
5252
Apk ModuleType = "apk"
53+
Cargo ModuleType = "cargo"
5354
)
5455

5556
type BuildInfo struct {

entities/buildinfo_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,3 +569,9 @@ func TestBuildInfoAppend_MavenSnapshotScenario(t *testing.T) {
569569
assert.Len(t, buildInfo1.Modules[0].Artifacts, 1, "Should have 1 artifact")
570570
assert.Equal(t, "deploy-sha", buildInfo1.Modules[0].Artifacts[0].Sha1, "Should have newer SHA1")
571571
}
572+
573+
func TestCargoModuleType(t *testing.T) {
574+
if Cargo != "cargo" {
575+
t.Fatalf("expected Cargo module type to be %q, got %q", "cargo", Cargo)
576+
}
577+
}

0 commit comments

Comments
 (0)