# REST web services clean checkout tests fail

**URL:** <https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101>\
**Category:** Development\
**Tags:** restws, unit-tests\
**Created:** [July 23, 2018, 11:27pm UTC](https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101 "2018-07-23T23:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [July 23, 2018, 11:27pm UTC](https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101/1 "2018-07-23T23:27:32Z")

</div>

With a clean checkout and “mvn clean install” of the of the REST web services module, the 2.2 OMOD tests fails with the following error. Is there a special profile one needs to set up to build this module?

```
asRepresentation_shouldReturnValidRefRepresentation(org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs2_2.DiagnosisResource2_2Test) Time elapsed: 0.034 sec <<< ERROR!
org.dbunit.DatabaseUnitRuntimeException: org.dbunit.dataset.NoSuchTableException: condition
	at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:305)
	at org.dbunit.operation.AbstractOperation.getOperationMetaData(AbstractOperation.java:80)
	at org.dbunit.operation.RefreshOperation.execute(RefreshOperation.java:101)
	at org.openmrs.test.BaseContextSensitiveTest.executeDataSet(BaseContextSensitiveTest.java:785)
	at org.openmrs.test.BaseContextSensitiveTest.executeDataSet(BaseContextSensitiveTest.java:679)
	at org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs2_2.DiagnosisResource2_2Test.before(DiagnosisResource2_2Test.java:25)
```

---

<div class="post-metadata">

**Author:** ![mseaton](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mseaton/32/8088_2.png) [@mseaton](https://talk.openmrs.org/u/mseaton)\
**Post date:** [July 24, 2018, 1:33am UTC](https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101/2 "2018-07-24T01:33:24Z")

</div>

FYI - I looked into this and committed a fix here:

> <https://github.com/openmrs/openmrs-module-webservices.rest/commit/eb6f3ce27469a21617eb66f115f9b7c4fe0c20bc>

No idea how/why this was previously working in CI or for involved developers in their local builds.

Mike

---

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [July 24, 2018, 1:08pm UTC](https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101/3 "2018-07-24T13:08:38Z")

</div>

Is it possible that a change was made to core that introduced this error but the REST module isn’t automatically triggered by a change to core and therefore this went unnoticed?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [July 24, 2018, 3:22pm UTC](https://talk.openmrs.org/t/rest-web-services-clean-checkout-tests-fail/19101/4 "2018-07-24T15:22:06Z")

</div>

@mogoodrich you are correct.
