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

Codespell #1142

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Zombienet aims to be a testing framework for Substrate based blockchains, provid
tool that allows users to spawn and test ephemeral networks. The assertions used in the tests can
include on-chain storage, metrics, logs and custom javascript scripts that interact with the chain.
To make it easy to define those, zombienet has a `natural language` built-in allowing developers to
write tests as smooth as posible.
write tests as smooth as possible.

Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different
backend `providers` to run the *nodes*, at this moment `kubernetes`, `podman` and `native` are
supported.
supported.

**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines.
Although `podman` comes with support for macOS, it is done using an internal VM and the Zombienet provider code expects `podman` to be running natively.
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/src/zombienet.pest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Helpers
WHITESPACE = _{ " " | "\t" | "\r" | "\n" }
/// matches permited node's names
/// matches permitted node's names
name = @{ (ASCII_ALPHANUMERIC | "-")+ }
/// matched any integer
int = @{ "-" ? ~ ("0" | '1'..'9' ~ '0'..'9' * ) }
Expand Down
4 changes: 2 additions & 2 deletions docs/book/cli/spawn.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h1 class="menu-title">🧟🧟🧟 ZombieNet 🧟🧟🧟</h1>
<div id="content" class="content">
<main>
<h1 id="spawning"><a class="header" href="#spawning">Spawning</a></h1>
<p>One of the goal of ZombieNet is easily spawn ephemeral networks, providing a simple but poweful <em>cli</em> that allow you to declare the desired network in <code>toml</code> or <code>json</code> format. You can check the <a href="../network-definition-spec.html">definition spec</a> to view the available options.</p>
<p>One of the goal of ZombieNet is easily spawn ephemeral networks, providing a simple but powerful <em>cli</em> that allow you to declare the desired network in <code>toml</code> or <code>json</code> format. You can check the <a href="../network-definition-spec.html">definition spec</a> to view the available options.</p>
<p>A <strong>minimal</strong> configuration example with two validators and one parachain:</p>
<pre><code class="language-toml">[settings]
timeout = 1000
Expand All @@ -166,7 +166,7 @@ <h1 id="spawning"><a class="header" href="#spawning">Spawning</a></h1>
image = &quot;paritypr/colander:4131-ccd09bbf&quot;
command = &quot;adder-collator&quot;
</code></pre>
<p>Then you can spwan the network by running the following command:</p>
<p>Then you can spawn the network by running the following command:</p>
<pre><code class="language-bash">./zombienet-macos spawn examples/0001-small-network.toml
</code></pre>
<p>You can follow the output of the <code>steps</code> to spawn the network and once the network is launched a message with the <code>node</code>s information like this one is show</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/book/cli/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h1 class="menu-title">🧟🧟🧟 ZombieNet 🧟🧟🧟</h1>
<h1 id="testing"><a class="header" href="#testing">Testing</a></h1>
<p>The other goal of ZombieNet is provide a way to perform test/assertions agins the spawned network, using a set of <code>natural language expressions</code> that allow to make assertions based on metrics, logs and some <code>built-in</code> function that query the network using <code>polkadot.js</code>.
Those assertions should be defined in a <em>feature test</em>, and the <code>dsl</code> and format is documented in <a href="./test-dsl-definition-spec.html">here</a>.</p>
<p>The following is an small example to spawn a network (using the previos <code>simple network definition</code>) and assert that:</p>
<p>The following is an small example to spawn a network (using the previous <code>simple network definition</code>) and assert that:</p>
<ul>
<li>Both <code>nodes</code> are running</li>
<li>The definded <code>parachain</code> is registered</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/book/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h1 class="menu-title">🧟🧟🧟 ZombieNet 🧟🧟🧟</h1>
<div id="content" class="content">
<main>
<h1 id="installation"><a class="header" href="#installation">Installation</a></h1>
<p>ZombieNet releases are available in <code>github</code>. Each one provide an executable for both <code>linux</code> and <code>macos</code> crated with <a href="https://github.com/vercel/pkg">pkg</a> and allow to run <code>zombienet</code> cli <em>without</em> having <code>Node.js</code> installed <strong>but</strong> each <code>provider</code> define it's own requirements (e.g. k8s, podman).</p>
<p>ZombieNet releases are available in <code>github</code>. Each one provide an executable for both <code>linux</code> and <code>macos</code> created with <a href="https://github.com/vercel/pkg">pkg</a> and allow to run <code>zombienet</code> cli <em>without</em> having <code>Node.js</code> installed <strong>but</strong> each <code>provider</code> define it's own requirements (e.g. k8s, podman).</p>

