From c4420face371908bed1eeed9c99057e0bb51380a Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Sat, 13 Jan 2024 11:51:26 -0800 Subject: [PATCH] tests: Replace broken URL in tests --- .github/workflows/tests.yaml | 3 --- docs/cadt_rpc_api.md | 4 ++-- package.json | 2 +- src/models/organizations/organizations.stub.js | 6 +++--- tests/resources/organization.spec.js | 4 ++-- tests/resources/projects.spec.js | 4 ++-- tests/test-fixtures/organization-fixtures.js | 2 +- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5dd10f77..47475875 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,9 +8,6 @@ on: branches: - '**' -env: - PICKLIST_URL: https://climate-warehouse.s3.us-west-2.amazonaws.com/public/picklists.json - jobs: test: name: NPM Tests diff --git a/docs/cadt_rpc_api.md b/docs/cadt_rpc_api.md index 05b58e69..30f2b097 100644 --- a/docs/cadt_rpc_api.md +++ b/docs/cadt_rpc_api.md @@ -104,7 +104,7 @@ curl --location --request GET 'localhost:31310/v1/organizations' --header 'Conte "77641db780adc6c74f1ff357804e26a799e4a09157f426aac588963a39bdb2d9":{ "orgUid":"77641db780adc6c74f1ff357804e26a799e4a09157f426aac588963a39bdb2d9", "name":"Org Test", - "icon":"https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg", + "icon":"https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg", "isHome":true, "subscribed":true } @@ -130,7 +130,7 @@ curl --location -g --request POST 'localhost:31310/v1/organizations/' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Sample Org", - "icon": "https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg" + "icon": "https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg" }' // Response diff --git a/package.json b/package.json index 604ad768..6c717b01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cadt", - "version": "1.7.6", + "version": "1.7.7", "_comment": "DONT CHANGE MAJOR UNLESS DATAMODEL CHANGES: The major version corresponds to the datamodel version your using, so 2.0.0 means it'll use datamodel v2", "private": true, "bin": "build/server.js", diff --git a/src/models/organizations/organizations.stub.js b/src/models/organizations/organizations.stub.js index 27ca2c62..bac76339 100644 --- a/src/models/organizations/organizations.stub.js +++ b/src/models/organizations/organizations.stub.js @@ -4,7 +4,7 @@ export default [ name: 'My Org', registryId: '9144c974e146920088514534c89371dc269d1b894a2c7f6cedeb80b804c6cd02', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', subscribed: true, isHome: true, }, @@ -13,7 +13,7 @@ export default [ name: 'Earl Registry', registryId: '047b74ea567f7591f463f29dcec4cab1e760ef181c006fb3865a3e20ca6144aa', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/austria.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', subscribed: false, isHome: false, }, @@ -22,7 +22,7 @@ export default [ name: 'Kyles Org Registry', registryId: 'eb9f9440f11f2705dd97da824f6f27079cbde3ad4ff4252539f17c8f0c08a4f9', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/denmark.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', subscribed: false, isHome: false, }, diff --git a/tests/resources/organization.spec.js b/tests/resources/organization.spec.js index 0b5c6306..6971cff3 100644 --- a/tests/resources/organization.spec.js +++ b/tests/resources/organization.spec.js @@ -43,7 +43,7 @@ describe('Orgainzation Resource CRUD', function () { const response = await supertest(app).post(`/v1/organizations`).send({ name: 'My Org', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', }); expect(response.body.message).to.equal( @@ -56,7 +56,7 @@ describe('Orgainzation Resource CRUD', function () { expect(Object.values(response.body)[0].name).to.equal('My Org'); expect(Object.values(response.body)[0].icon).to.equal( - 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', ); }).timeout(TEST_WAIT_TIME * 10); }); diff --git a/tests/resources/projects.spec.js b/tests/resources/projects.spec.js index bcb87e76..5accead0 100644 --- a/tests/resources/projects.spec.js +++ b/tests/resources/projects.spec.js @@ -138,7 +138,7 @@ describe('Project Resource CRUD', function () { await supertest(app).post(`/v1/organizations`).send({ name: 'Test', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', }); }); @@ -249,7 +249,7 @@ describe('Project Resource CRUD', function () { await supertest(app).post(`/v1/organizations`).send({ name: 'Test', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', }); }).timeout(TEST_WAIT_TIME * 10); it('errors if there is a current set of pending commits', function () {}); diff --git a/tests/test-fixtures/organization-fixtures.js b/tests/test-fixtures/organization-fixtures.js index 589b8197..6de76157 100644 --- a/tests/test-fixtures/organization-fixtures.js +++ b/tests/test-fixtures/organization-fixtures.js @@ -4,7 +4,7 @@ import app from '../../src/server'; export const createTestHomeOrg = async () => { const response = await supertest(app).post(`/v1/organizations`).send({ name: 'My Org', - icon: 'https://climate-warehouse.s3.us-west-2.amazonaws.com/public/orgs/me.svg', + icon: 'https://www.chia.net/wp-content/uploads/2023/01/chia-logo-dark.svg', }); console.log('Creating home org', response.body);