diff --git a/.github/workflows/prjob_tests.yml b/.github/workflows/prjob_tests.yml index 7cf70329b..810e6a84e 100644 --- a/.github/workflows/prjob_tests.yml +++ b/.github/workflows/prjob_tests.yml @@ -13,4 +13,4 @@ jobs: - name: Install cover run: go get golang.org/x/tools/cmd/cover - name: Tests - run: go test ./... -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out 8.4 + run: RELAY_AUTH_KEY=TEST go test ./... -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out 8.4 diff --git a/README.md b/README.md index 5f1ca6064..2f7df0083 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Run unit tests with coverage: // you may need to install cover with this command first go get golang.org/x/tools/cmd/cover // run test - go test ./... -tags mock -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out + RELAY_AUTH_KEY=TEST go test ./... -tags mock -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out // To get code coverage in html format do the following after running the code above go tool cover -html="coverage.out" ``` @@ -147,12 +147,12 @@ brew upgrade mockery #### When adding a new function to the interface which is already mocked follow the below steps -1. Update the corresponding interface with the function signature, for example if you are adding new function to the ```database``` structure make sure the interface file ```db/interface.go``` is updated with the function signature. -2. run the command ```mockery``` to update the mocks. +1. Update the corresponding interface with the function signature, for example if you are adding new function to the `database` structure make sure the interface file `db/interface.go` is updated with the function signature. +2. run the command `mockery` to update the mocks. #### To create mocks for a new interface make follow the steps below -1. Add the new entry in the ```.mockery.yml``` file like this +1. Add the new entry in the `.mockery.yml` file like this ```yml @@ -168,7 +168,7 @@ packages: *your-interface-2*: ``` -2. run the command ```mockery``` to update the mocks. +2. run the command `mockery` to update the mocks. ### Backend API Data Validations diff --git a/config/config.go b/config/config.go index 36059cc8b..e8c932f2d 100644 --- a/config/config.go +++ b/config/config.go @@ -102,6 +102,10 @@ func InitConfig() { } } +func CheckRelayAuthKey(authKey string) { + +} + func StripSuperAdmins(adminStrings string) []string { superAdmins := []string{} if adminStrings != "" { diff --git a/config/config_test.go b/config/config_test.go index f6e943dd2..29c26ca70 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -23,10 +23,6 @@ func TestInitConfig(t *testing.T) { if JwtKey == "" { t.Error("Could not load random jwtKey") } - - if RelayAuthKey != "" { - t.Error("Could not load RelayAuthKey") - } } func TestGenerateRandomString(t *testing.T) {