Skip to content

Commit

Permalink
Refactor IT Tests (ResourceIT and test infrastructure). (#897)
Browse files Browse the repository at this point in the history
* Plumbed/hacked out basic concepts.

Elide build working with partial tests for ResourceIT

Refactored one ResourceIT test to use the new test DSL

Added capabilities to compare documents to test DSL.

Added relationship support to DSL

Added failure tests

First 20 tests rewritten

Refactored tests for include testing

Cleanup to use static DSL definitions

Up to 31 tests refactored

Added in memory store harness for IT tests.  By default, this harness runs when no harness is specified.

Build now passes

Refactored 3 more tests

Half way

52 tests refactored

65 tests now passing.  Migrated InheritanceIT and LifecycleTestIT to new framework

Refactored entity dictionary to include support for setting and getting values.  The in memory store now uses this functionality to correctly set the ID for generated IDs

67 tests now pass

68 passing

10 tests left

Only 3 to go

All tests now pass

* Removing unused JSON resource files

* Minor pre-inspection cleanup

* Migrated DataStoreIT tests to new framework

* Migrated AnyPolymorphismIT to new framework

* Migrated EmbeddedIT to new framework

* Migrated AssignedID and FieldLevelIT tests to new framework

* Migrated UserTypeIT to new framework

* Migrated UserTypeIT, MapEnumIT, and GenerateIT to use new framework

* Migrated ShareableIT to new framework

* Fixed checkstyles

* Fixed legit codacy issues

* To-one Relation Test (#899)

* To-one Relation Test

* Add a test

* Address comments from @aklish

* Added more JSON-API DSL test

* Elide-Testing Refactor access integration test (#911)

* Elide-Testing Refactor access integration test

* Add setup

* Elide-Testing Refactor BookAuthorIT & AuditIT (#909)

* Book Author IT refactor

* Elide-Testing Refactor audit integration test

* Update auditIT

* remove json files

* make auditIT tests independent

* FilterIT integration tests code complete (#917)

* Fixed build issues

* Refactor sorting it (#918)

* Added SortingIt integration test

* Deleted groovy file and put json request in seperate file

* Remove testng classes

* Rebase and fix checkstyle violation

* Issue 912 Refactor Error IT Tests (#919)

* Add patch extension to DSL (#921)

* Refactor Paginate IT (#931)

- Upgrade to rest assured 4.x
- Fix style issues
- Refactor Paginate IT

* Implement GraphQL DSL (#903)

* GraphQL - Implement query DSL & Remove Groovy tests

* Consolidate GraphQL and Relay DSL & serialize object data using lombok and Jackson

* Migrate from testng to junit5

* Replace ValueWithVariable interface with plain Java objects

* Consolidate to have a single 'Field' class

* Consolidate entity and field

* Consolidate field and responseField

* Remove OperationDefinition interface

* Implement Query and Mutation

* style

* style

* Remove extra query/response parameter

* javadoc & style

* style

* Address comments

* Address comments

* Address comments

* Migrated BridgeableStoreIT to new framework.  Fixed build issues from last commit.

* Started making changes to run IT tests using Junit 5

* Hibernate5 Tests Pass

* JPA & Hibernate tests now passing.  Removed GraphQLIT.  Removed old data store suppliers

* Build works.  All IT tests run

* Removed references to dataStoreSupplier

* Disable check only on test framework

* disable .NET scan

* Inherit versions
  • Loading branch information
aklish authored Sep 3, 2019
1 parent bfb29b4 commit 71b0ce7
Show file tree
Hide file tree
Showing 289 changed files with 10,562 additions and 10,645 deletions.
2 changes: 1 addition & 1 deletion checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
<suppressions>
<!-- Suppress generated sources -->
<suppress files="[/\\]src[/\\]test[/\\]" checks="(JavadocType|LineLength)"/>
<suppress files="[/\\]src[/\\]test[/\\]" checks="(JavadocType|LineLength|MethodLength)"/>
<suppress files="[/\\]src[/\\]main[/\\]webapp[/\\]WEB-INF[/\\]api-docs[/\\]" checks=".*"/>
<suppress files="[/\\]target[/\\]" checks=".*"/>
<suppress files="\.csv" checks=".*"/>
Expand Down
3 changes: 2 additions & 1 deletion elide-contrib/elide-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
*/
package com.yahoo.elide.contrib.swagger;

import static io.restassured.RestAssured.get;

import com.yahoo.elide.contrib.swagger.resources.DocEndpoint;
import com.yahoo.elide.initialization.AbstractApiResourceInitializer;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.restassured.RestAssured;

import org.testng.Assert;
import org.testng.annotations.Test;
Expand All @@ -23,7 +24,7 @@ public SwaggerIT() {
@Test
void testDocumentFetch() throws Exception {
ObjectMapper mapper = new ObjectMapper();
JsonNode node = mapper.readTree(RestAssured.get("/doc/test").asString());
JsonNode node = mapper.readTree(get("/doc/test").asString());
Assert.assertNotNull(node.get("paths").get("/book"));
}
}
18 changes: 15 additions & 3 deletions elide-contrib/elide-test-helpers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,27 @@
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Loading

0 comments on commit 71b0ce7

Please sign in to comment.