api替换
This commit is contained in:
@@ -56,11 +56,11 @@ sharedDependencies["../site-navigation"] = await compile("../site-navigation", {
|
||||
test("development uses its configured domain and supports legacy overrides", () => {
|
||||
delete environment.UPSTREAM_API_URL;
|
||||
delete environment.API_BASE_URL;
|
||||
assert.equal(config.getApiBaseUrl(), "http://172.104.181.99:26792");
|
||||
assert.equal(config.getApiBaseUrl(), "https://webhgcapi.mfcg.me");
|
||||
environment.APP_ENV = "test";
|
||||
assert.equal(config.getApiBaseUrl(), "http://172.104.181.99:26792");
|
||||
assert.equal(config.getApiBaseUrl(), "https://webhgcapi.mfcg.me");
|
||||
environment.APP_ENV = "production";
|
||||
assert.equal(config.getApiBaseUrl(), "http://139.162.49.252:21040");
|
||||
assert.equal(config.getApiBaseUrl(), "https://webhgcapi.mfcg.me");
|
||||
delete environment.APP_ENV;
|
||||
environment.API_BASE_URL = "https://legacy-api.example/";
|
||||
assert.equal(config.getApiBaseUrl(), "https://legacy-api.example");
|
||||
|
||||
@@ -277,8 +277,8 @@ test("project profiles and Next configuration keep the requested API and port wi
|
||||
assert.equal(
|
||||
command.env.UPSTREAM_API_URL,
|
||||
environment === "production"
|
||||
? "http://139.162.49.252:21040"
|
||||
: "http://172.104.181.99:26792",
|
||||
? "https://webhgcapi.mfcg.me"
|
||||
: "https://webhgcapi.mfcg.me",
|
||||
);
|
||||
assert.equal(command.env.API_BASE_URL, command.env.UPSTREAM_API_URL);
|
||||
assert.equal(
|
||||
|
||||
Reference in New Issue
Block a user