diff --git a/src/LCT.PackageIdentifier.UTest/MavenParserTests.cs b/src/LCT.PackageIdentifier.UTest/MavenParserTests.cs index e531690c..fd05faeb 100644 --- a/src/LCT.PackageIdentifier.UTest/MavenParserTests.cs +++ b/src/LCT.PackageIdentifier.UTest/MavenParserTests.cs @@ -87,14 +87,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData_Succes component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -123,14 +123,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData2_Succe component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common_license-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -161,14 +161,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData3_Succe }; var components = new List() { component1 }; ComponentIdentification componentIdentification = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = {"internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -199,14 +199,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_ReturnsWithData_SuccessFully() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Maven = new Common.Model.Config() { JfrogMavenRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -238,14 +238,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_ReturnsWithData2_SuccessFully( Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Maven = new Common.Model.Config() { JfrogMavenRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; diff --git a/src/LCT.PackageIdentifier.UTest/NpmProcessorUTest.cs b/src/LCT.PackageIdentifier.UTest/NpmProcessorUTest.cs index abee7c62..3d8466e1 100644 --- a/src/LCT.PackageIdentifier.UTest/NpmProcessorUTest.cs +++ b/src/LCT.PackageIdentifier.UTest/NpmProcessorUTest.cs @@ -31,14 +31,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData_Succes component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -67,14 +67,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData2_Succe component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common_license-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -105,14 +105,14 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData3_Succe }; var components = new List() { component1 }; ComponentIdentification componentIdentification = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo1" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -143,14 +143,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_ReturnsWithData_SuccessFully() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo1" }; CommonAppSettings appSettings = new(); appSettings.Npm = new Common.Model.Config() { JfrogNpmRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -182,14 +182,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_ReturnsWithData2_SuccessFully( Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Npm = new Common.Model.Config() { JfrogNpmRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; diff --git a/src/LCT.PackageIdentifier.UTest/NugetParserTests.cs b/src/LCT.PackageIdentifier.UTest/NugetParserTests.cs index 97de4054..97fa772c 100644 --- a/src/LCT.PackageIdentifier.UTest/NugetParserTests.cs +++ b/src/LCT.PackageIdentifier.UTest/NugetParserTests.cs @@ -230,14 +230,14 @@ public async Task IdentificationOfInternalComponents_Nuget_ReturnsComponentData_ component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo1" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -267,14 +267,14 @@ public async Task IdentificationOfInternalComponents_Nuget_ReturnsComponentData2 component1.Version = "1.0.0"; var components = new List() { component1 }; ComponentIdentification component = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common_license-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -305,14 +305,15 @@ public async Task IdentificationOfInternalComponents_ReturnsComponentData3_Succe }; var components = new List() { component1 }; ComponentIdentification componentIdentification = new() { comparisonBOMData = components }; - string[] reooListArr = { "energy-dev-npm-egll", "energy-release-npm-egll" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new() { InternalRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "energy-dev-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" + }; List results = new List() { aqlResult }; @@ -343,14 +344,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_ReturnsWithData_SuccessFully() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new LCT.Common.Model.Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -382,14 +383,14 @@ public async Task GetJfrogRepoDetailsOfAComponent_Nuget_ReturnsWithData2_Success Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = {"internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -421,14 +422,14 @@ public async Task GetArtifactoryRepoName_Nuget_ReturnsRepoName_SuccessFully() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = {"internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new List() { aqlResult }; @@ -460,14 +461,14 @@ public async Task GetArtifactoryRepoName_Nuget_ReturnsRepoName_ReturnsFailure() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = {"internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animation-test-1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new () { aqlResult }; @@ -499,14 +500,14 @@ public async Task GetArtifactoryRepoName_Nuget_ReturnsRepoName_ReturnsSuccess() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = {"internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animations-common.1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new() { aqlResult }; @@ -524,7 +525,8 @@ public async Task GetArtifactoryRepoName_Nuget_ReturnsRepoName_ReturnsSuccess() var reponameActual = actual.First(x => x.Properties[0].Name == "internal:siemens:clearing:repo-url").Properties[0].Value; - Assert.That("siparty-release-npm-egll", Is.EqualTo(reponameActual)); + + Assert.That("internalrepo1", Is.EqualTo(reponameActual)); } [Test] public async Task GetArtifactoryRepoName_Nuget_ReturnsNotFound_ReturnsFailure() @@ -538,14 +540,14 @@ public async Task GetArtifactoryRepoName_Nuget_ReturnsNotFound_ReturnsFailure() Version = "1.0.0" }; var components = new List() { component1 }; - string[] reooListArr = { "siparty-release-npm-egll", "org1-npmjs-npm-remote-cache" }; + string[] reooListArr = { "internalrepo1", "internalrepo2" }; CommonAppSettings appSettings = new(); appSettings.Nuget = new Config() { JfrogNugetRepoList = reooListArr }; AqlResult aqlResult = new() { Name = "animation-common.1.0.0.nupkg", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", - Repo = "siparty-release-npm-egll" + Path = "@testfolder/-/folder", + Repo = "internalrepo1" }; List results = new() { aqlResult }; diff --git a/src/LCT.Services.UTest/JFrogServiceUTest.cs b/src/LCT.Services.UTest/JFrogServiceUTest.cs index 1df98a90..4a4a81b9 100644 --- a/src/LCT.Services.UTest/JFrogServiceUTest.cs +++ b/src/LCT.Services.UTest/JFrogServiceUTest.cs @@ -29,8 +29,8 @@ public async Task GetInternalComponentDataByRepo_GetsRepoInfo_Successfully() AqlResult aqlResult = new AqlResult() { - Name = "saap-api-node-2.26.3-LicenseClearing.16.sha-058fada.tgz", - Path = "@siemens-gds/saap-api-node/-/@siemens-gds", + Name = "api-node-2.26.3-LicenseClearing.16.sha-058fada.tgz", + Path = "@testfolder/-/folder", Repo = "energy-dev-npm-egll" }; diff --git a/src/TestUtilities/appSettingsSW360IntegrationTest.json b/src/TestUtilities/appSettingsSW360IntegrationTest.json index f70d4157..5ea55547 100644 --- a/src/TestUtilities/appSettingsSW360IntegrationTest.json +++ b/src/TestUtilities/appSettingsSW360IntegrationTest.json @@ -2,7 +2,7 @@ "FossologyURL": "", "RemoveDevDependency": true, "SW360AuthTokenType": "Token", - "SW360ProjectID": "036ec371847b4b199dd21c3494ccb108", + "SW360ProjectID": "0d0e23f6bccb4072be91b5a3462414ad", "SW360ProjectName": "Test", "SW360URL": "", "JfrogNugetDestRepoName": "nuget-test", @@ -12,4 +12,4 @@ "ArtifactoryUploadApiKey": "", "JfrogApi": "", "SW360AuthTokenValue": "" -} \ No newline at end of file +}