-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fail hard when C# and VB.NET plugins are missing on the server #1787
Fail hard when C# and VB.NET plugins are missing on the server #1787
Conversation
// Arrange | ||
var localCacheDir = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext); | ||
var logger = new TestLogger(); | ||
|
||
var request1 = new Plugin("no.matching.resource.plugin", "2.0", "non.existent.resource.zip"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed: no matching plugin is causing hard failure (already tested in EmbeddedInstall_MissingResource_ThrowFileNotFoundException
).
@@ -95,6 +80,7 @@ public void EmbeddedInstall_SinglePlugin_SingleResource_Succeeds() | |||
var actualFiles = testSubject.InstallAssemblies(new Plugin[] { requestedPlugin }); | |||
|
|||
// Assert | |||
logger.AssertInfoLogged("Processing plugin: plugin1 version 1.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assertion moved from InstallAssemblies_ValidPlugins_PluginsVersionLogInfo
.
The previous test was not feasible anymore due to the introduction of the new exception being thrown when plugins are missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There is a Code Smell failing the Quality Gate, that needs attention.
{ | ||
const string missingPluginKey = "missingPlugin"; | ||
const string missingPluginVersion = "1.0"; | ||
const string missingPluginResource = "resource.txt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal opinion: I liked could.be.anything
. It conveys the information that the name of the plugin resource is not relevant for the test... and could be anything!
Kudos, SonarCloud Quality Gate passed! |
As discussed offline, the Code Smell mentioned above (new link here) has been solved as "Won't fix" with the following reasoning:
@cristian-ambrosini-sonarsource CI can be re-run. |
Fixes #1475