Open mintopia opened 7 years ago
We can invoke steamcmd
to drive an offical Steam depot downloader behind a cache service - pretty trivial to script and orchestrate. Also means we can do some interesting test cases like deliberately corrupting files on the cache and testing client responses.
For the other services, we might be dependent on either trying to perform a replay of captured network traffic, or having to spin up a Windows VM somewhere with a game client installed, and doing some integration testing that way.
Thought: @ilumos steam cache primer script could work nicely for this as it would test a full steam download through the cache.
Time game download
delete game
Retime game download
game download should be x faster?
Worth keeping this up to date, we do now do some basic testing through goss... however we could definitely improve them / make them less reliable on external services
@VibroAxe Using zeropingheroes/lancache-autofill
and timing it would work, but I think it would be a better test to write a dedicated script to test Steam e.g:
For Origin it could be a script that:
$cache_status
when using slice
and requesting something for the first time)Is there already a script to test DNS is configured correctly?
@mintopia What do you think would be useful to check re: ETags?
The testing we are talking about here is unit testing of the images, so GitHub "issue formatting" isnt a problem persay as they will be stopped at PR automated testing.
I really like the idea of steamcmd but having thought about it some more the infrastructure to set that up in a unit test is definitely non trivial as it requires DNS overrides and other features to work which obviously are not available to the base image
The benefit of the simple Goss script is that it has no external dependencies whilst still giving a go/no-go on basic cache functionality. We also have to pay for ci time if the test scripts take too long to run
Will Goss give us enough to go on?
Here's what's available for checking a HTTP URL:
https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#http
Speaking to @astrolox about how to go about testing the cache images.
Initial thoughts:
This only covers a simple case though. It would be good for advanced options for testing range requests, etag headers, etc.
Other people's thoughts and comments?