</main>

Expand Down
8 changes: 4 additions & 4 deletions docs/book/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h1 id="what-is-zombienet"><a class="header" href="#what-is-zombienet">What is Z
<p>ZombieNet aims to be a testing framework for Substrate based blockchains, providing a simple CLI tool that allowS users to spawn and test ephemeral networks. The assertions used in the tests can include on-chain storage, metrics, logs and custom JS scripts that interact with the chain. To make these easy to define, Zombienet uses a built-in natural language tool to write tests as smoothly as possible.</p>
<p>Internally, it's a JS library designed to run on NodeJS and support different backend providers to run the various blockchain nodes. Currently, Kubernetes, Podman and native are the supported providers.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="installation"><a class="header" href="#installation">Installation</a></h1>
<p>ZombieNet releases are available in <code>github</code>. Each one provide an executable for both <code>linux</code> and <code>macos</code> crated with <a href="https://github.com/vercel/pkg">pkg</a> and allow to run <code>zombienet</code> cli <em>without</em> having <code>Node.js</code> installed <strong>but</strong> each <code>provider</code> define it's own requirements (e.g. k8s, podman).</p>
<p>ZombieNet releases are available in <code>github</code>. Each one provide an executable for both <code>linux</code> and <code>macos</code> created with <a href="https://github.com/vercel/pkg">pkg</a> and allow to run <code>zombienet</code> cli <em>without</em> having <code>Node.js</code> installed <strong>but</strong> each <code>provider</code> define it's own requirements (e.g. k8s, podman).</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="kubernetes-requirements"><a class="header" href="#kubernetes-requirements">Kubernetes requirements</a></h1>
<p>Zombienet should work with any k8s cluster (e.g <a href="https://cloud.google.com/kubernetes-engine">GKE</a>, <a href="https://docs.docker.com/desktop/kubernetes/">docker-desktop</a>, <a href="https://kind.sigs.k8s.io/">kind</a>) <strong>but</strong> you need to have <code>kubectl</code> installed to interact with your cluster.</p>
<p>Also, you need <em>permission</em> to create resources (e.g <code>namespaces</code>, <code>pods</code> and <code>cronJobs</code>) in the target cluster.</p>
Expand Down Expand Up @@ -238,7 +238,7 @@ <h2 id="download-and-install-needed-artifacts"><a class="header" href="#download
export PATH=/home/&lt;username&gt;/zombienet/dist:$PATH
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="spawning"><a class="header" href="#spawning">Spawning</a></h1>
<p>One of the goal of ZombieNet is easily spawn ephemeral networks, providing a simple but poweful <em>cli</em> that allow you to declare the desired network in <code>toml</code> or <code>json</code> format. You can check the <a href="cli/../network-definition-spec.html">definition spec</a> to view the available options.</p>
<p>One of the goal of ZombieNet is easily spawn ephemeral networks, providing a simple but powerful <em>cli</em> that allow you to declare the desired network in <code>toml</code> or <code>json</code> format. You can check the <a href="cli/../network-definition-spec.html">definition spec</a> to view the available options.</p>
<p>A <strong>minimal</strong> configuration example with two validators and one parachain:</p>
<pre><code class="language-toml">[settings]
timeout = 1000
Expand All @@ -261,7 +261,7 @@ <h2 id="download-and-install-needed-artifacts"><a class="header" href="#download
image = &quot;paritypr/colander:4131-ccd09bbf&quot;
command = &quot;adder-collator&quot;
</code></pre>
<p>Then you can spwan the network by running the following command:</p>
<p>Then you can spawn the network by running the following command:</p>
<pre><code class="language-bash">./zombienet-macos spawn examples/0001-small-network.toml
</code></pre>
<p>You can follow the output of the <code>steps</code> to spawn the network and once the network is launched a message with the <code>node</code>s information like this one is show</p>
Expand Down Expand Up @@ -337,7 +337,7 @@ <h2 id="download-and-install-needed-artifacts"><a class="header" href="#download
<div style="break-before: page; page-break-before: always;"></div><h1 id="testing"><a class="header" href="#testing">Testing</a></h1>
<p>The other goal of ZombieNet is provide a way to perform test/assertions agins the spawned network, using a set of <code>natural language expressions</code> that allow to make assertions based on metrics, logs and some <code>built-in</code> function that query the network using <code>polkadot.js</code>.
Those assertions should be defined in a <em>feature test</em>, and the <code>dsl</code> and format is documented in <a href="cli/./test-dsl-definition-spec.html">here</a>.</p>
<p>The following is an small example to spawn a network (using the previos <code>simple network definition</code>) and assert that:</p>
<p>The following is an small example to spawn a network (using the previous <code>simple network definition</code>) and assert that:</p>
<ul>
<li>Both <code>nodes</code> are running</li>
<li>The definded <code>parachain</code> is registered</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/cli/spawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ id = 100
command = "adder-collator"
```

Then you can spwan the network by running the following command:
Then you can spawn the network by running the following command:

```bash
./zombienet-macos spawn examples/0001-small-network.toml
Expand Down
8 changes: 4 additions & 4 deletions docs/src/cli/test-dsl-definition-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ One of the goals of Zombienet it to provide a simple way to create tests, for th
- Custom api calls (through polkadot.js)
- Commands

