testfixtures
rupy
Our great sponsors
testfixtures | rupy | |
---|---|---|
4 | 31 | |
1,045 | 136 | |
2.7% | - | |
6.6 | 1.1 | |
25 days ago | about 1 year ago | |
Go | Java | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
testfixtures
-
How to mock database calls
I'm the author of https://github.com/go-testfixtures/testfixtures, a library written to make it easier to write tests with a real database and test data. You might want to use it together with docker-compose, for example.
-
Integration tests with Go and testcontainers
To solve the problem we will use testfixtures. Create a folders fixtures и fixtures/storage and put a file users.yaml inside:
-
Mocking database or use a test database
A lot of good suggestions here, I would also take a look at go-testfixtures which allows you to create some simple yaml-based fixture data to use with unit testing. It's quick and easy, but yes can get unwieldy the more you add.
-
Ask HN: What are some tools / libraries you built yourself?
I built an alternative to Make written in Go that is simpler to use and cross-platform: https://taskfile.dev/
Also, a library to write tests with databases for Go: https://github.com/go-testfixtures/testfixtures
rupy
-
Considerations for a long-running Raspberry Pi
I have been running a Raspberry 2 cluster for 10 years: http://host.rupy.se
A few weeks back the first SD card to fail got so corrupted it failed to reboot!
My key learning is use oversized cards, because then the bitcycle will wear slower!
I'm going from 32GB to 256/512/1024!
-
What Kind of Asynchronous Is Right for You?
How this article does not mention SSE, comet or chunking escapes me.
What does their definition of event-driven really look like in practice.
Nobody has a clue.
Here is the ideal event driven system, it's async-to-async: https://github.com/tinspin/rupy/wiki/Fuse
The example is not working because I had to shut down the services for multiple reasons, but the high level of it is that you use 4 (potentially different) threads to do one request/response middle man transaction.
That way you have _zero_ io-wait or idling. I'm surprised nobody has copied this approach since I invented it 10 years ago. I understand why though you need your entire chain to be async and that means rewriting everything and that is a big risk when it's hard to debug.
But if you succeed you can build something that is 10x perf/watt than all other implementations. Which is going to be important when interest rates go higher and crash our entire industry.
-
An unknown Swedish startup’s €3B bid to build a green rival to AWS
The hardware is peaking.
So software is where you can make the difference: http://host.rupy.se
- Sandstorm: Open-source platform for self-hosting web app
-
You Want Modules, Not Microservices
I think we're all confused over the definition. Also one might understand what all the proponents are talking about better if they think about this more as a process and not some technological solution:
https://github.com/tinspin/rupy/wiki/Process
All input I have is you want your code to run on many machines, in fact you want it to run the same on all machines you need to deliver and preferably more. Vertically and horizontally at the same time, so your services only call localhost but in many separate places.
This in turn mandates a distributed database. And later you discover it has to be capable of async-to-async = no blocking ever anywhere in the whole solution.
The way I do this is I hot-deploy my applications async. to all servers in the cluster, this is what a cluster node looks like in practice (the name next to Host: is the node): http://host.rupy.se if you click "api & metrics" you'll see the services.
With this not only do you get scalability, but also redundancy and development is maintained at live coding levels.
-
I wish my web server were in the corner of my room
I have hosted my own web server both physically and codevise since 2014.
It's on a Raspberry 2 cluster:
http://host.rupy.se
Since 2016 i have my own database also coded from scratch:
http://root.rupy.se
We need to implement HTTP/1.1 with less bloat, a C non-blocking web server that can share memory between threads is probably the most interesting project for humans right now, is anyone working on that?
-
Ask HN: Free and open source distributed database written in C++ or C
I have one in Java: https://github.com/tinspin/rupy
Here is the 2000 lines of code of the entire database: http://root.rupy.se/code?path=/Root.java
And here you can try it out: http://root.rupy.se
-
Dokku – Free Heroku Alternative
The smallest PaaS you have ever seen is one order of magnitude larger than mine: https://github.com/tinspin/rupy
And I bet you the same goes for performance, if not two!
-
Server-Sent Events: the alternative to WebSockets you should be using
The data is here: http://fuse.rupy.se/about.html
Under Performance. Per watt the fuse/rupy platform completely crushes all competition because of 2 reasons:
- Event driven protocol design, averages at about 4 messages/player/second (means you cannot do spraying or headshots f.ex. which is another feature in my game design opinion).
- Java's memory model with atomic concurrency which needs a VM and GC (C++ copied that memory model in C++11, but it failed completely because they lack both VM and GC, but that model is still to this day the one C++ uses), you can read more about this here: https://github.com/tinspin/rupy/wiki
You can argue those points are bad arguments, but if you look at performance per watt with some consideration for developer friendlyness, I'm pretty sure in 100 years we will still be coding minimalist JavaSE on the server and vanilla C (compiled with C++ compiler) on the client.
- Jodd – The Unbearable Lightness of Java
What are some alternatives?
go-vcr - Record and replay your HTTP interactions for fast, deterministic and accurate tests
huproxy
Hamcrest - Hamcrest matchers for the Go programming language
cmdg - Command line Gmail client
ginkgo - A Modern Testing Framework for Go
Nullboard - Nullboard is a minimalist kanban board, focused on compactness and readability.
GoSpec - Testing framework for Go. Allows writing self-documenting tests/specifications, and executes them concurrently and safely isolated. [UNMAINTAINED]
cakephp-swagger-bake - Automatically generate OpenAPI, Swagger, and Redoc documentation from your existing CakePHP code.
assert - :exclamation:Basic Assertion Library used along side native go testing, with building blocks for custom assertions
dbmate - :rocket: A lightweight, framework-agnostic database migration tool.
dbcleaner - Clean database for testing, inspired by database_cleaner for Ruby
Aerospike - Aerospike Database Server – flash-optimized, in-memory, nosql database