• 17 Posts
  • 98 Comments
Joined 1 year ago
cake
Cake day: October 14th, 2023

help-circle
  • You are probably right and I just misunderstood fixtures / collections and how they work. I am now trying to configure it using postgres testcontainers and just letting each test create its own but facing a bunch of other issues so not even sure how this works anymore, seems like every tutorial has a different approach. Some just put all the code for creating containers in the setup/dispose of the test class itself instead of trying to be smart with the WebApplicationFactory fixtures and maybe I just end up doing that


  • My first intent was to just have one local sqlite test db that would get reset to empty state before the tests run (EnsureDeleted+EnsureCreated), and then they all run concurrently on it. It sounded simple to setup and simple enough for my small crud app that only had a few tests.

    My second intent was for the framework to create a new in-memory sqlite db for each test so I could fix the problem with tests failing when I’d run all of them at the same time, presumably because they all referenced the same db.

    I am currently trying to complicate my life further in the hopes it helps with this by using a postgres database instead, and then in the IntegrationTests project I’m using TestContainers to get a PostgreSqlContainer. I am currently suffering because of some change I made so my tests aren’t even being found anymore now, despite being listed in the test explorer when I run them I get “Test discovery finished: 0 Tests found” in output. Honestly I think I’m just gonna give up integration testing like this, it’s been a complete waste of time so far.

    Dunno what else I could say about my project that is relevant, it’s a standard webapp crud with 2 controllers and the integration tests projects has facts like this. Very basic stuff I’d say. Unit tests are a separate project and will just be for simple method checks, no mocking (or at least as little as possible)


  • Configuring a DbContextFactory in the WebAppFactory instead of a DbContext breaks my services, they can’t resolve DbContext anymore so all requests from my test classes fail. Either I misunderstood you or how this works, but it makes sense - I need to properly fix the injectable DbContext so it fixes it everywhere and not just add a DbContextFactory for test classes while the actual code still injects a DbContext.

    Configuring the DbConnection service scope as Transient didn’t change anything.

    I might consider efficiency and speed later but for now I’d be happy to just get it working on this simple CRUD app with 2 test classes, I’ve spend hours trying various google solutions and I’m a bit frustrated there is no simple guide for something that should be so seemingly simple at this point.




  • This whole thing is just a nice reminder to not go overboard and use a 3rd party library when it’s completely unnecessary. I never had a need to use sth like fluent validations when you can do pretty much the same thing by writing the validation method directly in your Dto, it’s a bit verbose but at least it also lets you have more control over the whole thing. Maybe I just never used it on a scale enough to justify the library but it seems completely superfluous, dunno


  • CynotoProgrammer HumorNext month is gonna be rough
    link
    fedilink
    arrow-up
    5
    ·
    3 months ago

    So, we all agree this is obvious rage-bait and just trolling? Nobody is actually believing this is true or that anyone feels like that, or even if they do that they need to be acknowledged and validated by addressing such a ridiculous claim?

    Right…? Don’t feed the trolls is the OG internet rule, I wish it weren’t forgotten…


  • I only used obsidian for a few weeks so i didnt get that used to it, but what you mean could be the mental switch from hierarchical file structure in obsidian to logseq’s journaling/time based one? You’re supposed to organize data with tags rather than remembering their location and structure in folders. I spend most time searching for tags, not specific files, and in that way it’s functional enough for me, although I do not really understand the query syntax yet so I am unable to create more complex searches in this way. Tbh I’m hoping the sqllite switch lets me just write direct SQL

    For a specific example, instead of having folders like Software > Programming > csharp > my projects > projectx … I will just have a page for the project that has tags #programming #csharp #myprojects etc. And then I can search for #myproject and see all relevant info for it, even sorted by the date when i added it which adds some nice historical context



  • It’s no reddit in terms of quantity but honesty I’ve had higher quality topics and discussions here than there. Lemmy/kbin might not have taken off in the mainstream to offer a variety of subjects but when it comes to tech and software I think it’s covered well enough and people are generally nicer about it. The main problem is lack of (remotely) good seach function, I dont think the threads are getting indexed by google and the on-site search is atrocious.

    I don’t know of any discord programming communities, I wish forums were still a thing but the only live one I know of is the jellyfin one after they moved from reddit. Other than that it’s here or the various subreddits












  • CynotoVS CodeA real free alternative to Git Graph
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    I was aware of some people trying to get it working on wine but last I checked it wasn’t really going anywhere, there were some big blockers there, and I didn’t know the developers were interested in it at all.

    Fork and VS are probably the top 2 pieces of software I’m missing to fully migrate to linux so I’d be very happy if they developed an official port that works as well as it does on win.



  • CynoOPtolinux4noobsWhat exactly is GNOME?
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    5 months ago

    I guess I just don’t trust myself (or the system) to keep stuff organized unless I do it meticulously myself from the start in a neat hierarchy. I’ll try to use search more often since it does seem fast and sleek and see how it works out. The only annoying part about it is that it always defaults to my primary display for search even if im focused on the second monitor

    Do you know of a good guide on how to use search better, like can I narrow so it only shows files and folders, or maybe match to a regex like *.js? it doesn’t really find specific files when i search for them, is it supposed to work with other mounted drives as well?

    gnome-shell-pano looks great but is it abandoned? It says my current (newest i assume) gnome shell version is not supported by the extension. Does it open the paste window where your mouse focus is (and on the correct monitor if you have more than one)? CH always opens it on the main display even if i’m focused on the secondary, its horrible…

    I found I already have an installed gnome extension ‘hot edge’ that is supposed to do dock opening when hitting the edge, although i do have issues with it sometimes not triggering, it seems very focus sensitive but it’s definitely better than nothing.

    It’s definitely an interesting experience and I don’t want it to replicate windows, but i guess i need to come to terms with some design decisions that will feel unnatural after using windows for almost 20 years now.