Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix attachment uri in trx if same attachment filename is same #1625

Merged
merged 7 commits into from
Jun 4, 2018

Conversation

smadala
Copy link
Contributor

@smadala smadala commented May 31, 2018

  • Update the attachment filename with targetFilename while moving all the attachments to one directory for trx report.

Fixes: #1626

@@ -148,6 +148,11 @@ public static TrxObjectModel.TestOutcome ToOutcome(ObjectModel.TestOutcome rockS

public static List<CollectorDataEntry> ToCollectionEntries(IEnumerable<ObjectModel.AttachmentSet> attachmentSets, TestRun testRun, string trxFileDirectory)
{
if (EqtTrace.IsInfoEnabled)
{
EqtTrace.Info($"Converter.ToCollectionEntries: Converting attachmentSets {string.Join(",", attachmentSets)} to collection entries.");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attachmentSets null check is below and here we are printing before null check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. added null check.


public override string ToString()
{
return $"{nameof(Uri)}: {Uri.AbsoluteUri}, {nameof(DisplayName)}: {DisplayName}, {nameof(Attachments)}: [{ string.Join(",", Attachments)}]";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can Uri be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about that. However we are using AbsoluteUri in other places without any check. Not adding null check here.

@smadala
Copy link
Contributor Author

smadala commented Jun 1, 2018

@dotnet-bot test this please.

@smadala
Copy link
Contributor Author

smadala commented Jun 1, 2018

@dotnet-bot test this please

@smadala smadala closed this Jun 1, 2018
@smadala smadala reopened this Jun 1, 2018
@smadala
Copy link
Contributor Author

smadala commented Jun 4, 2018

@dotnet-bot test Ubuntu14.04 / Debug Build

@smadala smadala merged commit 94d475f into microsoft:master Jun 4, 2018
@smadala smadala deleted the fix-trx-wrong-uri branch June 4, 2018 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants