Skip to content

Commit

Permalink
fixes hidden linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredperreault-okta committed Oct 29, 2022
1 parent 155a27b commit 60a4484
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ source ${OKTA_HOME}/${REPO}/scripts/setup.sh
export TEST_SUITE_TYPE="checkstyle"
export TEST_RESULT_FILE_DIR="${REPO}/build2"

create_log_group "test:types"
if ! yarn test:types; then
echo "tsd failed! Exiting..."
exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL}
fi
finish_log_group $?

create_log_group "lint_report"
if ! yarn lint:report; then
# run `yarn lint` so the linting errors appear in the bacon logs
yarn lint
echo "lint failed! Exiting..."
exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL}
fi
finish_log_group $?

# TODO: fix types in @okta/test.app
# JIRA: https://oktainc.atlassian.net/browse/OKTA-529625
Expand All @@ -22,13 +28,15 @@ fi
# exit ${TEST_FAILURE}
# fi

create_log_group "verify:package"
mkdir -p ${TEST_RESULT_FILE_DIR}
if ! yarn verify:package 2> ${TEST_RESULT_FILE_DIR}/verify-package-error.log; then
echo "verify package failed! Exiting..."
value=`cat ${TEST_RESULT_FILE_DIR}/verify-package-error.log`
log_custom_message "Verification Failed" "${value}"
exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL}
fi
finish_log_group $?

echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE}
echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE}
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/cucumber.wdio.conf.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Options } from '@wdio/types';
import type { WebdriverIO } from '@wdio/types/build/Options';
const wdioConfig = require('./wdio.conf');
const { capabilities, services, reporters, ...conf } = wdioConfig.config;
const { capabilities, services, ...conf } = wdioConfig.config;

const DEBUG = process.env.DEBUG;

Expand Down
8 changes: 5 additions & 3 deletions test/support/monolith/create-env.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// eslint-disable-next-line no-undef, node/no-missing-import
import * as dockolith from '@okta/dockolith';
import { writeFileSync } from 'fs';
import * as path from 'path';

// Bootstraps a local monolith instance
/* eslint max-statements: [2, 60], complexity: [2, 10] */
async function bootstrap() {
const subDomain = process.env.TEST_ORG_SUBDOMAIN || 'authjs-test-' + Date.now();
const outputFilePath = path.join(__dirname, '../../../', '.bacon.env');
Expand Down Expand Up @@ -120,7 +122,7 @@ async function bootstrap() {
};

// Set Feature flags
console.error('Setting feature flags...')
console.error('Setting feature flags...');
for (const option of options.enableFFs) {
await dockolith.enableFeatureFlag(config, orgId, option);
}
Expand Down Expand Up @@ -161,7 +163,7 @@ async function bootstrap() {
});

// Create apps
const createdApps: any[] = []
const createdApps: any[] = [];
for (const option of options.apps) {
console.error(`Creating app "${option.label}"`);
const app = await dockolith.createApp(config, {
Expand Down Expand Up @@ -221,7 +223,7 @@ async function bootstrap() {

USERNAME: user1.profile.login,
PASSWORD: options.users[0].password,
}
};

console.error(`Writing output to: ${outputFilePath}`);

Expand Down

0 comments on commit 60a4484

Please sign in to comment.