File tree 4 files changed +63
-13
lines changed
4 files changed +63
-13
lines changed Original file line number Diff line number Diff line change 96
96
override : true
97
97
98
98
- name : Run tests
99
- run : cargo test --verbose --features ${{ env.DEFAULT_FEATURES }}
99
+ run : |
100
+ gmake setup-dat
101
+ cargo test --verbose --features ${{ env.DEFAULT_FEATURES }}
100
102
101
103
integration_test :
102
104
name : Integration Tests
@@ -141,11 +143,13 @@ jobs:
141
143
142
144
- name : Run tests with rustls (default)
143
145
run : |
146
+ gmake setup-dat
144
147
cargo test --features integration_test,${{ env.DEFAULT_FEATURES }}
145
148
146
149
- name : Run tests with native-tls
147
150
run : |
148
151
cargo clean
152
+ gmake setup-dat
149
153
cargo test --no-default-features --features integration_test,s3-native-tls,datafusion
150
154
151
155
integration_test_lakefs :
@@ -176,5 +180,6 @@ jobs:
176
180
177
181
- name : Run tests with rustls (default)
178
182
run : |
183
+ gmake setup-dat
179
184
cargo test --features integration_test_lakefs,lakefs,datafusion
180
185
Original file line number Diff line number Diff line change 73
73
- name : Build and install deltalake
74
74
run : make develop
75
75
76
- - name : Download Data Acceptance Tests (DAT) files
77
- run : make setup-dat
78
-
79
76
- name : Run tests
80
77
run : uv run --no-sync pytest -m '((s3 or azure) and integration) or not integration and not benchmark' --doctest-modules
81
78
@@ -104,9 +101,6 @@ jobs:
104
101
- name : Build and install deltalake
105
102
run : make develop
106
103
107
- - name : Download Data Acceptance Tests (DAT) files
108
- run : make setup-dat
109
-
110
104
- name : Run tests
111
105
run : uv run --no-sync pytest -m '(lakefs and integration)' --doctest-modules
112
106
@@ -133,9 +127,6 @@ jobs:
133
127
- name : Build and install deltalake
134
128
run : make develop
135
129
136
- - name : Download Data Acceptance Tests (DAT) files
137
- run : make setup-dat
138
-
139
130
- name : Run tests
140
131
run : ../../delta-rs/.github/scripts/retry_integration_test.sh unitycatalog_databricks 5 10
141
132
@@ -162,9 +153,6 @@ jobs:
162
153
- name : Build and install deltalake
163
154
run : make develop
164
155
165
- - name : Download Data Acceptance Tests (DAT) files
166
- run : make setup-dat
167
-
168
156
- name : Run tests
169
157
run : ../../delta-rs/.github/scripts/retry_integration_test.sh unitycatalog_oss 5 10
170
158
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ humantime = { version = "2.1.0" }
100
100
[dev-dependencies ]
101
101
criterion = " 0.5"
102
102
ctor = " 0"
103
+ datatest-stable = " 0.2"
103
104
deltalake-test = { path = " ../test" , features = [" datafusion" ] }
104
105
dotenvy = " 0"
105
106
fs_extra = " 1.2.0"
@@ -134,3 +135,7 @@ cloud = ["object_store/cloud"]
134
135
135
136
# enable caching some file I/O operations when scanning delta logs
136
137
delta-cache = [" foyer" , " tempfile" , " url/serde" ]
138
+
139
+ [[test ]]
140
+ name = " dat"
141
+ harness = false
Original file line number Diff line number Diff line change
1
+ use std:: path:: Path ;
2
+
3
+ use deltalake_core:: DeltaTableBuilder ;
4
+ use deltalake_test:: acceptance:: read_dat_case;
5
+
6
+ static SKIPPED_TESTS : & [ & str ; 4 ] = & [
7
+ "iceberg_compat_v1" ,
8
+ "column_mapping" ,
9
+ "check_constraints" ,
10
+ "deletion_vectors" ,
11
+ ] ;
12
+
13
+ fn reader_test_eager ( path : & Path ) -> datatest_stable:: Result < ( ) > {
14
+ let root_dir = format ! (
15
+ "{}/{}" ,
16
+ env![ "CARGO_MANIFEST_DIR" ] ,
17
+ path. parent( ) . unwrap( ) . to_str( ) . unwrap( )
18
+ ) ;
19
+ for skipped in SKIPPED_TESTS {
20
+ if root_dir. ends_with ( skipped) {
21
+ println ! ( "Skipping test: {}" , skipped) ;
22
+ return Ok ( ( ) ) ;
23
+ }
24
+ }
25
+
26
+ tokio:: runtime:: Builder :: new_current_thread ( )
27
+ . enable_all ( )
28
+ . build ( ) ?
29
+ . block_on ( async {
30
+ let case = read_dat_case ( root_dir) . unwrap ( ) ;
31
+
32
+ let table = DeltaTableBuilder :: from_uri ( case. table_root ( ) . unwrap ( ) )
33
+ . load ( )
34
+ . await
35
+ . expect ( "table" ) ;
36
+ let table_info = case. table_summary ( ) . expect ( "load summary" ) ;
37
+ let snapshot = table. snapshot ( ) . expect ( "Failed to load snapshot" ) ;
38
+ let protocol = table. protocol ( ) . expect ( "Failed to load protocol" ) ;
39
+ assert_eq ! ( snapshot. version( ) as u64 , table_info. version) ;
40
+ assert_eq ! (
41
+ ( protocol. min_reader_version, protocol. min_writer_version) ,
42
+ ( table_info. min_reader_version, table_info. min_writer_version)
43
+ ) ;
44
+ } ) ;
45
+ Ok ( ( ) )
46
+ }
47
+
48
+ datatest_stable:: harness!(
49
+ reader_test_eager,
50
+ "../../dat/v0.0.3/reader_tests/generated/" ,
51
+ r"test_case_info\.json"
52
+ ) ;
You can’t perform that action at this time.
0 commit comments