File tree 3 files changed +37
-20
lines changed 3 files changed +37
-20
lines changed Original file line number Diff line number Diff line change 1
- name : db-sync config tests
1
+ name : 02 Regression tests with db-sync
2
2
3
3
on :
4
4
workflow_dispatch :
19
19
- conway 10
20
20
- conway 9
21
21
default : conway 10
22
+ markexpr :
23
+ type : choice
24
+ description : " Selection of tests"
25
+ options :
26
+ - all
27
+ - dbsync
28
+ - smoke
29
+ - plutus
30
+ - plutus and smoke
31
+ - team_plutus
32
+ - not long
33
+ - conway only
34
+ - dbsync and smoke
35
+ - dbsync and plutus
36
+ - dbsync and not long
37
+ default : dbsync
22
38
topology :
23
39
type : choice
24
40
description : " Network topology"
@@ -58,12 +74,13 @@ jobs:
58
74
cli_rev : ${{ inputs.cli_rev }}
59
75
dbsync_rev : ${{ inputs.dbsync_rev }}
60
76
cluster_era : ${{ inputs.cluster_era }}
77
+ markexpr : ${{ inputs.markexpr }}
61
78
topology : ${{ inputs.topology }}
62
79
utxo_backend : ${{ inputs.utxo_backend }}
63
80
byron_cluster : ${{ inputs.byron_cluster }}
64
81
testrun_name : ${{ inputs.testrun_name }}
65
82
skip_passed : ${{ inputs.skip_passed }}
66
- env-path : .github/env_dbsync_config
83
+ env-path : .github/env_regression_dbsync
67
84
secrets :
68
85
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
86
TCACHE_BASIC_AUTH : ${{ secrets.TCACHE_BASIC_AUTH }}
Original file line number Diff line number Diff line change 1
1
"""Tests for basic DB-Sync configuration options."""
2
2
3
+ import enum
3
4
import logging
4
5
import typing as tp
5
- from enum import Enum
6
6
7
7
import allure
8
8
import pytest
17
17
18
18
pytestmark = [
19
19
pytest .mark .skipif (
20
- configuration .CLUSTERS_COUNT != 1 and not configuration .HAS_DBSYNC ,
20
+ configuration .CLUSTERS_COUNT != 1 or not configuration .HAS_DBSYNC ,
21
21
reason = "db-sync config tests can run on a single cluster only" ,
22
22
),
23
23
pytest .mark .dbsync_config ,
24
24
]
25
25
26
26
27
- class TableCondition (str , Enum ):
27
+ class TableCondition (str , enum . Enum ):
28
28
"""Enum for table-level db-sync state conditions."""
29
29
30
30
EMPTY = "empty"
@@ -33,7 +33,7 @@ class TableCondition(str, Enum):
33
33
NOT_EXISTS = "not_exists"
34
34
35
35
36
- class ColumnCondition (str , Enum ):
36
+ class ColumnCondition (str , enum . Enum ):
37
37
"""Enum for column-level db-sync condition checks."""
38
38
39
39
ZERO = "column_condition:=0"
Original file line number Diff line number Diff line change 1
1
"""Functionality for managing db-sync service."""
2
2
3
+ import dataclasses
4
+ import enum
3
5
import logging
4
6
import os
5
7
import pathlib as pl
6
8
import typing as tp
7
- from dataclasses import dataclass
8
- from enum import StrEnum
9
9
10
10
import pytest
11
11
import yaml
20
20
LOGGER = logging .getLogger (__name__ )
21
21
22
22
23
- class Table (StrEnum ):
23
+ class Table (enum . StrEnum ):
24
24
"""Enum representing all tables in the Cardano db-sync database."""
25
25
26
26
ADA_POTS = "ada_pots"
@@ -106,63 +106,63 @@ def get_all_tables(cls) -> list[str]:
106
106
107
107
108
108
class Column :
109
- class Tx (StrEnum ):
109
+ class Tx (enum . StrEnum ):
110
110
FEE = "tx.fee"
111
111
112
- class Redeemer (StrEnum ):
112
+ class Redeemer (enum . StrEnum ):
113
113
SCRIPT_HASH = "redeemer.script_hash"
114
114
115
115
116
- class SettingState (StrEnum ):
116
+ class SettingState (enum . StrEnum ):
117
117
ENABLE = "enable"
118
118
DISABLE = "disable"
119
119
120
120
121
- class TxOutMode (StrEnum ):
121
+ class TxOutMode (enum . StrEnum ):
122
122
ENABLE = "enable"
123
123
DISABLE = "disable"
124
124
CONSUMED = "consumed"
125
125
PRUNE = "prune"
126
126
BOOTSTRAP = "bootstrap"
127
127
128
128
129
- class LedgerMode (StrEnum ):
129
+ class LedgerMode (enum . StrEnum ):
130
130
ENABLE = "enable"
131
131
DISABLE = "disable"
132
132
IGNORE = "ignore"
133
133
134
134
135
- class Preset (StrEnum ):
135
+ class Preset (enum . StrEnum ):
136
136
FULL = "full"
137
137
ONLY_UTXO = "only_utxo"
138
138
ONLY_GOVERNANCE = "only_governance"
139
139
DISABLE_ALL = "disable_all"
140
140
141
141
142
- @dataclass
142
+ @dataclasses . dataclass
143
143
class TxOutConfig :
144
144
value : TxOutMode = TxOutMode .ENABLE
145
145
force_tx_in : bool | None = None
146
146
use_address_table : bool | None = None
147
147
148
148
149
- @dataclass
149
+ @dataclasses . dataclass
150
150
class ShelleyConfig :
151
151
enable : bool = True
152
152
153
153
154
- @dataclass
154
+ @dataclasses . dataclass
155
155
class MultiAssetConfig :
156
156
enable : bool = True
157
157
158
158
159
- @dataclass
159
+ @dataclasses . dataclass
160
160
class MetadataConfig :
161
161
enable : bool = True
162
162
keys : list [int ] | None = None
163
163
164
164
165
- @dataclass
165
+ @dataclasses . dataclass
166
166
class PlutusConfig :
167
167
enable : bool = True
168
168
You can’t perform that action at this time.
0 commit comments