Skip to content

Commit

Permalink
NN-3625: rename prisonstaffhub (#1868)
Browse files Browse the repository at this point in the history
* NN-3625 changing the name in the helm charts and circle ci config premptively

* NN-3625 changing the name of the cert

* NN-3625 chaning the cert names

* NN-3625 changing name across the board

* NN-3625 fixing mistake in replace
  • Loading branch information
richardpopple authored Oct 7, 2021
1 parent c042d03 commit c307bb9
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ Run locally as docker

```bash
docker run -p 3000:3000 -d \
--name prisonstaffhub \
mojdigitalstudio/prisonstaffhub:latest
--name digital-prison-services \
quay.io/hmpps/digital-prison-services:latest
```

Run remotely as docker

```bash
docker run -p 3000:3000 -d \
--name prisonstaffhub \
--name digital-prison-services \
-e API_ENDPOINT_URL=https://api-dev.prison.service.justice.gov.uk/ \
-e OAUTH_ENDPOINT_URL=https://sign-in-dev.hmpps.service.justice.gov.uk/auth/ \
-e API_GATEWAY_TOKEN=<add here> \
-e API_CLIENT_SECRET=<add here> \
-e API_GATEWAY_PRIVATE_KEY=<add here> \
mojdigitalstudio/prisonstaffhub:latest
quay.io/hmpps/digital-prison-services:latest
```

## Cypress integration tests

The `integration-tests` directory contains a set of Cypress integration tests for the `prisonstaffhub` application.
The `integration-tests` directory contains a set of Cypress integration tests for the `digital-prison-services` application.
These tests use WireMock to stub the application's dependencies on the prisonApi, oauth and whereabouts RESTful APIs.

### Running the Cypress tests
Expand Down
2 changes: 1 addition & 1 deletion backend/log.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Logger from 'bunyan'

export default new Logger({
name: 'prisonStaffHub',
name: 'digital-prison-services',
streams: [
{
stream: process.stdout,
Expand Down
2 changes: 1 addition & 1 deletion backend/services/healthCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function healthcheckFactory(
Promise.all(checks.map((fn) => fn())).then((checkResults) => {
const allOk = checkResults.every((item) => item.status === 'UP') ? 'UP' : 'DOWN'
const result = {
name: 'prisonstaffhub',
name: 'digital-prison-services',
status: allOk,
api: checkResults.reduce(gatherCheckInfo, {}),
}
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/prisonerFullImage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('prisoner profile full image', () => {
})

it('should render with the correct back url if there is a referer', async () => {
const refererUrl = `//prisonStaffHubUrl/prisoner/${offenderNo}/personal`
const refererUrl = `//digitalPrisonServicesUrl/prisoner/${offenderNo}/personal`

req.headers.referer = refererUrl

Expand Down
4 changes: 2 additions & 2 deletions backend/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare namespace prisonstaffhub {
declare namespace digitalprisonservices {
interface UserSession {
userDetails: {
activeCaseLoadId: string
Expand All @@ -11,7 +11,7 @@ declare namespace Express {
import session = require('express-session')

interface Request {
session: session.Session & Partial<session.SessionData> & prisonstaffhub.UserSession
session: session.Session & Partial<session.SessionData> & digitalprisonservices.UserSession
csrfToken?: () => string
}
}
8 changes: 4 additions & 4 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3.1'
services:
prisonstaffhub-wiremock:
digital-prison-services-wiremock:
image: rodolpheche/wiremock
container_name: prisonstaffhub-wiremock
container_name: digital-prison-services-wiremock
restart: always
ports:
- "9191:8080"

prisonstaffhub-test-redis:
digital-prison-services-test-redis:
image: redis
container_name: prisonstaffhub-test-redis
container_name: digital-prison-services-test-redis
ports:
- 6379:6379
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
- SPRING_PROFILES_ACTIVE=nomis-hsqldb

whereaboutsapi:
image: 'mojdigitalstudio/whereabouts-api:latest'
image: 'quay.io/hmpps/whereabouts-api:latest'
container_name: whereaboutsapi
depends_on:
- oauth
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/integration/health.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ context('Health page reports health correctly', () => {
cy.task('stubHealthAllHealthy')
cy.task('stubAuthHealth', 500)
cy.task('stubPrisonApiHealth', 500)
cy.request({ url: '/health', method: 'GET', failOnStatusCode: false }).then(response => {
expect(response.body.name).to.equal('prisonstaffhub')
cy.request({ url: '/health', method: 'GET', failOnStatusCode: false }).then((response) => {
expect(response.body.name).to.equal('digital-prison-services')
// eslint-disable-next-line no-unused-expressions
expect(response.body.version).to.not.be.empty
expect(response.body.api).to.deep.equal({
Expand All @@ -26,9 +26,9 @@ context('Health page reports health correctly', () => {
it('Reports correctly when all are up', () => {
cy.task('reset')
cy.task('stubHealthAllHealthy')
cy.request('/health').then(response => {
cy.request('/health').then((response) => {
expect(response.body.uptime).to.be.greaterThan(0.0)
expect(response.body.name).to.equal('prisonstaffhub')
expect(response.body.name).to.equal('digital-prison-services')
// eslint-disable-next-line no-unused-expressions
expect(response.body.version).to.not.be.empty
expect(response.body.api).to.deep.equal({
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "prisonstaffhub",
"name": "digital-prison-sevices",
"version": "0.0.1",
"private": false,
"repository": "[email protected]:ministryofjustice/prisonstaffhub.git",
"repository": "[email protected]:ministryofjustice/digital-prison-sevices.git",
"license": "MIT",
"engines": {
"npm": ">=6",
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class App extends React.Component {
{shouldShowTerms && <Terms close={() => this.hideTermsAndConditions()} />}
{innerContent}
<FeedbackBanner />
<FooterContainer supportUrl={config.supportUrl} prisonStaffHubUrl="/" />
<FooterContainer supportUrl={config.supportUrl} digitalPrisonServicesUrl="/" />
</ScrollToTop>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('App component', () => {

expect(component.find(FooterContainer).props()).toEqual({
supportUrl: props.config.supportUrl,
prisonStaffHubUrl: '/',
digitalPrisonServicesUrl: '/',
})
})
})
8 changes: 4 additions & 4 deletions src/Components/FooterContainer/FooterContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const StyledFooter = styled(Footer)`
}
`

const FooterContainer = ({ supportUrl, prisonStaffHubUrl }) => {
const FooterContainer = ({ supportUrl, digitalPrisonServicesUrl }) => {
const copyright = {
text: 'Crown copyright',
link: 'https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/',
Expand All @@ -39,7 +39,7 @@ const FooterContainer = ({ supportUrl, prisonStaffHubUrl }) => {
const meta = (
<Footer.MetaLinks heading="Support links">
<Footer.Link href={supportUrl}>Feedback and support</Footer.Link>
<Footer.Link href={`${prisonStaffHubUrl}content/terms-conditions`} target="_blank">
<Footer.Link href={`${digitalPrisonServicesUrl}content/terms-conditions`} target="_blank">
Terms and conditions
</Footer.Link>
</Footer.MetaLinks>
Expand All @@ -50,11 +50,11 @@ const FooterContainer = ({ supportUrl, prisonStaffHubUrl }) => {

FooterContainer.propTypes = {
supportUrl: PropTypes.string.isRequired,
prisonStaffHubUrl: PropTypes.string,
digitalPrisonServicesUrl: PropTypes.string,
}

FooterContainer.defaultProps = {
prisonStaffHubUrl: undefined,
digitalPrisonServicesUrl: undefined,
}

export default FooterContainer
4 changes: 2 additions & 2 deletions src/redux/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export function globalSearch(state = globalSearchInitialState, action) {
}
}

const prisonStaffHubApp = combineReducers({
const digitalPrisonServicesApp = combineReducers({
events,
app,
search,
Expand All @@ -351,4 +351,4 @@ const prisonStaffHubApp = combineReducers({
flags: createFlagsReducer({}),
})

export default prisonStaffHubApp
export default digitalPrisonServicesApp

0 comments on commit c307bb9

Please sign in to comment.