-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from osmosis-labs/jonator/testnet
Add testnet
- Loading branch information
Showing
34 changed files
with
2,435 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
testMatch: ["**/src/**/?(*.)+(spec|test).[jt]s?(x)"], | ||
roots: ["<rootDir>/src/"], | ||
testMatch: ["**/__tests__/?(*.)+(spec|test).[jt]s?(x)"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
roots: ["<rootDir>/src/"], | ||
testMatch: ["**/src/**/?(*.)+(spec|test).[jt]s?(x)"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ build/* | |
types/* | ||
|
||
**/generated/** | ||
localnet | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ types/* | |
|
||
.prettierignore | ||
.eslintignore | ||
localnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
roots: ["<rootDir>/src/"], | ||
testMatch: ["**/__tests__/?(*.)+(spec|test).[jt]s?(x)"], | ||
globalSetup: "./src/__tests__/global-setup.ts", | ||
globalTeardown: "./src/__tests__/global-teardown.ts", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ubuntu as config | ||
|
||
RUN apt-get update && apt-get install -y git | ||
RUN git clone https://github.com/osmosis-labs/LocalOsmosis.git | ||
RUN mkdir -p /osmosis/.osmosisd/config && \ | ||
mv ./LocalOsmosis/config /osmosis/.osmosisd/ && \ | ||
mkdir -p /osmosis/.osmosisd/data && \ | ||
mv ./LocalOsmosis/data /osmosis/.osmosisd/ && \ | ||
mv ./LocalOsmosis/priv_validator_state.json /osmosis/.osmosisd/data | ||
|
||
#enable swagger | ||
RUN sed -i 's/swagger = false/swagger = true/g' /osmosis/.osmosisd/config/app.toml | ||
|
||
# use debug version for utils, like sh | ||
#FROM osmolabs/osmosis-dev:v9.0.0-debug | ||
FROM osmolabs/osmosis:9.0.0 | ||
|
||
COPY --from=config /osmosis/.osmosisd/config /osmosis/.osmosisd/config | ||
COPY --from=config /osmosis/.osmosisd/data /osmosis/.osmosisd/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { initLocalnet } from "./test-env"; | ||
|
||
module.exports = async () => { | ||
await initLocalnet(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { removeLocalnet } from "./test-env"; | ||
|
||
module.exports = async () => { | ||
await removeLocalnet(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
import { deepContained } from "./test-env"; | ||
|
||
describe("Test test env", () => { | ||
test("Test deep contain function", () => { | ||
const obj1 = { | ||
a: 2, | ||
}; | ||
|
||
expect(() => { | ||
deepContained(obj1, { | ||
a: 2, | ||
}); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained(obj1, { | ||
a: 3, | ||
}); | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
deepContained(obj1, { | ||
b: 2, | ||
}); | ||
}).toThrow(); | ||
}); | ||
|
||
test("Test deep contain function nested", () => { | ||
const obj2 = { | ||
a: 1, | ||
b: { | ||
c: 2, | ||
d: { | ||
e: 3, | ||
f: 4, | ||
}, | ||
}, | ||
}; | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
a: 1, | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: { | ||
c: 2, | ||
d: { | ||
e: 3, | ||
}, | ||
}, | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: { | ||
c: 2, | ||
d: { | ||
e: 4, | ||
}, | ||
}, | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: { | ||
c: 2, | ||
d: { | ||
e: { | ||
f: 4, | ||
}, | ||
}, | ||
}, | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
}); | ||
|
||
test("Test deep contain function with array", () => { | ||
const obj2 = { | ||
a: 1, | ||
b: [2, 3, 4, 5], | ||
}; | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
a: 1, | ||
b: [2], | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [2, 3], | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [2, 3, 6], | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
a: 1, | ||
b: [6], | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
a: 6, | ||
b: [2, 3], | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
}); | ||
|
||
test("Test deep contain function with array (2)", () => { | ||
const obj2 = { | ||
a: 1, | ||
b: [ | ||
{ | ||
c: { | ||
d: 2, | ||
}, | ||
}, | ||
{ | ||
c: { | ||
e: 3, | ||
}, | ||
}, | ||
{ | ||
f: { | ||
g: 4, | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
a: 1, | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [ | ||
{ | ||
c: { | ||
d: 2, | ||
}, | ||
}, | ||
], | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [ | ||
{ | ||
c: { | ||
d: 2, | ||
}, | ||
}, | ||
{ | ||
f: { | ||
g: 4, | ||
}, | ||
}, | ||
], | ||
}, | ||
obj2 | ||
); | ||
}).not.toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [ | ||
{ | ||
c: { | ||
d: 2, | ||
}, | ||
}, | ||
{ | ||
f: { | ||
g: 5, | ||
}, | ||
}, | ||
], | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
deepContained( | ||
{ | ||
b: [ | ||
{ | ||
c: { | ||
d: 2, | ||
}, | ||
}, | ||
{ | ||
a: 1, | ||
}, | ||
], | ||
}, | ||
obj2 | ||
); | ||
}).toThrow(); | ||
}); | ||
}); |
Oops, something went wrong.
fc757c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
osmosis-frontend – ./
osmosis-frontend.vercel.app
osmosis-frontend-osmo-labs.vercel.app
app.osmosis.zone
osmosis-frontend-git-master-osmo-labs.vercel.app
fc757c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
osmosis-frontier – ./
frontier.osmosis.zone
front.osmosis.zone
osmosis-frontier-git-master-osmo-labs.vercel.app
osmosis-frontier-osmo-labs.vercel.app
osmosis-frontier-new.vercel.app