Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Christoph Blecker c2cf5566f4
Fix string to int conversion 2023-09-03 18:29:27 -07:00
carvalhe 5b974dfb5e
Preflight validation (#2823)
*  Preflight validation first iteration

Co-authored-by: BCarvalheira <bcarvalheira@microsoft.com>
2023-06-01 15:25:03 -04:00
Amber Brown 2876a8e64c
Revert "Database tests are placed in tests/database." (#2629)
This reverts commit 39326bca8c.
2023-01-12 16:40:19 +11:00
Steven Fairchild 39326bca8c Database tests are placed in tests/database.
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.
2022-12-16 13:03:07 -05:00
Andrew Denton 66aaf89a6c wip testcase 2022-09-26 11:55:19 -07:00
Ross Bryan 2d076a8242 create clustermanager api definitions, wire up cosmosdb 2022-09-14 09:57:29 -04:00
Amber Brown 400f9c2917 sort before check 2022-08-25 13:32:51 +10:00
Amber Brown aec99ddd81 uuid generation and so 2022-08-25 13:32:50 +10:00
Amber Brown dfa71c9053 add ID generation to fixtures 2022-08-25 13:32:50 +10:00
Amber Brown b53b70171e nextUUID -> newUUID 2022-07-28 13:21:57 +10:00
Amber Brown 1e3eff799a generate using them in code 2022-07-27 13:38:00 +10:00
Amber Brown dc8d40816f generate them in the database layer, so that they can be accessed consistently 2022-07-27 13:38:00 +10:00
Amber Brown 028d1e0c78
[M6] Add OpenShiftVersions to the CosmosDB database (#2165)
* add an openshift version document for M6

* add database code for openshiftversion

* add openshiftversion to the api register and add internal representation for the admin API

* update version fixture/checking code to include openshiftversions

* update generator

* run gendeploy

* run make generate
2022-07-19 11:04:22 -04:00
Jeremy Facchetti fdfd3900b4
added stylecheck and moved golangci-lint to a github action (#2083)
* enabled github action instead of running from ADO

* fixed style

* fixed some style

fixed styling

fixed failing tests because of case on errs
2022-05-02 10:38:27 -04:00
Ben Vesel 2c04e7536d
Rotate the encryption secrets on deploy (#1645) 2021-12-01 10:14:11 +00:00
Jim Minter 1dc855ce81 add unit tests 2021-08-19 10:36:45 -04:00
Naveen Malik b76aeffbf0 Removed uuid facade recently added.
The facade was inconsistently used and was replicating what was already
in uuid.Must(...)
2021-04-01 10:23:03 -04:00
Naveen Malik d5c35ca3c5 Move from github.com/satori/go.uuid to github.com/gofrs/uuid
Why: https://www.whitesourcesoftware.com/vulnerability-database/WS-2018-0594

Requires updating azure-sdk-for-go, moved to latest release
Created wrapper util for gofrs/uuid as NewV4() now returns 2 args and we use it a lot in-line

Vendor updates coming in separate commit to keep this one clean.

There is no v1.2.1 tag for these repos on github.com.
A replace was added for these to 'master'.
Running `go mod vendor` updated the value from 'master' to what you see
in go.mod now.
The v0.0.0 versions needed excluded to get them to drop from go.sum.
Do not exlude v1.2.0 or dependencies cannot be resolved.
2021-03-30 17:13:29 -04:00
Jim Minter 7a14788cea
renames:
cipher -> aead
  encrypt/decrypt -> seal/open
  aeadCipher -> xChaCha20Poly1305
2020-12-14 11:18:57 -06:00
Jim Minter 22e0cc5b91
deep copy items when adding them to database checkers/fixtures 2020-12-09 16:22:52 -06:00
Jim Minter 9e5c4f8930
portal initial commit 2020-12-09 16:22:51 -06:00
Jim Minter 9f1e216bec
lint fixes 2020-11-19 08:09:59 -06:00
Jim Minter 9bf2896459
elide functions in test/database using ... syntax 2020-10-13 19:17:02 -05:00
Jim Minter bbcf2997cc
typo/style/standardisation fixes to check.go 2020-10-13 19:16:52 -05:00
Amber Brown c127a9dd79 make the const more go-like and don't export it 2020-10-13 15:00:23 +11:00
Amber Brown 1033d2ed11 Merge remote-tracking branch 'upstream/master' into hawkowl/frontend-test-refactor 2020-10-13 14:28:28 +11:00
Amber Brown b79e0a84a2 fix unit tests to use individual db clients vs database.Database 2020-10-13 13:55:13 +11:00
Jim Minter 8cf6c9dbe7
internalise uuid into database clients 2020-10-08 09:41:18 -05:00
Amber Brown 85efb34162 add checking/fixture infrastructure for the fake database client 2020-10-01 09:11:33 +10:00
Amber Brown b2c4751be9 Add a fake cosmosdb backend (functional changes) 2020-09-24 16:13:58 +10:00