Skip to content

Commit

Permalink
refactor(dev-env)!: replace vipdev.lndo.site with vipdev.site
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Aug 7, 2024
1 parent 7ebbb26 commit e2ce49d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions __fixtures__/dev-env-e2e/.lando_mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ env_file:
- .env
proxy:
nginx:
- vip-local.vipdev.lndo.site
- vip-local.vipdev.site

phpmyadmin:
- vip-local-pma.vipdev.lndo.site
- vip-local-pma.vipdev.site
services:

devtools:
Expand Down Expand Up @@ -156,7 +156,7 @@ services:


run:
- sh /dev-tools/setup.sh database root "http://vip-local.vipdev.lndo.site/" "VIP Dev"
- sh /dev-tools/setup.sh database root "http://vip-local.vipdev.site/" "VIP Dev"

database:
type: compose
Expand Down
12 changes: 6 additions & 6 deletions __tests__/commands/dev-env-sync-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe( 'commands/DevEnvSyncSQLCommand', () => {
},
};

const lando = new Lando( { domain: 'vipdev.lndo.site' } );
const lando = new Lando( { domain: 'vipdev.site' } );

describe( '.generateExport', () => {
it( 'should create an instance of ExportSQLCommand and run', async () => {
Expand All @@ -109,7 +109,7 @@ describe( 'commands/DevEnvSyncSQLCommand', () => {
cmd.siteUrls = [ 'test.go-vip.com' ];
cmd.generateSearchReplaceMap();

expect( cmd.searchReplaceMap ).toEqual( { 'test.go-vip.com': 'test-slug.vipdev.lndo.site' } );
expect( cmd.searchReplaceMap ).toEqual( { 'test.go-vip.com': 'test-slug.vipdev.site' } );
} );

it( 'should return a map of search-replace values for multisite', () => {
Expand All @@ -119,22 +119,22 @@ describe( 'commands/DevEnvSyncSQLCommand', () => {
cmd.generateSearchReplaceMap();

expect( cmd.searchReplaceMap ).toEqual( {
'test.go-vip.com': 'test-slug.vipdev.lndo.site',
'subsite.com': 'subsite-com-2.test-slug.vipdev.lndo.site',
'test.go-vip.com': 'test-slug.vipdev.site',
'subsite.com': 'subsite-com-2.test-slug.vipdev.site',
} );
} );
} );

describe( '.runSearchReplace', () => {
it( 'should run search-replace operation on the SQL file', async () => {
const cmd = new DevEnvSyncSQLCommand( app, env, 'test-slug', lando );
cmd.searchReplaceMap = { 'test.go-vip.com': 'test-slug.vipdev.lndo.site' };
cmd.searchReplaceMap = { 'test.go-vip.com': 'test-slug.vipdev.site' };
cmd.slug = 'test-slug';

await cmd.runSearchReplace();
expect( replace ).toHaveBeenCalledWith( mockReadStream, [
'test.go-vip.com',
'test-slug.vipdev.lndo.site',
'test-slug.vipdev.site',
] );
} );
} );
Expand Down
4 changes: 2 additions & 2 deletions __tests__/devenv-e2e/008-exec.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe( 'vip dev-env exec', () => {
true
);
expect( result.rc ).toBe( 0 );
expect( result.stdout ).toContain( `http://${ slug }.vipdev.lndo.site` );
expect( result.stdout ).toContain( `http://${ slug }.vipdev.site` );
} );

it( 'should fail on unknown commands', async () => {
Expand Down Expand Up @@ -115,7 +115,7 @@ describe( 'vip dev-env exec', () => {
true
);
expect( result.rc ).toBe( 0 );
expect( result.stdout.trim() ).toBe( `http://${ slug }.vipdev.lndo.site` );
expect( result.stdout.trim() ).toBe( `http://${ slug }.vipdev.site` );
} );

it( 'should not be verbose on non-zero exit code', async () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/devenv-e2e/010-import-sql.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe( 'vip dev-env import sql', () => {
const dumpFileName = path.join( tmpPath, 'dump.sql' );
await writeFile( dumpFileName, result.stdout );

const expectedHomeValue = 'http://test.vipdev.lndo.site';
const expectedHomeValue = 'http://test.vipdev.site';

result = await cliTest.spawn(
[
Expand All @@ -159,7 +159,7 @@ describe( 'vip dev-env import sql', () => {
slug,
dumpFileName,
'-r',
`http://${ slug }.vipdev.lndo.site,${ expectedHomeValue }`,
`http://${ slug }.vipdev.site,${ expectedHomeValue }`,
],
{ env },
true
Expand Down
4 changes: 2 additions & 2 deletions __tests__/lib/http/proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe( 'validate CreateProxyAgent', () => {
{ VIP_PROXY: '' },
{ HTTPS_PROXY: '' },
{ SOCKS_PROXY: '' },
{ NO_PROXY: 'wpAPI.org,.lndo.site,foo.bar.org' },
{ NO_PROXY: 'wpAPI.org,.vipdev.site,foo.bar.org' },
],
urlToHit: 'https://wpAPI.org/api',
},
Expand Down Expand Up @@ -169,7 +169,7 @@ describe( 'validate CreateProxyAgent', () => {
{ HTTPS_PROXY: 'https://myproxy.com' },
{ HTTP_PROXY: '' },
{ SOCKS_PROXY: '' },
{ NO_PROXY: 'wpAPI.org,.lndo.site,foo.bar.org' },
{ NO_PROXY: 'wpAPI.org,.vipdev.site,foo.bar.org' },
],
urlToHit: 'https://wpAPI2.org/api',
expectedClass: HttpsProxyAgent,
Expand Down
4 changes: 2 additions & 2 deletions src/bin/vip-dev-env-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const examples = [
' * A double dash ("--") must separate the arguments of "vip" from those of the "wp" command.',
},
{
usage: `${ exampleUsage } --slug=example-site -- wp user list --url=example.example-site.vipdev.lndo.site`,
usage: `${ exampleUsage } --slug=example-site -- wp user list --url=example.example-site.vipdev.site`,
description:
'Target the WP-CLI command against the network site "example.example-site.vipdev.lndo.site" of a local multisite environment.',
'Target the WP-CLI command against the network site "example.example-site.vipdev.site" of a local multisite environment.',
},
{
usage: `${ exampleUsage } --slug=example-site -- wp shell`,
Expand Down
10 changes: 5 additions & 5 deletions src/bin/vip-dev-env-import-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ const examples = [
'Import the SQL file named "file.sql" from a path on the user\'s local machine to a running local environment named "example-site".',
},
{
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --slug="example-site"`,
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.site" --slug="example-site"`,
description:
'Search for the string "example-site.com" in the SQL file and replace it with "example-site.vipdev.lndo.site" during the import.',
'Search for the string "example-site.com" in the SQL file and replace it with "example-site.vipdev.site" during the import.',
},
{
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --skip-reindex --slug="example-site"`,
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.site" --skip-reindex --slug="example-site"`,
description:
'Import the SQL file to a local environment with Elasticsearch enabled, and do not reindex after the import is completed.',
},
{
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --in-place`,
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.site" --in-place`,
description:
'Perform the search and replace operation on the local SQL file ("file.sql"), save the changes, and import the updated file to the local environment.',
},
{
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com/site-three,site-three.example-site.vipdev.lndo.site" --search-replace="example-site.com,example-site.vipdev.lndo.site" --slug="example-site"`,
usage: `${ exampleUsage } /Users/example/Downloads/file.sql --search-replace="example-site.com/site-three,site-three.example-site.vipdev.site" --search-replace="example-site.com,example-site.vipdev.site" --slug="example-site"`,
description:
'Search and replace 2 pairs of strings during the import of the SQL file to a local multisite environment.',
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dev-environment/dev-environment-lando.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function getLandoConfig(): Promise< LandoConfig > {
proxyName: 'vip-dev-env-proxy',
userConfRoot: landoDir,
home: fakeHomeDir,
domain: 'vipdev.lndo.site',
domain: 'vipdev.site',
version: 'unknown',
};

Expand Down

0 comments on commit e2ce49d

Please sign in to comment.