OCL API 2

Build: #2142 failed

Job: Run tests failed

Stages & jobs

  1. Build

  2. Test

  3. Deploy for testing

    Requires a user to start manually
  4. Release

    Requires a user to start manually

Job result summary

Completed
Duration
20 minutes
Agent
xiao.openmrs.org
Revision
5179915c7ef98bc43ad45f015121036b4a5874ad 5179915c7ef98bc43ad45f015121036b4a5874ad
No failed test found. A possible compilation error occurred.

Error summary

The build generated some errors. See the full build log for more details.

    test_public_can_find_globally_without_compose ... ok
    test_public_can_view ... ok
    test_unable_to_represent_as_fhir ... Failed to represent "/invalid/uri" as ValueSet
Traceback (most recent call last):
  File "/code/core/value_sets/serializers.py", line 254, in to_representation
    IdentifierSerializer.include_ocl_identifier(instance.uri, RESOURCE_TYPE, rep)
  File "/code/core/common/serializers.py", line 141, in include_ocl_identifier
    return IdentifierSerializer.parse_identifier(ident)
  File "/code/core/common/serializers.py", line 88, in parse_identifier
    raise ValidationError(
rest_framework.exceptions.ValidationError: [ErrorDetail(string='Identifier must be in a format: /{owner_type}/{owner_id}/{resourceType}/{resource_id}/, given: /invalid/uri', code='invalid')]
ok
    test_update_with_compose ... ok
    test_validate_code ... ok
    test_validate_code_globally ... ok
    test_validate_code_globally_negative ... ok
    test_validate_code_globally_via_post ... ok
    test_validate_code_negative ... ok
core.tasks.tests.UtilsTest
    test_wait_until_task_complete_finished ... ok
    test_wait_until_task_complete_pending ... ok

======================================================================
ERROR: test_exists (core.services.storages.cloud.tests.S3Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/moto/core/models.py", line 120, in wrapper
    result = func(*args, **kwargs)
  File "/code/core/services/storages/cloud/tests.py", line 46, in test_exists
    s3.upload('some/path', 'content')  # pylint: disable=protected-access
  File "/code/core/services/storages/cloud/aws.py", line 153, in upload
    self.__get_connection().upload_fileobj(
  File "/usr/local/lib/python3.10/site-packages/boto3/s3/inject.py", line 618, in upload_fileobj
    raise ValueError('Fileobj must implement read')
ValueError: Fileobj must implement read

======================================================================
ERROR: test_remove (core.services.storages.cloud.tests.S3Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/moto/core/models.py", line 120, in wrapper
    result = func(*args, **kwargs)
  File "/code/core/services/storages/cloud/tests.py", line 155, in test_remove
    s3.upload('some/path', 'content')  # pylint: disable=protected-access
  File "/code/core/services/storages/cloud/aws.py", line 153, in upload
    self.__get_connection().upload_fileobj(
  File "/usr/local/lib/python3.10/site-packages/boto3/s3/inject.py", line 618, in upload_fileobj
    raise ValueError('Fileobj must implement read')
ValueError: Fileobj must implement read

======================================================================
ERROR: test_upload (core.services.storages.cloud.tests.S3Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/moto/core/models.py", line 120, in wrapper
    result = func(*args, **kwargs)
  File "/code/core/services/storages/cloud/tests.py", line 29, in test_upload
    S3().upload('some/path', 'content')  # pylint: disable=protected-access
  File "/code/core/services/storages/cloud/aws.py", line 153, in upload
    self.__get_connection().upload_fileobj(
  File "/usr/local/lib/python3.10/site-packages/boto3/s3/inject.py", line 618, in upload_fileobj
    raise ValueError('Fileobj must implement read')
ValueError: Fileobj must implement read

======================================================================
ERROR: test_url_for (core.services.storages.cloud.tests.S3Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/moto/core/models.py", line 120, in wrapper
    result = func(*args, **kwargs)
  File "/code/core/services/storages/cloud/tests.py", line 176, in test_url_for
    s3.upload('some/path', 'content')  # pylint: disable=protected-access
  File "/code/core/services/storages/cloud/aws.py", line 153, in upload
    self.__get_connection().upload_fileobj(
  File "/usr/local/lib/python3.10/site-packages/boto3/s3/inject.py", line 618, in upload_fileobj
    raise ValueError('Fileobj must implement read')
ValueError: Fileobj must implement read

======================================================================
FAIL: test_get_204_head (core.integration_tests.tests_sources.SourceVersionExportViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mock/mock.py", line 1452, in patched
    return func(*newargs, **newkeywargs)
  File "/code/core/integration_tests/tests_sources.py", line 977, in test_get_204_head
    s3_exists_mock.assert_called_once_with(f"users/username/username_source1_vHEAD.{self.v1_updated_at}.zip")
  File "/usr/local/lib/python3.10/site-packages/mock/mock.py", line 993, in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mock/mock.py", line 980, in assert_called_with
    raise AssertionError(_error_message()) from cause
AssertionError: expected call not found.
Expected: exists('users/username/username_source1_vHEAD.2024-11-06_143316.zip')
Actual: exists('users/username/username_source1_vHEAD.2024-11-06_143315.zip')

----------------------------------------------------------------------
Ran 896 tests in 1150.001s

FAILED (failures=1, errors=4)
Preserving test database for alias 'default' ('test_postgres')...
1
Stopping ocl-oclapi2-rt_db_1 ...
Stopping ocl-oclapi2-rt_es_1 ...
Stopping ocl-oclapi2-rt_db_1 ... done
Stopping ocl-oclapi2-rt_es_1 ... done
Removing ocl-oclapi2-rt_db_1 ...
Removing ocl-oclapi2-rt_es_1 ...
Removing ocl-oclapi2-rt_es_1 ... done
Removing ocl-oclapi2-rt_db_1 ... done
Removing network ocl-oclapi2-rt_default
Removing volume ocl-oclapi2-rt_postgres-data
Removing volume ocl-oclapi2-rt_es-data
Removing volume ocl-oclapi2-rt_redis-data
Removing volume ocl-oclapi2-rt_upload-data