-
Notifications
You must be signed in to change notification settings - Fork 41
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
Wire up the local and remote persisters #1203
Commits on Feb 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1a566d1 - Browse repository at this point
Copy the full SHA 1a566d1View commit details -
Refactor LocalPersister.Persist
This refactor will enable us to swap out the LocalFilePersister and RemotePersister. The Persist method in LocalFilePersist must match what is a requirement for the RemotePersister, which is the addition of the context as a param, even though the LocalFilePersister doesn't work with it. These two persisters will be interchangeable at a later stage depending on the environment setup.
Configuration menu - View commit details
-
Copy full SHA for d705095 - Browse repository at this point
Copy the full SHA d705095View commit details -
Add the screenshots output env var
This env var will be used to configure the remote persister. When this env var is available and setup correctly, it will help configure the module to swap out the LocalFilePersister with the RemotePersister.
Configuration menu - View commit details
-
Copy full SHA for 6cf44ca - Browse repository at this point
Copy the full SHA 6cf44caView commit details -
Add parser for K6_BROWSER_SCREENSHOTS_OUTPUT
This will parse the url, basePath and headers from K6_BROWSER_SCREENSHOTS_OUTPUT. It will also help determine whether the module should use a RemoteFilePersister or a LocalPersister.
Configuration menu - View commit details
-
Copy full SHA for 8897570 - Browse repository at this point
Copy the full SHA 8897570View commit details -
This method will help determine whether to use the LocalFilePersister or the RemoteFilePersister. It mainly depends on whether a valid K6_BROWSER_SCREENSHOTS_OUTPUT env var has been setup.
Configuration menu - View commit details
-
Copy full SHA for 4df7fc4 - Browse repository at this point
Copy the full SHA 4df7fc4View commit details -
Add init of FilePersister in module
This initialise a FilePersister (either a local or remote) depending on the environment, which is dictated by K6_BROWSER_SCREENSHOTS_OUTPUT.
Configuration menu - View commit details
-
Copy full SHA for 6b1eb4a - Browse repository at this point
Copy the full SHA 6b1eb4aView commit details -
Use the interface instead of the LocalFilePersister throughout the codebase so that we can easily swap it out for a different persister.
Configuration menu - View commit details
-
Copy full SHA for 2dd480e - Browse repository at this point
Copy the full SHA 2dd480eView commit details
Commits on Feb 13, 2024
-
Refactor interfaces for persisting files
The packages will now own their own interfaces instead of borrowing one that was implemented in storage.
Configuration menu - View commit details
-
Copy full SHA for 4c74f14 - Browse repository at this point
Copy the full SHA 4c74f14View commit details -
Move newFilePersister to browser package
The browser package is the work horse on initialising and setting up the environment for the global test run, iteration or vu. The decision on whether to create a Local or Remote persister should rest in the browser package's hands, but leave the details of what and how the two persisters do their job in the storage package.
Configuration menu - View commit details
-
Copy full SHA for 1172bc8 - Browse repository at this point
Copy the full SHA 1172bc8View commit details -
This type helps encapsulate and helps document what the parsed types and usages are from the K6_BROWSER_SCREENSHOTS_OUTPUT env var.
Configuration menu - View commit details
-
Copy full SHA for 6150b17 - Browse repository at this point
Copy the full SHA 6150b17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07434ff - Browse repository at this point
Copy the full SHA 07434ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9a2bea - Browse repository at this point
Copy the full SHA b9a2beaView commit details -
Rename to parsePresignedURLEnvVar
This explains what it is doing better than parseEnvVar.
Configuration menu - View commit details
-
Copy full SHA for cfe22e6 - Browse repository at this point
Copy the full SHA cfe22e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93cc48f - Browse repository at this point
Copy the full SHA 93cc48fView commit details -
Use a mock persister when there's no need for either a local or remote persister in a test. These tests do not need to validate that a screenshot was saved.
Configuration menu - View commit details
-
Copy full SHA for d7dad6a - Browse repository at this point
Copy the full SHA d7dad6aView commit details