Each of this abstractions are expresed by sentences defined in a **natural language style**, so each test line will be mapped to a test tu run.
Each of this abstractions are expressed by sentences defined in a **natural language style**, so each test line will be mapped to a test tu run.

Also, the test file (\*.zndsl) includes a pre-defined **header fields** used to define information about the suite (e.g. `network configuration` and `credentials` location)

Expand Down Expand Up @@ -65,7 +65,7 @@ The first lines are used to define the **header fields**:
- `node-name`: system event (contains|matches)( regex| glob) "pattern" [within x seconds]
- alice: system event matches "\"paraId\":[0-9]+" within 10 seconds

- Tracing assertion: Match an array of `span names` from the supplyed traceID. _NOTE_ this is **not** supported with the native provider.
- Tracing assertion: Match an array of `span names` from the supplied traceID. _NOTE_ this is **not** supported with the native provider.

- `node-name`: trace with traceID <id> contains ["name", "name2",...]
- alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains ["answer-chunk-request", "answer-chunk-request"]
Expand All @@ -86,7 +86,7 @@ The first lines are used to define the **header fields**:

### Commands (Only works with podman and kubernetes providers)

Commands allow to interact with the nodes, given the ability to run some pre-defined commands or an arbitary command in the node.
Commands allow to interact with the nodes, given the ability to run some pre-defined commands or an arbitrary command in the node.

