diff --git a/test/index.test.ts b/test/index.test.ts index 1f94128..553cc00 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -12,7 +12,7 @@ import { createValidInputFixtureWithTags, sampleStorage, } from './schemas/input.fixture' -import { setupEnvs } from './setupEnvs' +import { setupAWSEnvs } from './setupAWSEnvs' import SyncCloudStorage from '../src' import { InvalidConfigError } from '../src/errors' import { createStorage, deleteStorage } from '../src/providers/s3/buckets' @@ -41,7 +41,7 @@ const setupStorage = async (client: S3Client, storage: Storage) => { describe('SyncCloudStorage', () => { beforeAll(async () => { - await setupEnvs() + await setupAWSEnvs() }) describe('Constructor Related Tests', () => { diff --git a/test/setupEnvs.ts b/test/setupAWSEnvs.ts similarity index 90% rename from test/setupEnvs.ts rename to test/setupAWSEnvs.ts index 0cfdcde..5ad2afa 100644 --- a/test/setupEnvs.ts +++ b/test/setupAWSEnvs.ts @@ -8,7 +8,7 @@ const checkEnvVariables = (env: NodeJS.ProcessEnv) => { return env.AWS_REGION && env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY } -export const setupEnvs = async (): Promise => { +export const setupAWSEnvs = async (): Promise => { const { credentialsFile, configFile } = await loadSharedConfigFiles({ ignoreCache: true, }) @@ -17,7 +17,7 @@ export const setupEnvs = async (): Promise => { const credentials = credentialsFile[profile] const config = configFile[profile] - if (!credentials && !config && checkEnvVariables(process.env)) { + if (!credentials || checkEnvVariables(process.env)) { logger.info( "AWS Region & Credentials not found in '~/.aws/credentials & '~/.aws/config'!" )