Skip to content

Commit

Permalink
SMQ - 2435 - Merge invitations into domains service (#2676)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Gateru <[email protected]>
  • Loading branch information
felixgateru authored Feb 13, 2025
1 parent 597ad23 commit 7667eee
Show file tree
Hide file tree
Showing 81 changed files with 4,387 additions and 5,512 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
- "domains/api/http/**"
- "groups/api/http/**"
- "http/api/**"
- "invitations/api/**"
- "journal/api/**"
- "users/api/**"

Expand All @@ -33,7 +32,6 @@ env:
CHANNELS_URL: http://localhost:9005
GROUPS_URL: http://localhost:9004
HTTP_ADAPTER_URL: http://localhost:8008
INVITATIONS_URL: http://localhost:9020
AUTH_URL: http://localhost:9001
CERTS_URL: http://localhost:9019
JOURNAL_URL: http://localhost:9021
Expand Down Expand Up @@ -95,11 +93,6 @@ jobs:
- "apidocs/openapi/http.yml"
- "http/api/**"
invitations:
- ".github/workflows/api-tests.yml"
- "apidocs/openapi/invitations.yml"
- "invitations/api/**"
clients:
- ".github/workflows/api-tests.yml"
- "apidocs/openapi/clients.yml"
Expand Down Expand Up @@ -170,16 +163,6 @@ jobs:
report: false
args: '--header "Authorization: Client ${{ env.CLIENT_SECRET }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'

- name: Run Invitations API tests
if: steps.changes.outputs.invitations == 'true'
uses: schemathesis/action@v1
with:
schema: apidocs/openapi/invitations.yml
base-url: ${{ env.INVITATIONS_URL }}
checks: all
report: false
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'

- name: Run Auth API tests
if: steps.changes.outputs.auth == 'true'
uses: schemathesis/action@v1
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
- "auth/service.go"
- "pkg/events/events.go"
- "pkg/groups/groups.go"
- "invitations/invitations.go"
- "users/emailer.go"
- "users/hasher.go"
- "certs/certs.go"
Expand Down Expand Up @@ -119,8 +118,6 @@ jobs:
MOCKERY_VERSION=v2.43.2
go install github.com/vektra/mockery/v2@$MOCKERY_VERSION
mv ./invitations/mocks/repository.go ./invitations/mocks/repository.go.tmp
mv ./invitations/mocks/service.go ./invitations/mocks/service.go.tmp
mv ./auth/mocks/token_client.go ./auth/mocks/token_client.go.tmp
mv ./auth/mocks/authz.go ./auth/mocks/authz.go.tmp
mv ./auth/mocks/keys.go ./auth/mocks/keys.go.tmp
Expand Down Expand Up @@ -177,8 +174,6 @@ jobs:
fi
}
check_mock_changes ./invitations/mocks/repository.go " ./invitations/mocks/repository.go"
check_mock_changes ./invitations/mocks/service.go " ./invitations/mocks/service.go"
check_mock_changes ./auth/mocks/token_client.go " ./auth/mocks/token_client.go"
check_mock_changes ./auth/mocks/authz.go " ./auth/mocks/authz.go"
check_mock_changes ./auth/mocks/keys.go " ./auth/mocks/keys.go"
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ jobs:
internal:
- "internal/**"
invitations:
- "invitations/**"
- "cmd/invitations/**"
- "auth.pb.go"
- "auth_grpc.pb.go"
- "auth/**"
- "pkg/sdk/**"
journal:
- "journal/**"
- "cmd/journal/**"
Expand Down Expand Up @@ -292,11 +284,6 @@ jobs:
run: |
go test --race -v -count=1 -coverprofile=coverage/internal.out ./internal/...
- name: Run invitations tests
if: steps.changes.outputs.invitations == 'true' || steps.changes.outputs.workflow == 'true'
run: |
go test --race -v -count=1 -coverprofile=coverage/invitations.out ./invitations/...
- name: Run logger tests
if: steps.changes.outputs.logger == 'true' || steps.changes.outputs.workflow == 'true'
run: |
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

SMQ_DOCKER_IMAGE_NAME_PREFIX ?= supermq
BUILD_DIR ?= build
SERVICES = auth users clients groups channels domains http coap ws cli mqtt certs invitations journal
TEST_API_SERVICES = journal auth certs http invitations clients users channels groups domains
SERVICES = auth users clients groups channels domains http coap ws cli mqtt certs journal
TEST_API_SERVICES = journal auth certs http clients users channels groups domains
TEST_API = $(addprefix test_api_,$(TEST_API_SERVICES))
DOCKERS = $(addprefix docker_,$(SERVICES))
DOCKERS_DEV = $(addprefix docker_dev_,$(SERVICES))
Expand Down Expand Up @@ -172,7 +172,6 @@ test_api_domains: TEST_API_URL := http://localhost:9003
test_api_channels: TEST_API_URL := http://localhost:9005
test_api_groups: TEST_API_URL := http://localhost:9004
test_api_http: TEST_API_URL := http://localhost:8008
test_api_invitations: TEST_API_URL := http://localhost:9020
test_api_auth: TEST_API_URL := http://localhost:9001
test_api_certs: TEST_API_URL := http://localhost:9019
test_api_journal: TEST_API_URL := http://localhost:9021
Expand Down
2 changes: 1 addition & 1 deletion apidocs/openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This folder contains an OpenAPI specifications for SuperMQ API.

View specification in Swagger UI at [docs.api.magistrala.abstractmachines.fr](https://docs.api.supermq.abstractmachines.fr)
View specification in Swagger UI at [docs.api.magistrala.abstractmachines.fr](https://docs.api.supermq.abstractmachines.fr)
Loading

0 comments on commit 7667eee

Please sign in to comment.