Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tunnel builds #306

Merged
merged 2 commits into from Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/lib/getEnv.js
Expand Up @@ -2,7 +2,7 @@
const {
CHROMATIC_SERVER_PORT = 3004,
CHROMATIC_INDEX_URL = 'https://index.chromatic.com',
CHROMATIC_TUNNEL_URL = 'https://tunnel.chromatic.com',
CHROMATIC_TUNNEL_URL = 'https://tunnel.chromaticqa.com',
CHROMATIC_CREATE_TUNNEL = 'true',
CHROMATIC_RETRIES = 5,
CHROMATIC_POLL_INTERVAL = 1000,
Expand Down
8 changes: 4 additions & 4 deletions bin/tasks/tunnel.test.js
Expand Up @@ -10,19 +10,19 @@ const log = { debug: jest.fn() };

describe('createTunnel', () => {
it('opens the tunnel and sets the isolatorUrl on context', async () => {
openTunnel.mockReturnValue({ url: 'https://tunnel.chromatic.com' });
openTunnel.mockReturnValue({ url: 'https://tunnel.chromaticqa.com' });

const ctx = { log, isolatorUrl: 'http://localhost:9001', options: {} };
await createTunnel(ctx);

expect(openTunnel).toHaveBeenCalledWith({ log, port: '9001', https: undefined });
expect(ctx.isolatorUrl).toBe('https://tunnel.chromatic.com/');
expect(ctx.isolatorUrl).toBe('https://tunnel.chromaticqa.com/');
});
});

describe('testConnection', () => {
it('tries to fetch the isolatorUrl', async () => {
testConnection({ isolatorUrl: 'https://tunnel.chromatic.com' });
expect(fetch).toHaveBeenCalledWith('https://tunnel.chromatic.com');
testConnection({ isolatorUrl: 'https://tunnel.chromaticqa.com' });
expect(fetch).toHaveBeenCalledWith('https://tunnel.chromaticqa.com');
});
});
2 changes: 1 addition & 1 deletion bin/tasks/verify.test.js
Expand Up @@ -28,7 +28,7 @@ describe('createBuild', () => {
git: { version: 'whatever', matchesBranch: () => false },
pkg: { version: '1.0.0' },
storybook: { version: '2.0.0', viewLayer: 'react', addons: [] },
isolatorUrl: 'https://tunnel.chromatic.com/',
isolatorUrl: 'https://tunnel.chromaticqa.com/',
};

it('creates a build on the index and puts it on context', async () => {
Expand Down
2 changes: 1 addition & 1 deletion bin/ui/tasks/tunnel.stories.js
Expand Up @@ -6,7 +6,7 @@ export default {
decorators: [(storyFn) => task(storyFn())],
};

const CHROMATIC_TUNNEL_URL = 'https://tunnel.chromatic.com';
const CHROMATIC_TUNNEL_URL = 'https://tunnel.chromaticqa.com';
const cachedUrl = 'https://fdeulpymiq.tunnel.chromatic.com/iframe.html';

export const Initial = () => initial;
Expand Down