Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Removed Paprika from animals data due to image being 403 on CDN.

* Updated test to only count 9 animals rather than 10 due to removal of Paprika. Updated SSO configuration section of k8s getting started documentation.

* Updated e2e test count of animals listed on home page after removal of Paprika.
  • Loading branch information
csterwa authored Oct 29, 2020
1 parent c96a76f commit 4fd4f77
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
17 changes: 8 additions & 9 deletions backend/src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
insert into animal (id, name, rescue_date, avatar_url, description) values
(1, 'Chocobo', '2019-12-25', 'https://cdn.pixabay.com/photo/2016/02/10/16/37/cat-1192026_1280.jpg', 'She is chubby, lazy, but always polite. She does not need much attention from you, but when she does, there is no way you can resist petting her.'),
(2, 'Paprika', '2020-01-02', 'https://cdn.pixabay.com/photo/2014/11/30/14/11/kitty-551554_1280.jpg', 'She is very active and funny, always in a mood to play and to be pet. Sometimes she gets too excited about playing so she run into walls and tables.'),
(3, 'Sam', '2020-01-15', 'https://images.dog.ceo/breeds/pug/c677d2fa5324.jpg', 'Sam loves to lay around and be lazy. He plays well with kids and is a great companion for any family.'),
(4, 'Mr. Huggins', '2019-11-23', 'https://cdn.pixabay.com/photo/2016/12/13/05/15/puppy-1903313_960_720.jpg', 'Mr. Huggins is a fluffy and cuddly little pup. He loves tummy rubs and kisses.'),
(5, 'Brody', '2020-01-14', 'https://cdn.pixabay.com/photo/2017/09/07/23/02/rhodesian-ridgeback-2727035_960_720.jpg', 'Brody has lots of energy and loves the outdoors.'),
(6, 'Ginger', '2020-01-12', 'https://cdn.pixabay.com/photo/2015/12/29/20/51/dog-1113398_960_720.jpg', 'Ginger is a posh Pomeranian that loves to be pampered by her humans.'),
(7, 'Whiskers', '2020-01-20', 'https://cdn.pixabay.com/photo/2017/01/20/21/22/kitten-asleep-in-a-pot-1995961_960_720.jpg', 'Whiskers is a sweet and loving little kitten. She loves cuddling with her humans.'),
(8, 'Mittens', '2020-01-22', 'https://cdn.pixabay.com/photo/2013/05/17/15/54/cat-111793_960_720.jpg', 'Mittens is a chubby cat that loves spending his days lounging and eating catnip.'),
(9, 'Sabrina', '2020-01-24', 'https://cdn.pixabay.com/photo/2016/11/29/01/10/adorable-1866475_960_720.jpg', 'Sabrina is a friendly kitten with beautify blue eyes. She does not need lots of attention, but loves a good belly rub.'),
(10, 'Georgie', '2020-01-29', 'https://cdn.pixabay.com/photo/2017/03/14/19/06/bulldog-2144110_960_720.jpg', 'Georgie will slobber all over you with his kisses. Does not require a lot of physical activity.');
(2, 'Sam', '2020-01-15', 'https://images.dog.ceo/breeds/pug/c677d2fa5324.jpg', 'Sam loves to lay around and be lazy. He plays well with kids and is a great companion for any family.'),
(3, 'Mr. Huggins', '2019-11-23', 'https://cdn.pixabay.com/photo/2016/12/13/05/15/puppy-1903313_960_720.jpg', 'Mr. Huggins is a fluffy and cuddly little pup. He loves tummy rubs and kisses.'),
(4, 'Brody', '2020-01-14', 'https://cdn.pixabay.com/photo/2017/09/07/23/02/rhodesian-ridgeback-2727035_960_720.jpg', 'Brody has lots of energy and loves the outdoors.'),
(5, 'Ginger', '2020-01-12', 'https://cdn.pixabay.com/photo/2015/12/29/20/51/dog-1113398_960_720.jpg', 'Ginger is a posh Pomeranian that loves to be pampered by her humans.'),
(6, 'Whiskers', '2020-01-20', 'https://cdn.pixabay.com/photo/2017/01/20/21/22/kitten-asleep-in-a-pot-1995961_960_720.jpg', 'Whiskers is a sweet and loving little kitten. She loves cuddling with her humans.'),
(7, 'Mittens', '2020-01-22', 'https://cdn.pixabay.com/photo/2013/05/17/15/54/cat-111793_960_720.jpg', 'Mittens is a chubby cat that loves spending his days lounging and eating catnip.'),
(8, 'Sabrina', '2020-01-24', 'https://cdn.pixabay.com/photo/2016/11/29/01/10/adorable-1866475_960_720.jpg', 'Sabrina is a friendly kitten with beautify blue eyes. She does not need lots of attention, but loves a good belly rub.'),
(9, 'Georgie', '2020-01-29', 'https://cdn.pixabay.com/photo/2017/03/14/19/06/bulldog-2144110_960_720.jpg', 'Georgie will slobber all over you with his kisses. Does not require a lot of physical activity.');

insert into adoption_request (id, animal, adopter_name, email, notes) values
(1, 1, 'Bella', 'bella@email.com', 'Blah blah'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void getAllAnimals() {
.exchange()
.expectStatus().isOk()
.expectBody()
.jsonPath("$.length()").isEqualTo(10)
.jsonPath("$.length()").isEqualTo(9)
.jsonPath("$[0].id").isEqualTo(1)
.jsonPath("$[0].name").isEqualTo("Chocobo")
.jsonPath("$[0].avatarUrl").isNotEmpty()
Expand Down
4 changes: 2 additions & 2 deletions e2e/cypress/integration/rescue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ context('Animal Rescue', () => {

it('shows animals with "Adopt" buttons disabled on homepage', () => {
cy.get('.ui.card button')
.should('have.length', 10)
.should('have.length', 9)
.each($button => {
expect($button).to.have.class('disabled');
});
Expand All @@ -31,7 +31,7 @@ context('Animal Rescue', () => {

cy.get('.header-buttons button').should('contain', username);
cy.get('.ui.card button')
.should('have.length', 10)
.should('have.length', 9)
.each($button => {
expect($button).to.not.have.class('disabled');
});
Expand Down
13 changes: 8 additions & 5 deletions k8s/deploy_to_k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
Make sure you have Spring Cloud Gateway for k8s installed.

For SSO to work, you will need to provide two secret files:
For Animal Resuce sample Single Sign-On (SSO) to work, you will need to provide two secret files:

* ./k8s/base/secrets/sso-credentials-for-backend.txt
```
jwk-set-uri=https://{your_auth_domain}/token_keys
jwk-set-uri=https://{your_auth_domain}/{.well-known/jwks.json}
```
* ./k8s/overlays/sso-secret-for-gateway/secrets/test-sso-credentials.txt
```
auth-domain=https://{your_auth_domain}
client-id={your-client-id}
client-secret={your-client-secret}
scope=openid,profile,email
client-id={your_client_id}
client-secret={your_client_secret}
authorization-grant-type=authorization_code
issuer-uri=https://animal-rescue-test.us.auth0.com/
provider=sso
```
This file structure may change as the product evolves. Please refer to the SCG4K8s doc for the most up-to-date template.

Expand Down

0 comments on commit 4fd4f77

Please sign in to comment.