Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
e5e4ce31
Unverified
Commit
e5e4ce31
authored
1 year ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
upgrade cucumber
parent
2cad8546
No related branches found
No related tags found
No related merge requests found
Pipeline
#35814
failed
1 year ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Changes
3
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.lock
+199
-199
199 additions, 199 deletions
Cargo.lock
end2end-tests/Cargo.toml
+9
-10
9 additions, 10 deletions
end2end-tests/Cargo.toml
end2end-tests/tests/cucumber_tests.rs
+9
-23
9 additions, 23 deletions
end2end-tests/tests/cucumber_tests.rs
with
217 additions
and
232 deletions
Cargo.lock
+
199
−
199
View file @
e5e4ce31
This diff is collapsed.
Click to expand it.
end2end-tests/Cargo.toml
+
9
−
10
View file @
e5e4ce31
...
@@ -9,24 +9,23 @@ repository = 'https://git.duniter.org/nodes/rust/duniter-v2s'
...
@@ -9,24 +9,23 @@ repository = 'https://git.duniter.org/nodes/rust/duniter-v2s'
version
=
'3.0.0'
version
=
'3.0.0'
[dev-dependencies]
[dev-dependencies]
anyhow
=
"1.0"
anyhow
=
"1.0.79"
async-trait
=
"0.1.74"
clap
=
{
version
=
"4.4.18"
,
features
=
[
"derive"
,
"cargo"
]
}
clap
=
{
version
=
"3.2.23"
,
features
=
[
"derive"
,
"cargo"
]
}
# end2end cli refactoring need to upgrade to 4
ctrlc
=
"3.4.2"
ctrlc
=
"3.2.2"
cucumber
=
{
version
=
"0.20.2"
,
features
=
[
"macros"
]
}
cucumber
=
"0.11"
distance-oracle
=
{
path
=
"../distance-oracle"
,
default_features
=
false
}
distance-oracle
=
{
path
=
"../distance-oracle"
,
default_features
=
false
}
env_logger
=
"0.
9.0
"
env_logger
=
"0.
11.1
"
hex
=
"0.4.3"
hex
=
"0.4.3"
notify
=
"
4.0
"
notify
=
"
6.1.1
"
parity-scale-codec
=
"3.
4.0
"
parity-scale-codec
=
"3.
6.9
"
portpicker
=
"0.1.1"
portpicker
=
"0.1.1"
serde_json
=
"1.0.
96
"
serde_json
=
"1.0.
113
"
sp-core
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
,
default-features
=
false
}
sp-core
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
,
default-features
=
false
}
sp-core-hashing
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
,
default-features
=
false
}
sp-core-hashing
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
,
default-features
=
false
}
sp-runtime
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
}
sp-runtime
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
}
sp-keyring
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
}
sp-keyring
=
{
git
=
"https://github.com/duniter/duniter-polkadot-sdk"
,
branch
=
"duniter-substrate-v1.6.0"
}
subxt
=
{
git
=
'https://github.com/duniter/subxt'
,
branch
=
'subxt-v0.34.0-duniter-substrate-v1.6.0'
,
default-features
=
false
,
features
=
[
"substrate-compat"
,
"native"
,
"jsonrpsee"
]
}
subxt
=
{
git
=
'https://github.com/duniter/subxt'
,
branch
=
'subxt-v0.34.0-duniter-substrate-v1.6.0'
,
default-features
=
false
,
features
=
[
"substrate-compat"
,
"native"
,
"jsonrpsee"
]
}
tokio
=
{
version
=
"1.
28
"
,
features
=
[
"macros"
,
"time"
,
"rt-multi-thread"
],
default-features
=
false
}
tokio
=
{
version
=
"1.
36.0
"
,
features
=
[
"macros"
,
"time"
,
"rt-multi-thread"
],
default-features
=
false
}
[[test]]
[[test]]
name
=
"cucumber_tests"
name
=
"cucumber_tests"
...
...
This diff is collapsed.
Click to expand it.
end2end-tests/tests/cucumber_tests.rs
+
9
−
23
View file @
e5e4ce31
...
@@ -16,11 +16,10 @@
...
@@ -16,11 +16,10 @@
mod
common
;
mod
common
;
use
async_trait
::
async_trait
;
use
common
::
*
;
use
common
::
*
;
use
cucumber
::{
given
,
then
,
when
,
FailureWriter
,
World
,
WorldInit
};
use
cucumber
::
StatsWriter
;
use
cucumber
::{
given
,
then
,
when
,
World
};
use
sp_keyring
::
AccountKeyring
;
use
sp_keyring
::
AccountKeyring
;
use
std
::
convert
::
Infallible
;
use
std
::
path
::
PathBuf
;
use
std
::
path
::
PathBuf
;
use
std
::
str
::
FromStr
;
use
std
::
str
::
FromStr
;
use
std
::
sync
::{
use
std
::
sync
::{
...
@@ -31,7 +30,7 @@ use subxt::backend::rpc::RpcClient;
...
@@ -31,7 +30,7 @@ use subxt::backend::rpc::RpcClient;
// ===== world =====
// ===== world =====
#[derive(
WorldIni
t)]
#[derive(
cucumber::World,
Defaul
t)]
pub
struct
DuniterWorld
{
pub
struct
DuniterWorld
{
ignore_errors
:
bool
,
ignore_errors
:
bool
,
inner
:
Option
<
DuniterWorldInner
>
,
inner
:
Option
<
DuniterWorldInner
>
,
...
@@ -130,19 +129,6 @@ impl std::fmt::Debug for DuniterWorld {
...
@@ -130,19 +129,6 @@ impl std::fmt::Debug for DuniterWorld {
}
}
}
}
#[async_trait(
?
Send)]
impl
World
for
DuniterWorld
{
// We do require some error type.
type
Error
=
Infallible
;
async
fn
new
()
->
std
::
result
::
Result
<
Self
,
Infallible
>
{
Ok
(
Self
{
ignore_errors
:
false
,
inner
:
None
,
})
}
}
struct
DuniterWorldInner
{
struct
DuniterWorldInner
{
client
:
FullClient
,
client
:
FullClient
,
process
:
Option
<
Process
>
,
process
:
Option
<
Process
>
,
...
@@ -594,19 +580,19 @@ async fn identity_status_should_be(
...
@@ -594,19 +580,19 @@ async fn identity_status_should_be(
#[derive(clap::Args)]
#[derive(clap::Args)]
struct
CustomOpts
{
struct
CustomOpts
{
/// Keep running
/// Keep running
#[
clap
(short,
long)]
#[
arg
(short,
long)]
keep_running
:
bool
,
keep_running
:
bool
,
/// Do not spawn a node, reuse expected node on port 9944
/// Do not spawn a node, reuse expected node on port 9944
#[
clap
(long)]
#[
arg
(long)]
no_spawn
:
bool
,
no_spawn
:
bool
,
/// For compliance with Jetbrains IDE which pushes extra args.
/// For compliance with Jetbrains IDE which pushes extra args.
/// https://youtrack.jetbrains.com/issue/CPP-33071/cargo-test-adds-extra-options-which-conflict-with-Cucumber
/// https://youtrack.jetbrains.com/issue/CPP-33071/cargo-test-adds-extra-options-which-conflict-with-Cucumber
#[
clap
(short,
long)]
#[
arg
(short,
long)]
format
:
Option
<
String
>
,
format
:
Option
<
String
>
,
#[
clap
(short,
long
=
"show-output"
)]
#[
arg
(short,
long
=
"show-output"
)]
show_output
:
bool
,
show_output
:
bool
,
#[
clap
(short
=
'Z'
,
long)]
#[
arg
(short
=
'Z'
,
long)]
z
:
Option
<
String
>
,
z
:
Option
<
String
>
,
}
}
...
@@ -650,7 +636,7 @@ async fn main() {
...
@@ -650,7 +636,7 @@ async fn main() {
world
.set_ignore_errors
(
ignore_errors
(
&
scenario
.tags
));
world
.set_ignore_errors
(
ignore_errors
(
&
scenario
.tags
));
Box
::
pin
(
world
.init
(
Some
(
genesis_conf_file_path
),
no_spawn
))
Box
::
pin
(
world
.init
(
Some
(
genesis_conf_file_path
),
no_spawn
))
})
})
.after
(
move
|
_feature
,
_rule
,
_scenario
,
maybe_world
|
{
.after
(
move
|
_feature
,
_rule
,
_scenario
,
_ev
,
maybe_world
|
{
if
keep_running
{
if
keep_running
{
while
running
.load
(
Ordering
::
SeqCst
)
{}
while
running
.load
(
Ordering
::
SeqCst
)
{}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment