Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
run: sleep 10s
shell: bash

- name: Run Tests and Build Coverage
run: make test-cov-gh-action
- name: Run Tests
run: docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear 2>&1 | tee pytest-coverage.txt

- name: Comment coverage
if: success()
uses: coroo/pytest-coverage-commentator@v1.0.2
with:
pytest-coverage: pytest-coverage.txt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test-cov:

.PHONY: test-cov-gh-action
test-cov-gh-action:
docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear > pytest-coverage.txt
docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear 2>&1 | tee pytest-coverage.txt; exit ${PIPESTATUS[0]}

.PHONY: default-env
default-env:
Expand Down
4 changes: 2 additions & 2 deletions dspback/routers/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def create_metadata_repository(self, request: Request, metadata: request_m
)
async def update_metadata(self, request: Request, metadata: request_model, identifier):
metadata_json = json.loads(metadata.json())
return await self.submit(request, identifier, self.wrap_metadata(metadata_json, False))
return await self.submit(request, identifier, self.wrap_metadata(metadata=metadata_json, published=False, is_public=False))

@router.get(
'/metadata/external/{identifier}',
Expand All @@ -64,7 +64,7 @@ async def get_metadata_repository(self, identifier):
submission = self.user.submission(identifier)
metadata_json_str = submission.metadata_json
metadata_json = json.loads(metadata_json_str)
return self.wrap_metadata(metadata_json, False)
return self.wrap_metadata(metadata=metadata_json, published=False, is_public=False)

@router.delete(
'/metadata/external/{identifier}',
Expand Down