Skip to content

Commit

Permalink
Update version to 8.0.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Shvedun committed Dec 13, 2024
1 parent dda65b3 commit 4850ff4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions clio.tests/Command/UploadLicensesCommand.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public void TestProceedResponse_ResponseWithoutSuccessProperty_DoesNotThrow() {
var options = new UploadLicensesOptions();
Assert.DoesNotThrow(() => _command.TestProceedResponse(response, options));
}

[Test]
public void TestProceedResponse_AuthenticationFailed_ThrowsLicenseInstallationException() {
var response = "{\"Message\":\"Authentication failed.\",\"StackTrace\":null,\"ExceptionType\":\"System.InvalidOperationException\"}";
var options = new UploadLicensesOptions();
var ex = Assert.Throws<LicenseInstallationException>(() =>
_command.TestProceedResponse(response, options));
Assert.That(ex.Message, Is.EqualTo("License not installed: Authentication failed."));
}
}

public class UploadLicensesCommandTestable : UploadLicensesCommand
Expand Down
5 changes: 4 additions & 1 deletion clio/Command/UploadLicensesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ protected override void ProceedResponse(string response, UploadLicensesOptions o
}
throw new LicenseInstallationException("License not installed: Unknown error details");
}
base.ProceedResponse(response, options);
if (response.ToLower().Contains("authentication failed")) {
throw new LicenseInstallationException("License not installed: Authentication failed.");
}
base.ProceedResponse(response, options);
}
}

Expand Down
2 changes: 1 addition & 1 deletion clio/clio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Authors>creatio rnd team</Authors>
<PackageTags>cli ATF clio creatio</PackageTags>
<NeutralLanguage>en</NeutralLanguage>
<AssemblyVersion>8.0.1.8</AssemblyVersion>
<AssemblyVersion>8.0.1.9</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<Description>CLI interface for Creatio</Description>
Expand Down

0 comments on commit 4850ff4

Please sign in to comment.