Skip to content

Commit

Permalink
Update pr script scripting (#215)
Browse files Browse the repository at this point in the history
* Updated version and dependencies (#212)

* Updated version and dependencies

- Updated date-fns, react-datepicker, rc-progress, typescript, storybook, etc
- Updated storybook for v8

* Updated major version due to the many controller dependencies

* Fixed the test that was intermittently failing. Added await

* Update pr script (#214)

* Updated pr script to prompt for coverage/acceptance tests

* Added no-tabs eslint rule and fix errors

* Updated the pewpew acceptance and integration to match fixes in scripting
  • Loading branch information
tkmcmaster authored Mar 29, 2024
1 parent 8a6ec36 commit a99ece9
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 18 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"no-angle-bracket-type-assertion": 0,
"no-bitwise": 1,
"no-console": 1,
"no-tabs": 1,
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0, "maxBOF": 0 }],
"no-empty": [1, { "allowEmptyCatch": true }],
"no-empty-interface": 0,
Expand Down
2 changes: 1 addition & 1 deletion controller/acceptance/healthcheck.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { expect } from "chai";

const fetch = _axios.get;

// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
const integrationUrl = "http://" + (process.env.BUILD_APP_URL || `localhost:${process.env.PORT || "8081"}`);

describe("Healthcheck Integration", () => {
Expand Down
2 changes: 1 addition & 1 deletion controller/acceptance/pewpew.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const UNIT_TEST_FOLDER = process.env.UNIT_TEST_FOLDER || "test";
const PEWPEW_ZIP_LEGACY_FILEPATH = process.env.PEWPEW_ZIP_LEGACY_FILEPATH || path.join(UNIT_TEST_FOLDER, PEWPEW_BINARY_EXECUTABLE + ".zip");
const PEWPEW_ZIP_SCRIPTING_FILEPATH = process.env.PEWPEW_ZIP_SCRIPTING_FILEPATH || path.join(UNIT_TEST_FOLDER + "/scripting", PEWPEW_BINARY_EXECUTABLE + ".zip");

// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
const integrationUrl = "http://" + (process.env.BUILD_APP_URL || `localhost:${process.env.PORT || "8081"}`);

let sharedPewPewVersions: string[] | undefined;
Expand Down
2 changes: 1 addition & 1 deletion controller/acceptance/queues.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { expect } from "chai";

const fetch = _axios.get;

// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
const integrationUrl = "http://" + (process.env.BUILD_APP_URL || `localhost:${process.env.PORT || "8081"}`);

let sharedQueueNames: string[] | undefined;
Expand Down
2 changes: 1 addition & 1 deletion controller/acceptance/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const defaultEnvironmentVariables: EnvironmentVariablesFile = {
TEST2: "true"
};

// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
// Beanstalk <SYSTEM_NAME>_<SERVICE_NAME>_URL
export const integrationUrl = "http://" + (process.env.BUILD_APP_URL || `localhost:${process.env.PORT || "8081"}`);

let sharedPpaasTestId: PpaasTestId | undefined;
Expand Down
4 changes: 2 additions & 2 deletions controller/components/YamlWriterUpload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
if (types[mimeType] !== undefined) {
types[mimeType]!.index.push({ iter: i, id });
} else {
types[mimeType] = { index: [{ iter: i, id }], selected: "partial"};
types[mimeType] = { index: [{ iter: i, id }], selected: "partial"};
}

// Adds a reference to an endpoint with given response type
Expand All @@ -292,7 +292,7 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
} else {
urls[hostUrl] = { index: [{ iter: i, id }], selected: "yes"};
}
endpoints.push({ selected: "yes", url, type: mimeType, id, method: entry.request.method, headers: [...entry.request.headers] });
endpoints.push({ selected: "yes", url, type: mimeType, id, method: entry.request.method, headers: [...entry.request.headers] });
}

const typesTemp = types;
Expand Down
1 change: 1 addition & 0 deletions guide/results-viewer-react/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"no-angle-bracket-type-assertion": 0,
"no-bitwise": 1,
"no-console": 1,
"no-tabs": 1,
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0, "maxBOF": 0 }],
"no-empty": [1, { "allowEmptyCatch": true }],
"no-empty-interface": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
if (types[mimeType] !== undefined) {
types[mimeType]!.index.push({ iter: i, id });
} else {
types[mimeType] = { index: [{ iter: i, id }], selected: "partial"};
types[mimeType] = { index: [{ iter: i, id }], selected: "partial"};
}

// Adds a reference to an endpoint with given response type
Expand All @@ -291,7 +291,7 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
} else {
urls[hostUrl] = { index: [{ iter: i, id }], selected: "yes"};
}
endpoints.push({ selected: "yes", url, type: mimeType, id, method: entry.request.method, headers: [...entry.request.headers] });
endpoints.push({ selected: "yes", url, type: mimeType, id, method: entry.request.method, headers: [...entry.request.headers] });
}

const typesTemp = types;
Expand Down
38 changes: 28 additions & 10 deletions pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ cargo clippy --all -- -D warnings
cargo test --all
cargo test --all --doc

cargo deny check --hide-inclusion-graph license sources advisories

CWD=$(pwd)

cd "$CWD/lib/config-wasm"
Expand Down Expand Up @@ -61,13 +63,29 @@ npm run build:common
npm run build:react
NODE_ENV=test npm test

# npm run testcleanup
# npm run coverage
# echo grab screenshot

# npm run testcleanup
# echo Hit Ctrl-C when acceptance tests finish
# npm acceptance:all
# echo grab screenshot

cargo deny check --hide-inclusion-graph license sources advisories
read -e -p "Run Coverage Tests y/N: " choice
if [[ "$choice" == [Yy]* ]]; then
npm run testcleanup
# npm run coverage
# read -e -p "Grab screenshot then hit enter to continue." choice
npm run coverage:common
read -e -p "Grab common screenshot then hit enter to continue." choice
npm run coverage:controller
read -e -p "Grab controller screenshot then hit enter to continue." choice
npm run coverage:agent
read -e -p "Grab agent screenshot then hit enter to continue." choice
npm run testmerge
read -e -p "Grab overall screenshot then hit enter to continue." choice
fi

read -e -p "Run Acceptance Tests y/N: " choice
if [[ "$choice" == [Yy]* ]]; then
while [[ "$clean_result" != "0" ]]; do
(npm run testcleanup)
clean_result=$?
echo "clean_result: $clean_result"
done
echo Hit Ctrl-C when acceptance tests finish
npm run acceptance:all
read -e -p "Grab screenshot then hit enter to continue." choice
fi

0 comments on commit a99ece9

Please sign in to comment.