File tree Expand file tree Collapse file tree 3 files changed +17
-16
lines changed
main/java/datastax/astra/migrate/cql
test/java/datastax/astra/migrate Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and publish to docker repo
2
2
3
- on :
4
- workflow_dispatch :
5
- push :
6
- branches :
7
- - main
8
- paths :
9
- - ' src/**'
10
- - ' pom.xml'
11
- - ' Dockerfile'
12
- - ' LICENSE.md'
13
- tags :
14
- - ' *.*.*'
15
- - ' *.*.*-*'
3
+ on : workflow_dispatch
16
4
17
5
jobs :
18
6
build_and_publish :
50
38
context : .
51
39
push : true
52
40
tags : ${{ steps.meta.outputs.tags }}
53
- platforms : linux/amd64
41
+ platforms : linux/amd64
Original file line number Diff line number Diff line change @@ -476,4 +476,11 @@ private void abendIfSessionsNotSet() {
476
476
public Feature getFeature (Featureset featureEnum ) {
477
477
return featureMap .get (featureEnum );
478
478
}
479
+
480
+ public Boolean isFeatureEnabled (Featureset featureEnum ) {
481
+ if (!featureMap .containsKey (featureEnum )) {
482
+ return false ;
483
+ }
484
+ return featureMap .get (featureEnum ).isEnabled ();
485
+ }
479
486
}
Original file line number Diff line number Diff line change 1
1
package datastax .astra .migrate ;
2
2
3
3
import datastax .astra .migrate .cql .CqlHelper ;
4
+ import datastax .astra .migrate .cql .features .Featureset ;
4
5
import datastax .astra .migrate .properties .KnownProperties ;
5
6
import datastax .astra .migrate .properties .PropertyHelper ;
6
7
import org .apache .spark .SparkConf ;
7
8
import org .junit .jupiter .api .AfterEach ;
8
9
import org .junit .jupiter .api .BeforeEach ;
9
10
import org .junit .jupiter .api .Test ;
10
11
11
- import static org .junit .jupiter .api .Assertions .assertAll ;
12
- import static org .junit .jupiter .api .Assertions .assertEquals ;
12
+ import static org .junit .jupiter .api .Assertions .*;
13
13
14
14
public class CqlHelperTest {
15
15
@@ -54,4 +54,10 @@ public void smokeTest() {
54
54
);
55
55
}
56
56
57
+ @ Test
58
+ public void featureHelper_disabledWhenNull () {
59
+ propertyHelper .initializeSparkConf (sparkConf );
60
+ cqlHelper .initialize ();
61
+ assertFalse (cqlHelper .isFeatureEnabled (Featureset .TEST_UNIMPLEMENTED_FEATURE ));
62
+ }
57
63
}
You can’t perform that action at this time.
0 commit comments