-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improve Install of targets / crash Install on Databasetarget. #2103
Conversation
Null check in Install to ensure that the ConnectionType has been set.
Codecov Report
@@ Coverage Diff @@
## master #2103 +/- ##
=======================================
+ Coverage 81% 81% +<1%
=======================================
Files 289 289
Lines 19957 19964 +7
Branches 2360 2361 +1
=======================================
+ Hits 16176 16234 +58
+ Misses 3175 3126 -49
+ Partials 606 604 -2 |
Btw, should my unit test run in Travis? I assumed that the other sql test that I "took inspiration" from is not run in Travis for a reason so I used the same if-case to disable it. |
thanks! AFAIK Travis doesn't have a SQL service? If it has, it would be great to enable (I'm an other pull request ;) |
More info is here: https://docs.travis-ci.com/user/database-setup/ |
Thanks! this a great improvement. But I was thinking, isn't easier to do something like this? public void Install(InstallationContext installationContext) {
if(!IsInitialized)
{
InitializeTarget();
}
...
} |
Yes, it would. I was concerned about any side effects of calling the base.InitializeTarget() that contains calls to a FindAllLayouts() method. I guess it would cause the layouts to be loaded? |
Indeed the side effect is less clear. So for now this is good enough, thanks! |
Awesome. I think I'll look for another issue to do now. Or should I maybe create an mysql version of the install tests so it can be tested in Travis too? |
That would be great also to have! |
Fixed in 4.4.10 and the release is queued. Will be online in a few hours! Thanks for the submit! |
Awesome. |
Just send a PR. Would be great to have! |
My first PR so I hope I got everything right.
Fixes #1098