* move some repeated code into pkg/util/service/
* cleanups in cmd/aro
* update_ocp_versions does not need AEAD
* cache the authorisers rather than recreating them
* env mock updates
* move stuff around from review
* api: Avoid referencing DefaultInstallStream in tests
* frontend: Avoid referencing DefaultInstallStream
The frontend's OpenShiftVersions change feed handler will record
the current default version for the rest of the frontend to use.
* monitor: Remove latestGaMinorVersion metric
The RP no longer has this information internally, so the metric
is no longer relevant.
* update_ocp_versions: Read versions from an environment variable
Read OpenShift versions and pull specs from an OPENSHIFT_VERSIONS
environment variable containing a JSON object. This data includes
the default OpenShift version for new installs that don't specify
a version.
This moves us toward eliminating hard-coded OpenShift versions in
pkg/util/version/const.go.
* cache_fallback_discovery_client_test.go: Hard-code version
I'm not sure what to do with this test. Install stream data has
moved to RP-Config, so if the test is worth keeping then I guess
the oldest supported version will have to be hard-coded and kept
up-to-date. But it probably won't be.
* version: Remove DefaultInstallStreams
DefaultInstallStream will remain for now, but it's ONLY for use by
local development mode until we can come up with a better solution.
---------
Co-authored-by: Matthew Barnes <mbarnes@fedorapeople.org>
Scope strings should mostly go away once the RP code is fully
migrated to the newer TokenCredential-based Azure SDK, but this
was requested by multiple peer-reviewers.
httptest is used to send http responses.
Add Mock for databaseaccounts.
Add DatabaseClient, MasterKeyClient interfaces to allow for mock testing.
Add unit tests for subscriptions.
Add billing unit tests.
Add default http.Client to database.go, update references to use DatabaseClient interface. This will keep from importing "net/http" in every package calling it and allow easy changing within database if needed."
Add unit tests for clustermanager in database package
Add asyncoperations unit tests.
Add monitor tests.
Add gateway unit tests.
Add openshiftversions tests.
Add portal tests.
Add openshiftclusters tests.
Tests for billing and subscriptions are placed in test/database to reuse
fake testing code due without import cycling.
* pass cipher into database.NewDatabase, rather than bool
* unexport as much as possible
* remove backwards-compatibility and "read without key" options for now, adds too much complexity