diff --git a/server/datastore/mysql/software_installers_test.go b/server/datastore/mysql/software_installers_test.go index fa78e7bbab13..49be5c29c220 100644 --- a/server/datastore/mysql/software_installers_test.go +++ b/server/datastore/mysql/software_installers_test.go @@ -1135,7 +1135,7 @@ func testGetOrGenerateSoftwareInstallerTitleID(t *testing.T, ds *Datastore) { }, }, { - name: "title that already exists, bundle identifier in payload", + name: "title that already exists, mismatched bundle identifier in payload", payload: &fleet.UploadSoftwareInstallerPayload{ Title: "Existing Title", Source: "apps", @@ -1149,6 +1149,14 @@ func testGetOrGenerateSoftwareInstallerTitleID(t *testing.T, ds *Datastore) { Source: "apps", }, }, + { + name: "title that already exists, no bundle identifier in DB, bundle identifier in payload", + payload: &fleet.UploadSoftwareInstallerPayload{ + Title: "Existing Title Without Bundle", + Source: "apps", + BundleIdentifier: "com.new.bundleid", + }, + }, { name: "title that doesn't exist, no bundle identifier in payload", payload: &fleet.UploadSoftwareInstallerPayload{ diff --git a/server/datastore/mysql/vpp_test.go b/server/datastore/mysql/vpp_test.go index 6cb4cf3d9075..78cab8acba22 100644 --- a/server/datastore/mysql/vpp_test.go +++ b/server/datastore/mysql/vpp_test.go @@ -1255,6 +1255,14 @@ func testGetOrInsertSoftwareTitleForVPPApp(t *testing.T, ds *Datastore) { BundleIdentifier: "", }, }, + { + name: "title that already exists, no bundle identifier in DB, bundle identifier in payload", + app: &fleet.VPPApp{ + Name: "Existing Title Without Bundle", + LatestVersion: "0.0.3", + BundleIdentifier: "new.bundle.id", + }, + }, { name: "title that doesn't exist, no bundle identifier in payload", app: &fleet.VPPApp{