Closed paulajulve closed 1 month ago
Sorry, ~I~ the automation undid all the approves 💩
Since we're only using 2^30 now, I've centralised the constant in the disk.go
file and used it all over. And I've added tests for all 3 CSPs for the size both in GB and bytes. I didn't think it was worth adding that test to the interface, since what we want to guarantee is that the logic is sound within each specific provider, and that in turn already guarantees the interface.
Dammit! I broke the tests 😅 brb
Turns out that the GB units Google uses in their API responses are actually binary GB, aka, GiB. So the conversion to bytes needs a different factor.
Relevant docs are linked in the comment over the function, for future reference.