Skip to content

Commit

Permalink
jest: rename fixtures folder
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jul 31, 2024
1 parent aa8033d commit eb838bd
Show file tree
Hide file tree
Showing 78 changed files with 19 additions and 19 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion __tests__/buildkit/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import * as rimraf from 'rimraf';
import {BuildKit} from '../../src/buildkit/buildkit';
import {Context} from '../../src/context';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildkit-config-'));
const tmpName = path.join(tmpDir, '.tmpname-jest');

Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/bake.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as path from 'path';
import {Bake} from '../../src/buildx/bake';
import {BakeDefinition} from '../../src/types/buildx/bake';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');

const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;

Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/bake.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {ExecOptions} from '@actions/exec';
import {BakeDefinition} from '../../src/types/buildx/bake';
import {BuildMetadata} from '../../src/types/buildx/build';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-bake-'));
const tmpName = path.join(tmpDir, '.tmpname-jest');
const metadata = JSON.parse(fs.readFileSync(path.join(fixturesDir, 'metadata-bake.json'), 'utf-8'));
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import * as rimraf from 'rimraf';
import {Context} from '../../src/context';
import {Build} from '../../src/buildx/build';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-build-'));
const tmpName = path.join(tmpDir, '.tmpname-jest');
const metadata = JSON.parse(fs.readFileSync(path.join(fixturesDir, 'metadata-build.json'), 'utf-8'));
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {Exec} from '../../src/exec';

import {BuilderInfo} from '../../src/types/buildx/builder';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');

jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
return {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/buildx.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {Build} from '../../src/buildx/build';
import {Bake} from '../../src/buildx/bake';
import {Exec} from '../../src/exec';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-buildx-itg-'));

const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/buildx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {Exec} from '../../src/exec';

import {Cert, LocalState} from '../../src/types/buildx/buildx';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-buildx-'));
const tmpName = path.join(tmpDir, '.tmpname-jest');

Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildx/history.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {Build} from '../../src/buildx/build';
import {History} from '../../src/buildx/history';
import {Exec} from '../../src/exec';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-history-itg-'));

const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/cache.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import path from 'path';

import {Cache} from '../src/cache';

const fixturesDir = path.join(__dirname, 'fixtures');
const fixturesDir = path.join(__dirname, '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'cache-itg-'));

describe('cache', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/docker/docker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {Docker} from '../../src/docker/docker';

import {ConfigFile} from '../../src/types/docker/docker';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-docker-'));

afterEach(function () {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/dockerhub.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import * as path from 'path';
import {DockerHub} from '../src/dockerhub';
import {RepositoryResponse, RepositoryTagsResponse} from '../src/types/dockerhub';

import repoInfoFixture from './fixtures/dockerhub-repoinfo.json';
import repoTagsFixture from './fixtures/dockerhub-repotags.json';
import repoAllTagsFixture from './fixtures/dockerhub-repoalltags.json';
import repoInfoFixture from './.fixtures/dockerhub-repoinfo.json';
import repoTagsFixture from './.fixtures/dockerhub-repotags.json';
import repoAllTagsFixture from './.fixtures/dockerhub-repoalltags.json';

describe('getRepository', () => {
it('returns repo info', async () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/github.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {Exec} from '../src/exec';
import {GitHub} from '../src/github';
import {History} from '../src/buildx/history';

const fixturesDir = path.join(__dirname, 'fixtures');
const fixturesDir = path.join(__dirname, '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'github-itg-'));

const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
Expand Down
6 changes: 3 additions & 3 deletions __tests__/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as core from '@actions/core';
import {GitHub} from '../src/github';
import {GitHubRepo} from '../src/types/github';

import repoFixture from './fixtures/github-repo.json';
import repoFixture from './.fixtures/github-repo.json';
jest.spyOn(GitHub.prototype, 'repoData').mockImplementation((): Promise<GitHubRepo> => {
return <Promise<GitHubRepo>>(repoFixture as unknown);
});
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('actionsRuntimeToken', () => {
});
it('fixture', async () => {
process.env.ACTIONS_RUNTIME_TOKEN = fs
.readFileSync(path.join(__dirname, 'fixtures', 'runtimeToken.txt'))
.readFileSync(path.join(__dirname, '.fixtures', 'runtimeToken.txt'))
.toString()
.trim();
const runtimeToken = GitHub.actionsRuntimeToken;
Expand Down Expand Up @@ -154,7 +154,7 @@ describe('printActionsRuntimeTokenACs', () => {
it('refs/heads/master', async () => {
const infoSpy = jest.spyOn(core, 'info');
process.env.ACTIONS_RUNTIME_TOKEN = fs
.readFileSync(path.join(__dirname, 'fixtures', 'runtimeToken.txt'))
.readFileSync(path.join(__dirname, '.fixtures', 'runtimeToken.txt'))
.toString()
.trim();
await GitHub.printActionsRuntimeTokenACs();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/oci/oci.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as rimraf from 'rimraf';

import {OCI} from '../../src/oci/oci';

const fixturesDir = path.join(__dirname, '..', 'fixtures');
const fixturesDir = path.join(__dirname, '..', '.fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'oci-oci-'));

afterEach(function () {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ FOO=bar`
});

it('large multiline values', async () => {
const pgp = fs.readFileSync(path.join(__dirname, 'fixtures', 'pgp.txt'), {encoding: 'utf-8'});
const pgp = fs.readFileSync(path.join(__dirname, '.fixtures', 'pgp.txt'), {encoding: 'utf-8'});
setInput(
'secrets',
`"GPG_KEY=${pgp}"
Expand Down

0 comments on commit eb838bd

Please sign in to comment.