generated from cloud-gov/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #583 from cloud-gov/eoc/529
Add welcome mat with homepage redirects
- Loading branch information
Showing
36 changed files
with
685 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,6 @@ CF_API_TOKEN= | |
# https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser | ||
NEXT_PUBLIC_USER_INVITE_URL=https://account.dev.us-gov-west-1.aws-us-gov.cloud.gov/invite | ||
NEXT_PUBLIC_CLOUD_SUPPORT_URL="mailto:[email protected]?body=What+is+your+question%3F%0D%0A%0D%0APlease+provide+your+application+name+or+URL.+Do+not+include+any+sensitive+information+about+your+platform+in+this+email." | ||
|
||
# feed for cloud.gov blog posts | ||
NEXT_PUBLIC_BLOG_FEED_URL=https://cloud.gov/updates.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import nock from 'nock'; | ||
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals'; | ||
import { fetchXML, getBlogFeed } from '@/api/blog/blog'; | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
|
||
const blogFeedXml = fs.readFileSync( | ||
path.join(__dirname, '/../mocks/blogFeed.xml'), | ||
'utf8' | ||
); | ||
|
||
const blogUrl = new URL(process.env.NEXT_PUBLIC_BLOG_FEED_URL); | ||
|
||
beforeEach(() => { | ||
if (!nock.isActive()) { | ||
nock.activate(); | ||
} | ||
}); | ||
|
||
afterEach(() => { | ||
nock.cleanAll(); | ||
// https://github.com/nock/nock#memory-issues-with-jest | ||
nock.restore(); | ||
}); | ||
|
||
describe('fetchXML', () => { | ||
describe('on success', () => { | ||
it('returns xml as text', async () => { | ||
// setup | ||
nock(blogUrl.origin).get(blogUrl.pathname).reply(200, blogFeedXml); | ||
// act | ||
const result = await fetchXML(blogUrl); | ||
// assert | ||
expect(result).toEqual(blogFeedXml); | ||
}); | ||
}); | ||
describe('on request error', () => { | ||
it('throws error', async () => { | ||
// setup | ||
nock(blogUrl.origin).get(blogUrl.pathname).reply(500); | ||
// act | ||
expect(async () => { | ||
await fetchXML(blogUrl); | ||
}).rejects.toThrow(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('getBlogFeed', () => { | ||
describe('on success', () => { | ||
it('returns blog feed as parsed json', async () => { | ||
// setup | ||
nock(blogUrl.origin).get(blogUrl.pathname).reply(200, blogFeedXml); | ||
// act | ||
const blog = await getBlogFeed(); | ||
// assert | ||
const post = blog.feed.entry[0]; | ||
const title = post.title._text; | ||
const pubDate = post.published._text; | ||
const link = post.id._text; | ||
const summary = post.summary._cdata; | ||
expect(title).toEqual('August 8th Cloud.gov Release Notes'); | ||
expect(pubDate).toEqual('2024-08-08T00:00:00+00:00'); | ||
expect(link).toEqual('https://cloud.gov/2024/08/08/release-notes'); | ||
expect(summary).toEqual( | ||
'The Cloud.gov team is working on providing release notes so everyone can see new features and updates.' | ||
); | ||
}); | ||
}); | ||
|
||
describe('on request error', () => { | ||
it('throws error', async () => { | ||
// setup | ||
nock(blogUrl.origin).get(blogUrl.pathname).reply(500); | ||
// act | ||
expect(async () => { | ||
await getBlogFeed(); | ||
}).rejects.toThrow(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="https://cloud.gov/updates.xml" rel="self" type="application/atom+xml" /><link href="https://cloud.gov/" rel="alternate" type="text/html" /><updated>2024-10-22T17:19:40+00:00</updated><id>https://cloud.gov/updates.xml</id><title type="html">cloud.gov</title><subtitle>Expedite your agency’s path to a secure and compliant cloud. cloud.gov provides an application environment that enables rapid deployment and ATO assessment for modern web applications.</subtitle><entry><title type="html">August 8th Cloud.gov Release Notes</title><link href="https://cloud.gov/2024/08/08/release-notes/" rel="alternate" type="text/html" title="August 8th Cloud.gov Release Notes" /><published>2024-08-08T00:00:00+00:00</published><updated>2024-08-08T19:21:35+00:00</updated><id>https://cloud.gov/2024/08/08/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The Cloud.gov team is working on providing release notes so everyone can see new features and updates.]]></summary></entry><entry><title type="html">May 30th Cloud.gov Release Notes</title><link href="https://cloud.gov/2024/05/30/release-notes/" rel="alternate" type="text/html" title="May 30th Cloud.gov Release Notes" /><published>2024-05-30T00:00:00+00:00</published><updated>2024-05-30T13:50:09+00:00</updated><id>https://cloud.gov/2024/05/30/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The Cloud.gov team is working on providing release notes so everyone can see new features and updates.]]></summary></entry><entry><title type="html">May 16th Cloud.gov Release Notes</title><link href="https://cloud.gov/2024/05/16/release-notes/" rel="alternate" type="text/html" title="May 16th Cloud.gov Release Notes" /><published>2024-05-16T00:00:00+00:00</published><updated>2024-05-16T17:51:52+00:00</updated><id>https://cloud.gov/2024/05/16/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The Cloud.gov team is working on providing release notes so everyone can see new features and updates.]]></summary></entry><entry><title type="html">April 18th cloud.gov Change Log</title><link href="https://cloud.gov/2024/04/18/release-notes/" rel="alternate" type="text/html" title="April 18th cloud.gov Change Log" /><published>2024-04-18T00:00:00+00:00</published><updated>2024-04-18T17:21:01+00:00</updated><id>https://cloud.gov/2024/04/18/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">April 4th cloud.gov Change Log</title><link href="https://cloud.gov/2024/04/04/release-notes/" rel="alternate" type="text/html" title="April 4th cloud.gov Change Log" /><published>2024-04-04T00:00:00+00:00</published><updated>2024-04-04T13:07:53+00:00</updated><id>https://cloud.gov/2024/04/04/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">March 21st cloud.gov Change Log</title><link href="https://cloud.gov/2024/03/21/release-notes/" rel="alternate" type="text/html" title="March 21st cloud.gov Change Log" /><published>2024-03-21T00:00:00+00:00</published><updated>2024-05-09T15:04:18+00:00</updated><id>https://cloud.gov/2024/03/21/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">March 7th cloud.gov Change Log</title><link href="https://cloud.gov/2024/03/07/release-notes/" rel="alternate" type="text/html" title="March 7th cloud.gov Change Log" /><published>2024-03-07T00:00:00+00:00</published><updated>2024-04-08T12:44:28+00:00</updated><id>https://cloud.gov/2024/03/07/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">February 23rd cloud.gov Change Log</title><link href="https://cloud.gov/2024/02/23/release-notes/" rel="alternate" type="text/html" title="February 23rd cloud.gov Change Log" /><published>2024-02-23T00:00:00+00:00</published><updated>2024-02-23T17:35:47+00:00</updated><id>https://cloud.gov/2024/02/23/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">February 8th cloud.gov Change Log</title><link href="https://cloud.gov/2024/02/08/release-notes/" rel="alternate" type="text/html" title="February 8th cloud.gov Change Log" /><published>2024-02-08T00:00:00+00:00</published><updated>2024-02-08T18:12:33+00:00</updated><id>https://cloud.gov/2024/02/08/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">January 25th cloud.gov Change Log</title><link href="https://cloud.gov/2024/01/25/release-notes/" rel="alternate" type="text/html" title="January 25th cloud.gov Change Log" /><published>2024-01-25T00:00:00+00:00</published><updated>2024-01-25T13:28:27+00:00</updated><id>https://cloud.gov/2024/01/25/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">December 29th cloud.gov Change Log</title><link href="https://cloud.gov/2023/12/29/release-notes/" rel="alternate" type="text/html" title="December 29th cloud.gov Change Log" /><published>2023-12-29T00:00:00+00:00</published><updated>2023-12-29T17:51:48+00:00</updated><id>https://cloud.gov/2023/12/29/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">December 12th cloud.gov Change Log</title><link href="https://cloud.gov/2023/12/12/release-notes/" rel="alternate" type="text/html" title="December 12th cloud.gov Change Log" /><published>2023-12-12T00:00:00+00:00</published><updated>2023-12-12T18:15:41+00:00</updated><id>https://cloud.gov/2023/12/12/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">November 27th cloud.gov Change Log</title><link href="https://cloud.gov/2023/11/27/release-notes/" rel="alternate" type="text/html" title="November 27th cloud.gov Change Log" /><published>2023-11-27T00:00:00+00:00</published><updated>2023-11-27T16:26:15+00:00</updated><id>https://cloud.gov/2023/11/27/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">New platform protections against malicious activity</title><link href="https://cloud.gov/2023/11/09/platform-protections/" rel="alternate" type="text/html" title="New platform protections against malicious activity" /><published>2023-11-09T00:00:00+00:00</published><updated>2023-11-09T21:01:40+00:00</updated><id>https://cloud.gov/2023/11/09/platform-protections</id><author><name></name></author><summary type="html"><![CDATA[In response to some recent incidents that caused outages on the platform, the cloud.gov team has added new platform protections against malicious activity. Notably, the team has added rate limiting by IP address to mitigate the effect of surges of malicious traffic on the platform.]]></summary></entry><entry><title type="html">November 9th cloud.gov Change Log</title><link href="https://cloud.gov/2023/11/09/release-notes/" rel="alternate" type="text/html" title="November 9th cloud.gov Change Log" /><published>2023-11-09T00:00:00+00:00</published><updated>2023-11-14T22:57:38+00:00</updated><id>https://cloud.gov/2023/11/09/release-notes</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov team is working on providing change logs so everyone can see new features and updates.]]></summary></entry><entry><title type="html">Updating existing instances to gp3 storage volumes is now supported</title><link href="https://cloud.gov/2023/10/11/update-existing-instances-gp3-now-available/" rel="alternate" type="text/html" title="Updating existing instances to gp3 storage volumes is now supported" /><published>2023-10-11T00:00:00+00:00</published><updated>2023-10-11T15:50:42+00:00</updated><id>https://cloud.gov/2023/10/11/update-existing-instances-gp3-now-available</id><author><name></name></author><summary type="html"><![CDATA[Updating to gp3 storage volumes for existing RDS and Elasticsearch/Opensearch instances is now supported]]></summary></entry><entry><title type="html">cloud.gov Page’s Federalist ATO Extension</title><link href="https://cloud.gov/2023/09/25/federalist-ato/" rel="alternate" type="text/html" title="cloud.gov Page’s Federalist ATO Extension" /><published>2023-09-25T00:00:00+00:00</published><updated>2023-09-28T22:26:41+00:00</updated><id>https://cloud.gov/2023/09/25/federalist-ato</id><author><name></name></author><summary type="html"><![CDATA[The cloud.gov Pages’s Federalist ATO has been extended until February 28th, 2024]]></summary></entry><entry><title type="html">Brokered storage volumes upgraded to gp3</title><link href="https://cloud.gov/2023/09/18/storage-volumes-gp3/" rel="alternate" type="text/html" title="Brokered storage volumes upgraded to gp3" /><published>2023-09-18T00:00:00+00:00</published><updated>2023-09-18T20:59:17+00:00</updated><id>https://cloud.gov/2023/09/18/storage-volumes-gp3</id><author><name></name></author><summary type="html"><![CDATA[Storage volumes across all brokered plans have been upgraded to gp3]]></summary></entry><entry><title type="html">Announcing FedRAMP CSP Community mailing list</title><link href="https://cloud.gov/2023/08/01/fedramp-csp-community/" rel="alternate" type="text/html" title="Announcing FedRAMP CSP Community mailing list" /><published>2023-08-01T00:00:00+00:00</published><updated>2023-08-01T19:37:53+00:00</updated><id>https://cloud.gov/2023/08/01/fedramp-csp-community</id><author><name></name></author><summary type="html"><![CDATA[Email [email protected] from your CSP email to join]]></summary></entry><entry><title type="html">New versions of PostgreSQL supported</title><link href="https://cloud.gov/2023/08/01/postgresql-versions-update/" rel="alternate" type="text/html" title="New versions of PostgreSQL supported" /><published>2023-08-01T00:00:00+00:00</published><updated>2024-08-02T14:06:54+00:00</updated><id>https://cloud.gov/2023/08/01/postgresql-versions-update</id><author><name></name></author><summary type="html"><![CDATA[PostgreSQL versions 13, 14, and 15 are now fully supported on cloud.gov]]></summary></entry></feed> |
Oops, something went wrong.