Unfortunately I had some important things to manage in the last days and therefore have not been able to work a lot on my projects. However since I’m doing this challenge to motivate myself and to have constant progress in my project I will continue where I left off a few days ago.
Today’s Progress: Managed to get Jenkins collect all test results. Still don’t know why the integration tests are flickering.
Today’s Progress: Wrote all Jenkins pipelines and wired the security-server project to the snapshot libraries on the public maven repo. Unfortunately when the build of security-server is running in Jenkins it’s failing also a local build succeeds.
Things I’ve learned: More about Jenkins pipelines.
Things I’ve planned for tomorrow: Investigate on the issue why the build fails on Jenkins and why test reports of integration tests don’t get collected by Jenkins.
Today’s Progress: I have not been able to work on the project as much as I’ve planned but have been able to publish the next artifact.
Things I’ve learned: Repeated the steps necessary to publish an artifact.
Things I’ve planned for tomorrow: Visiting the Maker Faire Berlin
Link(s) to work: persistence-support
Today’s Progress: Published first snapshot version of a project to OSSRH maven repository.
Things I’ve learned: How to setup an account with Sonatype and publish an artifact from a gradle build
Things I’ve planned for tomorrow: Integrate publishing into CD pipeline.
Link(s) to work: rule-jpa
Today’s Progress: I have been fighting with eclipse link the whole time. Suddenly my integration tests that where using JPA did stop working. Finally I decided to switch to Hibernate which solved my problems.
Things I’ve learned: I will be using Hibernate from now on whenever possible.
Things I’ve planned for tomorrow: Continue to publish the whole dependency chain so I can continue with my CD pipeline.
Link(s) to work: rules-jpa
Today’s Progress: As I started to build my CD pipeline I noticed that I have some smaller “common” projects that have to be available in a repository in order to be used as a dependency during build. So I started to look into the different types of repositories that are available. Since my current project is publicly available I think that I also have to make the dependencies publicly available in a repository.
Today’s Progress: Setup a Jenkins 2 server for CI/CD and created a simple pipeline.
Things I’ve learned: How to setup Jenkins 2 and how pipelines are working
Things I’ve planned for tomorrow: Improve pipeline
Link(s) to work: security-server
Today’s Progress: Implemented integration-tests for OAuth 2 token retrieval.
Things I’ve learned: Learned many details about the different OAuth 2 grant_types and flows. This demonstrates how much you can learn when implementing tests ;)
Things I’ve planned for tomorrow: Cleanup the tests and maybe implement some more API endpoints.
Link(s) to work: security-server
By default Rest-Assured will follow a redirection if it receives a 302 response after issuing a request. In this case your checks will be applied to the response after the redirect.
Some times you may not want this to happen and rather examine the response of the original request for example to extract cookies or assert the correct location of the redirect.
To achieve this you can use the redirects().follow(false) directive when formulating the request:
Since I’m writing a lot of Spring code or using libraries like Rest Assured that allow to write somehow “human readable” code it’s nice to be able to turn off code formatting int IntelliJ so that the structure is not destroyed when the source file gets reformatted.
given() .contentType("application/x-www-form-urlencoded; charset=utf-8") .when() .queryParam("foo", "bar") .get("http://localhost:8080/bar") .then() .statusCode(302) To prevent this from happening IntelliJ offers a function to turn off formatting by a marker comment.