Skip to content

Commit

Permalink
updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ragavareddychalapala committed Feb 6, 2025
1 parent 7638944 commit 23137e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/LCT.Common.UTests/PipelineArtifactUploaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ public void UploadBom_ShouldNotUpload_WhenInUnknownEnvironment()

// Act
PipelineArtifactUploader.UploadBom();
string output = consoleOutput.ToString();
string output = consoleOutput.ToString().Trim();

// Assert
Assert.That(output, Is.Empty);
Assert.AreEqual("Uploading of SBOM is not supported.", output);
}
}
}
3 changes: 1 addition & 2 deletions src/LCT.Common/PipelineArtifactUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public static void UploadLogs()
/// </summary>
public static void UploadBom()
{
EnvironmentType envType = RuntimeEnvironment.GetEnvironment();
LogManager.Shutdown();
EnvironmentType envType = RuntimeEnvironment.GetEnvironment();
if (envType == EnvironmentType.AzurePipeline && !string.IsNullOrEmpty(FileOperations.CatoolBomFilePath) && File.Exists(FileOperations.CatoolBomFilePath))
{
Console.WriteLine($"##vso[artifact.upload containerfolder={BomContainerFolderName};artifactname={BomArtifactFolderName}]{FileOperations.CatoolBomFilePath}");
Expand Down

0 comments on commit 23137e4

Please sign in to comment.