- restart
- node-name: restart [after x seconds]
Expand All @@ -96,4 +96,4 @@ Commands allow to interact with the nodes, given the ability to run some pre-def
- node-name: resume
Will pause (SIGCONT) the process
- sleep x
Will sleep the test-runner for `x` ammount of seconds.
Will sleep the test-runner for `x` amount of seconds.
2 changes: 1 addition & 1 deletion docs/src/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Using kubernetes as provider we can simply spawn this network by running:
./zombienet-linux -p kubernetes spawn examples/0001-small-network.toml
```

or simplier, since kubernetes is the default provider as:
or simpler, since kubernetes is the default provider as:

```bash
./zombienet-linux spawn examples/0001-small-network.toml
Expand Down
2 changes: 1 addition & 1 deletion javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Zombienet aims to be a testing framework for Substrate based blockchains, provid
tool that allows users to spawn and test ephemeral networks. The assertions used in the tests can
include on-chain storage, metrics, logs and custom javascript scripts that interact with the chain.
To make it easy to define those, zombienet has a `natural language` built-in allowing developers to
write tests as smooth as posible.
write tests as smooth as possible.

Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different
backend `providers` to run the *nodes*, at this moment `kubernetes`, `podman` and `native` are
Expand Down
2 changes: 1 addition & 1 deletion javascript/packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Zombienet aims to be a testing framework for Substrate based blockchains, provid
tool that allows users to spawn and test ephemeral networks. The assertions used in the tests can
include on-chain storage, metrics, logs and custom javascript scripts that interact with the chain.
To make it easy to define those, zombienet has a `natural language` built-in allowing developers to
write tests as smooth as posible.
write tests as smooth as possible.

Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different
backend `providers` to run the *nodes*, at this moment `kubernetes`, `podman` and `native` are
Expand Down
2 changes: 1 addition & 1 deletion javascript/packages/cli/src/actions/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "../constants";

/**
* Spawn - spawns ephemeral networks, providing a simple but poweful cli that allow you to declare
* Spawn - spawns ephemeral networks, providing a simple but powerful cli that allow you to declare
* the desired network in toml or json format.
* Read more here: https://paritytech.github.io/zombienet/cli/spawn.html
* @param configFile: config file, supported both json and toml formats
Expand Down
2 changes: 1 addition & 1 deletion javascript/packages/orchestrator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Zombienet aims to be a testing framework for Substrate based blockchains, provid
tool that allows users to spawn and test ephemeral networks. The assertions used in the tests can
include on-chain storage, metrics, logs and custom javascript scripts that interact with the chain.
To make it easy to define those, zombienet has a `natural language` built-in allowing developers to
write tests as smooth as posible.
write tests as smooth as possible.

Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different
backend `providers` to run the *nodes*, at this moment `kubernetes`, `podman` and `native` are
Expand Down
2 changes: 1 addition & 1 deletion javascript/packages/orchestrator/src/configGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export async function generateNetworkSpec(
);

// collator could by defined in groups or
// just using one collator definiton
// just using one collator definition
const collators = [];
const collatorConfigs = parachain.collator ? [parachain.collator] : [];
if (parachain.collators) collatorConfigs.push(...parachain.collators);
Expand Down
4 changes: 2 additions & 2 deletions javascript/packages/orchestrator/src/networkNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class NetworkNode implements NetworkNodeInterface {
),
]);
if (resp instanceof Error) {
// use `undefined` metrics values in `equal` comparations as `0`
// use `undefined` metrics values in `equal` comparisons as `0`
if (timedout && comparator === "equal" && desiredMetricValue === 0)
value = 0;
else throw resp;
Expand Down Expand Up @@ -341,7 +341,7 @@ export class NetworkNode implements NetworkNodeInterface {
),
]);
if (resp instanceof Error) {
// use `undefined` metrics values in `equal` comparations as `0`
// use `undefined` metrics values in `equal` comparisons as `0`
if (timedOut && comparator === "equal" && desiredMetricValue === 0)
value = 0;
else throw resp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function createTempNodeDef(
image,
fullCommand:
fullCommand +
(useCommandSuffix ? ` && ${TMP_DONE} && ${WAIT_UNTIL_SCRIPT_SUFIX}` : ""), // leave the pod runnig until we finish transfer files
(useCommandSuffix ? ` && ${TMP_DONE} && ${WAIT_UNTIL_SCRIPT_SUFIX}` : ""), // leave the pod running until we finish transfer files
chain,
validator: false,
invulnerable: false,
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/run-test-env-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function download_from_remote {
log INFO "Found github api org:${org} repo:${repo} branch:${branch} gh_dir:${gh_dir}"

function gh_download_content {
# recursively dowload content of github dir
# recursively download content of github dir
local url dir
url=$1 dir=$2
mkdir -p "${OUTPUT_DIR}/${dir}"
Expand Down